mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-06 12:50:19 +01:00
Edit-in-place for context name
This commit is contained in:
parent
586b46661a
commit
83b17d2231
4 changed files with 49 additions and 4 deletions
|
|
@ -5,10 +5,7 @@
|
|||
<a href="#" class="container_toggle" id="toggle_c<%= context.id %>"><%= image_tag("collapse.png") %></a>
|
||||
<% end -%>
|
||||
<% if source_view_is :context %>
|
||||
<span class="in_place_editor_field" id="context_name_in_place_editor"><%= context.name %></span>
|
||||
<%= in_place_editor 'context_name_in_place_editor', {
|
||||
:url => { :controller => 'contexts', :action => 'update', :id => context.id, :field => 'name', :update_context_name => true, :escape => false},
|
||||
:options=>"{method:'put'}", :script => true } %>
|
||||
<span id="context_name"><%= context.name %></span>
|
||||
<% else %>
|
||||
<%= link_to_context( context ) %>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue