tracks/app/views/feedlist/index.html.erb
Vitalie Lazu 496741c972 Fixed sidebar rendering, was not working on some pages after rails 2.2 upgrade
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
2009-01-17 15:17:16 +01:00

135 lines
6.4 KiB
Text

<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3>Legend:</h3>
<dl>
<dt><%= image_tag("feed-icon.png", :size => "16X16", :border => 0)%></dt><dd>RSS Feed</dd>
<dt><span class="feed">TXT</span></dt><dd>Plain Text Feed</dd>
<dt><span class="feed">iCal</span></dt><dd>iCal feed</dd>
</dl>
<p>Note: All feeds show only actions that have not been marked as done.</p>
</div>
<ul>
<li>
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) %>
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) %>
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) %>
Last 15 actions
</li>
<li>
<%= rss_formatted_link( { :controller => 'todos', :action => 'index' } ) %>
<%= text_formatted_link( { :controller => 'todos', :action => 'index' } ) %>
<%= ical_formatted_link( { :controller => 'todos', :action => 'index' } ) %>
All actions
</li>
<li>
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) %>
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) %>
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) %>
Actions due today or earlier
</li>
<li>
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) %>
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) %>
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) %>
Actions due in 7 days or earlier
</li>
<li>
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) %>
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) %>
Actions completed in the last 7 days
</li>
<li>
<%= rss_formatted_link({:controller => 'contexts', :action => 'index'}) %>
<%= text_formatted_link({:controller => 'contexts', :action => 'index'}) %>
All Contexts
</li>
<li>
<%= rss_formatted_link({:controller => 'projects', :action => 'index'}) %>
<%= text_formatted_link({:controller => 'projects', :action => 'index'}) %>
All Projects
</li>
<li>
<%= rss_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
<%= text_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
Active projects with no next actions
</li>
<li>
<%= rss_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
<%= text_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
All starred, active actions
</li>
<li>
<%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %>
Active projects with their actions
</li>
<li><h4>Feeds for incomplete actions in a specific context:</h4>
<% if @active_contexts.empty? && @hidden_contexts.empty? -%>
<ul><li>There need to be at least one context before you can request a feed</li></ul>
<% else -%>
<ul>
<li>Step 1 - Choose the context you want a feed of:
<select name="feed-contexts" id="feed-contexts">
<%= options_from_collection_for_select(@active_contexts, "id", "name", @active_contexts.first.id) unless @active_projects.empty?-%>
<%= options_from_collection_for_select(@hidden_contexts, "id", "name") -%>
</select>
<%= observe_field "feed-contexts", :update => "feeds-for-context",
:with => 'context_id',
:url => { :controller => "feedlist", :action => "get_feeds_for_context" },
:before => "$('feeds-for-context').startWaiting()",
:complete => "$('feeds-for-context').stopWaiting()"
-%>
</li>
<li>Step 2 - Select the feed for this context
<div id="feedicons-context">
<div id="feeds-for-context">
<%= render :partial => 'feed_for_context', :locals => { :context => @active_contexts.empty? ? @hidden_contexts.first : @active_contexts.first } %>
</div>
</div>
</li>
</ul>
<% end -%>
</li>
<li><h4>Feeds for incomplete actions in a specific project:</h4>
<% if @active_projects.empty? && @hidden_projects.empty? -%>
<ul><li>There need to be at least one project before you can request a feed</li></ul>
<% else -%>
<ul>
<li>Step 1 - Choose the project you want a feed of:
<select name="feed-projects" id="feed-projects">
<%= options_from_collection_for_select(@active_projects, "id", "name", @active_projects.first.id) unless @active_projects.empty?-%>
<%= options_from_collection_for_select(@hidden_projects, "id", "name") -%>
<%= options_from_collection_for_select(@completed_projects, "id", "name") -%>
</select>
<%= observe_field "feed-projects", :update => "feeds-for-project",
:with => 'project_id',
:url => { :controller => "feedlist", :action => "get_feeds_for_project" },
:before => "$('feeds-for-project').startWaiting()",
:complete => "$('feeds-for-project').stopWaiting()"
-%>
</li>
<li>Step 2 - Select the feed for this project
<div id="feedicons-project">
<div id="feeds-for-project">
<%= render :partial => 'feed_for_project', :locals => { :project => @active_projects.empty? ? @hidden_projects.first : @active_projects.first } %>
</div>
</div>
</li>
</ul>
<% end -%>
</li>
</ul>
</div>
</div><!-- End of display_box -->
<div id="input_box">
<%= render :file => "sidebar/sidebar.html.erb" %>
</div><!-- End of input box -->
<script type="text/javascript">
window.onload=function(){
Nifty("div#feedicons-project","normal");
Nifty("div#feedicons-context","normal");
Nifty("div#feedlegend","normal");
}
</script>