mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-02 22:11:48 +01:00
Access key hints are now added with Javascript, and are tailored appropriately to the platform (Ctrl for Macs, Alt for Windows). Thanks, Luke! git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@152 a4c988fc-2ded-0310-b66e-134b36920a42
68 lines
2.8 KiB
Text
68 lines
2.8 KiB
Text
<div id="display_box">
|
|
|
|
<div class="contexts">
|
|
<h2><%= sanitize(@context.name) %></h2>
|
|
|
|
<div id="next_actions">
|
|
<% if @not_done.empty? %>
|
|
<p>There are no next actions yet in this context</p>
|
|
<% else %>
|
|
<% for item in @not_done %>
|
|
<%= render_partial "show_items", item %>
|
|
<% end %>
|
|
<% end %>
|
|
</div><!-- [end:next_actions] -->
|
|
</div><!-- [end:contexts] -->
|
|
|
|
<div class="contexts">
|
|
<h2>Completed actions in this context</h2>
|
|
|
|
<div id="completed">
|
|
<% if @done.empty? %>
|
|
<p>There are no completed next actions yet in this context</p>
|
|
<% else %>
|
|
<% for done_item in @done %>
|
|
<%= render_partial "show_items", done_item %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div><!-- [end:contexts] -->
|
|
|
|
</div><!-- [end:display_box] -->
|
|
|
|
<div id="input_box">
|
|
|
|
<%= link_to_function( "Add the next action in this context »", "Element.toggle('context_new_action'); Form.focusFirstElement('context-form-new-action');", {:title => "Add the next action", :accesskey => "n"}) %>
|
|
|
|
<div id="context_new_action" class="context_new" style="display:none">
|
|
<!--[form:context]-->
|
|
<%= form_remote_tag :url => { :controller => "todo", :action => "add_item" },
|
|
:update=> "next_actions",
|
|
:position=> "bottom",
|
|
:loading => "Form.reset('context-form-new-action')",
|
|
:complete => "Form.focusFirstElement('context-form-new-action'); new Effect.Highlight('next_actions');",
|
|
:html=> { :id=>'context-form-new-action', :name=>'context', :class => 'inline-form' } %>
|
|
<%= hidden_field( "new_item", "context_id", "value" => "#{@context.id}") %>
|
|
<label for="new_item_description">Description</label><br />
|
|
<%= text_field( "new_item", "description", "size" => 25, "tabindex" => 1) %><br />
|
|
<label for="new_item_notes">Notes</label><br />
|
|
<%= text_area( "new_item", "notes", "cols" => 25, "rows" => 10, "tabindex" => 2) %><br />
|
|
<label for="new_item_project_id">Project</label><br />
|
|
<select name="new_item[project_id]" id="item_project_id" tabindex="3">
|
|
<option selected="selected"></option>
|
|
<%= options_from_collection_for_select(@projects, "id", "name") %>
|
|
</select><br />
|
|
<label for="item_due">Due</label><br />
|
|
<%= text_field("new_item", "due", "size" => 10, "class" => "Date", "onFocus" => "Calendar.setup", "tabindex" => 4) %>
|
|
<br /><br />
|
|
<input type="submit" value="Add item" tabindex="5">
|
|
<%= end_form_tag %><!--[eoform:context]-->
|
|
<%= calendar_setup( "new_item_due" ) %>
|
|
|
|
</div><!-- [end:context-new-action] -->
|
|
|
|
<%= render "shared/sidebar" %>
|
|
</div><!-- End of input box -->
|
|
|
|
<% if @flash["confirmation"] %><div class="confirmation"><%= @flash["confirmation"] %></div><% end %>
|
|
<% if @flash["warning"] %><div class="warning"><%= @flash["warning"] %></div><% end %>
|