mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-28 18:10:15 +01:00
migrate editing a context and refactor project with it
This commit is contained in:
parent
4e9777dc88
commit
fb39d841a7
13 changed files with 163 additions and 43 deletions
|
|
@ -21,16 +21,20 @@ suppress_edit_button ||= false
|
|||
<% end %>
|
||||
|
||||
<%= link_to_delete_context(context, image_tag( "blank.png", :title => t('contexts.delete_context'), :class=>"delete_item")) %>
|
||||
<%= suppress_edit_button ? "" : link_to_edit_context(context, image_tag( "blank.png", :title => t('contexts.edit_context'), :class=>"edit_item")) %>
|
||||
|
||||
<% # = # link_to_remote(
|
||||
#image_tag( "blank.png", :title => "Delete context", :class=>"delete_item"),
|
||||
#:url => {:controller => 'contexts', :action => 'destroy', :id => context.id},
|
||||
#:method => 'delete',
|
||||
#:with => "'_source_view=#{@source_view}'",
|
||||
#:before => "$('#{dom_id(context)}').block({message:null});",
|
||||
#:complete => "$('#{dom_id(context)}').unblock();",
|
||||
#:confirm => "Are you sure that you want to delete the context '#{context.name}'? Be aware that this will also delete all (repeating) actions in this context!",
|
||||
#:html => { :id => dom_id(context, 'delete') }
|
||||
#)
|
||||
%>
|
||||
|
||||
<%= link_to_remote(
|
||||
image_tag( "blank.png", :title => t('contexts.edit_context'), :class=>"edit_item"),
|
||||
:url => {:controller => 'contexts', :action => 'edit', :id => context.id},
|
||||
:method => 'get',
|
||||
:with => "'_source_view=#{@source_view}'",
|
||||
:before => "$('#{dom_id(context)}').block({message:null});",
|
||||
:complete => "$('#{dom_id(context)}').unblock();",
|
||||
:html => {:id => "edit_context_#{context.id}_link"}
|
||||
) %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="<%= dom_id(context, 'edit') %>" class="edit-form" style="display:none;">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue