mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-28 03:36:11 +01:00
fix scenarios for editing a todo, showing empty messages and fix some missing translations
This commit is contained in:
parent
793f7786f1
commit
068c4bf60e
16 changed files with 222 additions and 190 deletions
|
|
@ -10,10 +10,10 @@
|
|||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2>Actions in this project</h2>
|
||||
<h2><%= t('projects.actions_in_project_title') %></h2>
|
||||
<div id="p<%= project.id %>items" class="items toggle_target">
|
||||
<div id="p<%= project.id %>empty-nd" style="display:<%= @not_done.empty? ? 'block' : 'none'%>;">
|
||||
<div class="message"><p>Currently there are no incomplete actions in this project</p></div>
|
||||
<div class="message"><p><%= t('projects.no_actions_in_project') %></p></div>
|
||||
</div>
|
||||
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "project" } %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
<% project = project_settings -%>
|
||||
<div id="<%= dom_id(project) %>" class="project">
|
||||
<div class="project_settings">This project
|
||||
<% if project.completed? -%>has been marked as completed
|
||||
<% elsif project.hidden? -%>has been marked as hidden
|
||||
<% else -%>is active
|
||||
<div class="project_settings"><%= t('projects.this_project') %>
|
||||
<% if project.completed? -%><%= t('projects.was_marked_complete') %>
|
||||
<% elsif project.hidden? -%><%= t('projects.was_marked_hidden') %>
|
||||
<% else -%><%= t('projects.is_active') %>
|
||||
<% end -%>
|
||||
with <% if project.default_context.nil? -%>
|
||||
no default context
|
||||
<% if project.default_context.nil? -%>
|
||||
<%= t('projects.with_no_default_context') %>
|
||||
<% else -%>
|
||||
a default context of <%= project.default_context.name -%>
|
||||
<%= t('projects.with_default_context', :context_name => project.default_context.name) %>
|
||||
<% end -%>
|
||||
and with <% if project.default_tags.nil? || project.default_tags.blank? -%>
|
||||
no default tags.
|
||||
<% if project.default_tags.nil? || project.default_tags.blank? -%>
|
||||
<%= t('projects.with_no_default_tags') %>.
|
||||
<% else -%>
|
||||
'<%= project.default_tags -%>' as the default tags.
|
||||
<%= t('projects.with_default_tags', :tags => project.default_tags) %>.
|
||||
<% end -%>
|
||||
<%= link_to_edit_project(project, "Edit Project Settings") %>
|
||||
<%= link_to_edit_project(project, t('projects.edit_project_settings')) %>
|
||||
</div>
|
||||
<% unless project.description.blank? -%>
|
||||
<div class="project_description"><%= format_note(project.description) %></div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<div class="container">
|
||||
<div id="notes">
|
||||
<div class="add_note_link"><%= link_to t('projects.add_note'), '#' %> </div>
|
||||
<h2>Notes</h2>
|
||||
<h2><%= t('projects.notes') %></h2>
|
||||
<div id="empty-n" style="display:<%= @project.notes.empty? ? 'block' : 'none'%>;">
|
||||
<%= render :partial => "shared/empty",
|
||||
:locals => { :message => t('projects.no_notes_attached')} %>
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@ function clear_form() {
|
|||
}
|
||||
|
||||
function insert_new_context_with_new_todo() {
|
||||
$('#no_todos_in_tag_view').slideUp(100);
|
||||
$('#no_todos_in_view').slideUp(100);
|
||||
$('#display_box').prepend(html_for_new_context());
|
||||
}
|
||||
|
||||
function add_todo_to_existing_context() {
|
||||
<% if source_view_is_one_of(:todo, :deferred, :tag) -%>
|
||||
$('#c<%= @todo.context_id %>').fadeIn(500, function() {});
|
||||
$('#no_todos_in_tag_view').slideUp(100);
|
||||
$('#no_todos_in_view').slideUp(100);
|
||||
<% end -%>
|
||||
$('#<%=empty_container_msg_div_id%>').hide();
|
||||
$('#<%=item_container_id(@todo)%>').append(html_for_new_todo());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
<div id="display_box">
|
||||
<div id="no_todos_in_view" class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %> >
|
||||
<h2><%= t('todos.no_actions_found_title')%></h2>
|
||||
<div class="message"><p><%= t('todos.no_actions_found') %></p></div>
|
||||
</div>
|
||||
<%= render(
|
||||
:partial => "contexts/context",
|
||||
:collection => @contexts_to_show,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div id="display_box">
|
||||
<% if @not_done_todos.empty? -%>
|
||||
<div class="container context">
|
||||
<h2><%= t('todos.no_actions_found') %></h2>
|
||||
<h2><%= t('todos.no_actions_found_title') %></h2>
|
||||
<div class="message"><%= t('todos.no_actions_with', :tag_name => @tag_name) %></div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function update_successor() {
|
|||
<%= "show_empty_deferred_message(); " if @remaining_deferred_or_pending_count == 0 %>
|
||||
<% if source_view_is_one_of(:todo, :deferred, :tag) -%>
|
||||
$('#c<%= @successor.context_id %>').fadeIn(500, function() {});
|
||||
$('#no_todos_in_tag_view').slideUp(100);
|
||||
$('#no_todos_in_view').slideUp(100);
|
||||
<% end -%>
|
||||
$('#<%=item_container_id(@successor)%>').append(html_for_new_successor());
|
||||
$('#<%= dom_id(@successor, 'line')%>').effect('highlight', {}, 2000 ); <%
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div id="display_box">
|
||||
<div id="no_todos_in_tag_view" class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %> >
|
||||
<h2><%= t('todos.no_actions_found')%></h2>
|
||||
<div id="no_todos_in_view" class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %> >
|
||||
<h2><%= t('todos.no_actions_found_title')%></h2>
|
||||
<div class="message"><p><%= t('todos.no_actions_with', :tag_name=>@tag_name) %></p></div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
animation << "add_todo_to_context"
|
||||
animation << "block_predecessors"
|
||||
end
|
||||
animation << "update_empty_tag_container" if source_view_is(:tag) -%>
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo) -%>
|
||||
<%= render_animation(animation) %>
|
||||
TracksPages.set_page_badge(<%= @down_count %>);
|
||||
<% end -%>
|
||||
|
|
@ -85,11 +85,11 @@ function add_new_recurring_todo(next_steps) {
|
|||
<% end -%>
|
||||
}
|
||||
|
||||
function update_empty_tag_container(next_steps) {
|
||||
function update_empty_container(next_steps) {
|
||||
<% if @down_count==0 -%>
|
||||
$('#no_todos_in_tag_view').slideDown(400, function(){ next_steps.go(); });
|
||||
$('#no_todos_in_view').slideDown(400, function(){ next_steps.go(); });
|
||||
<% else -%>
|
||||
$('#no_todos_in_tag_view').fadeOut(100, function(){ next_steps.go(); });
|
||||
$('#no_todos_in_view').fadeOut(100, function(){ next_steps.go(); });
|
||||
<% end -%>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
end
|
||||
animation << "hide_context" if update_needs_to_hide_context
|
||||
animation << "highlight_updated_todo"
|
||||
animation << "update_empty_tag_container" if source_view_is(:tag)
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo)
|
||||
animation << "update_predecessors"
|
||||
%>
|
||||
|
||||
|
|
@ -71,11 +71,11 @@ function highlight_updated_todo(next_steps) {
|
|||
next_steps.go();
|
||||
}
|
||||
|
||||
function update_empty_tag_container(next_steps) {
|
||||
function update_empty_container(next_steps) {
|
||||
<% if @down_count==0 -%>
|
||||
$('#no_todos_in_tag_view').slideDown(400, function(){ next_steps.go(); });
|
||||
$('#no_todos_in_view').slideDown(400, function(){ next_steps.go(); });
|
||||
<% else -%>
|
||||
$('#no_todos_in_tag_view').fadeOut(100, function(){ next_steps.go(); });
|
||||
$('#no_todos_in_view').fadeOut(100, function(){ next_steps.go(); });
|
||||
<% end -%>
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue