mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-15 00:36:33 +01:00
fix #1256 by changing the layout of the context view to match the project view
This commit is contained in:
parent
f9232a7e9d
commit
dea8734498
9 changed files with 57 additions and 63 deletions
|
|
@ -1,29 +1,17 @@
|
|||
<% context = context_listing
|
||||
<%
|
||||
context = context_listing
|
||||
suppress_drag_handle ||= false
|
||||
suppress_edit_button ||= false
|
||||
suppress_delete_button ||= false
|
||||
%>
|
||||
<div id="<%= dom_id(context, "container") %>" class="list">
|
||||
<div id="<%= dom_id(context) %>" class="context sortable_row" style="display:'';">
|
||||
<% unless suppress_drag_handle -%>
|
||||
<div class="position">
|
||||
<span class="handle"><%= t('common.drag_handle') %></span>
|
||||
</div>
|
||||
<% end -%>
|
||||
<div class="data">
|
||||
<div id="<%= dom_id(context) %>" class="context sortable_row" style="display:block">
|
||||
<%= suppress_delete_button ? "" : 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")) -%>
|
||||
<%= suppress_drag_handle ? "" : image_tag('grip.png', :width => '7', :height => '16', :border => '0', :title => t('common.drag_handle'), :class => 'grip')-%>
|
||||
<div class="context_description">
|
||||
<%= 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_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")) %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="<%= dom_id(context, 'edit') %>" class="edit-form" style="display:none;">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
<span id="<%= state %>-contexts-count" class="badge"><%= context_state_group.length %></span>
|
||||
<%= t("states."+ state +"_plural")%> <%= t('common.contexts') %>
|
||||
</h2>
|
||||
|
||||
<div id="<%= state%>-contexts-empty-nd" style="<%= no_contexts ? 'display:block' : 'display:none'%>">
|
||||
<div class="message"><p><%= t('contexts.no_contexts_' + state) %></p></div>
|
||||
</div>
|
||||
|
||||
<div id="list-contexts-<%= state %>">
|
||||
<%= render :partial => 'context_listing', :collection => context_state_group %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue