mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 22:41:48 +01:00
Hide default context field in new project form when no contexts exist. Fixes #544.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@632 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
ff90b6d737
commit
574f269d54
3 changed files with 4 additions and 2 deletions
|
|
@ -25,10 +25,12 @@
|
|||
<label for="project_description">Description (optional):</label><br />
|
||||
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2 %><br />
|
||||
|
||||
<% unless @contexts.empty? -%>
|
||||
<label for="default_context_name">Default Context (optional):</label><br />
|
||||
<%= text_field_tag("project[default_context_name]", @project.default_context.name, :tabindex => 3) %>
|
||||
<%= render :partial => 'default_context_autocomplete' %>
|
||||
<br />
|
||||
<% end -%>
|
||||
|
||||
<input type="submit" value="Add Project" tabindex="4" /><br />
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
Of those <%= @contexts.count(:conditions => ["hide = ?", false])%> are visible contexts and
|
||||
<%= @contexts.count(:conditions => ["hide = ?", true]) %> are hidden contexts
|
||||
|
||||
<% unless @actions.count == 0 -%>
|
||||
<% unless @actions.empty? -%>
|
||||
<p>You have <%= @actions.count(:conditions => "completed_at IS NULL") %> uncompleted actions of which
|
||||
<%= @actions.count(:conditions => "completed_at IS NULL AND NOT show_from IS NULL") %> are
|
||||
deferred actions. </p>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<%= render :partial => 'totals' -%>
|
||||
|
||||
<% unless @actions.count == 0 -%>
|
||||
<% unless @actions.empty? -%>
|
||||
|
||||
<h2>Actions</h2>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue