fix scenarios for editing a todo, showing empty messages and fix some missing translations

This commit is contained in:
Reinier Balt 2011-03-09 10:53:54 +01:00
parent 793f7786f1
commit 068c4bf60e
16 changed files with 222 additions and 190 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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')} %>