mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-09 17:14:20 +01:00
migrate deleting of contexts
This commit is contained in:
parent
15fdb1e572
commit
e52a8609c7
10 changed files with 124 additions and 31 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<% context = context_listing
|
||||
suppress_drag_handle ||= false
|
||||
suppress_edit_button ||= false
|
||||
suppress_drag_handle ||= false
|
||||
suppress_edit_button ||= false
|
||||
%>
|
||||
<div id="<%= dom_id(context, "container") %>" class="list">
|
||||
<div id="<%= dom_id(context) %>" class="context sortable_row" style="display:'';">
|
||||
|
|
@ -12,23 +12,16 @@
|
|||
<div class="data">
|
||||
<%= link_to_context( context ) %> <%= " (" + count_undone_todos_phrase(context,"actions") + ")" %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="buttons">
|
||||
<% if context.hide? %>
|
||||
<span class="grey"><%= t('states.hidden') %></span>
|
||||
<% else %>
|
||||
<span class="grey"><%= t('states.visible') %></span>
|
||||
<% end %>
|
||||
<%= link_to_remote(
|
||||
image_tag( "blank.png", :title => t('contexts.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 => t('contexts.delete_context_confirmation', :name => context.name),
|
||||
:html => { :id => dom_id(context, 'delete') }
|
||||
) %>
|
||||
|
||||
<%= link_to_delete_context(context, image_tag( "blank.png", :title => t('contexts.delete_context'), :class=>"delete_item")) %>
|
||||
|
||||
<%= link_to_remote(
|
||||
image_tag( "blank.png", :title => t('contexts.edit_context'), :class=>"edit_item"),
|
||||
:url => {:controller => 'contexts', :action => 'edit', :id => context.id},
|
||||
|
|
@ -37,7 +30,7 @@
|
|||
: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