mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-16 17:26:33 +01:00
make project settings editable from the project page
We're using the edit form instead of several separate fields to edit settings
This commit is contained in:
parent
66833829a0
commit
b990f8a015
14 changed files with 150 additions and 169 deletions
31
app/views/projects/_project_settings.rhtml
Normal file
31
app/views/projects/_project_settings.rhtml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<div id="<%= dom_id(project) %>" class="project">
|
||||
<% unless project.description.blank? -%>
|
||||
<div class="project_description"><%= sanitize(project.description) %></div>
|
||||
<% end -%>
|
||||
<p>This project
|
||||
<% if project.completed? -%>has been marked as completed
|
||||
<% elsif project.hidden? -%>has been marked as hidden
|
||||
<% else -%>is active
|
||||
<% end -%>
|
||||
with <% if project.default_context.nil? -%>
|
||||
no default context
|
||||
<% else -%>
|
||||
a default context of <%= project.default_context.name -%>
|
||||
<% end -%>
|
||||
and with <% if project.default_tags.nil? || project.default_tags.blank? -%>
|
||||
no default tags.
|
||||
<% else -%>
|
||||
'<%= project.default_tags -%>' as the default tags.
|
||||
<% end -%>
|
||||
<%= link_to_remote(
|
||||
"Edit Project Settings",
|
||||
:url => {:controller => 'projects', :action => 'edit', :id => project.id},
|
||||
:method => 'get',
|
||||
:with => "'_source_view=#{@source_view}'",
|
||||
:before => "$('#{dom_id(project)}').startWaiting();",
|
||||
:complete => "$('#{dom_id(project)}').stopWaiting();"
|
||||
) %>
|
||||
</p>
|
||||
</div>
|
||||
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;">
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue