diff --git a/app/controllers/feedlist_controller.rb b/app/controllers/feedlist_controller.rb index 4b83cfa8..8402a388 100644 --- a/app/controllers/feedlist_controller.rb +++ b/app/controllers/feedlist_controller.rb @@ -5,14 +5,28 @@ class FeedlistController < ApplicationController def index @page_title = 'TRACKS::Feeds' init_data_for_sidebar unless mobile? + + @active_projects = @projects.select{ |p| p.active? } + @hidden_projects = @projects.select{ |p| p.hidden? } + @completed_projects = @projects.select{ |p| p.completed? } + + @active_contexts = @contexts.select{ |c| !c.hidden? } + @hidden_contexts = @contexts.select{ |c| c.hidden? } + respond_to do |format| format.html { render :layout => 'standard' } - format.m { - # @projects = @projects || current_user.projects.find(:all, :include => [:default_context ]) - # @contexts = @contexts || current_user.contexts - render :action => 'mobile_index' - } + format.m { render :action => 'mobile_index' } end end + + def get_feeds_for_context + context = current_user.contexts.find params[:context_id] + render :partial => 'feed_for_context', :locals => { :context => context } + end + + def get_feeds_for_project + project = current_user.projects.find params[:project_id] + render :partial => 'feed_for_project', :locals => { :project => project } + end end diff --git a/app/views/feedlist/_feed_for_context.html.erb b/app/views/feedlist/_feed_for_context.html.erb new file mode 100644 index 00000000..1ef269c1 --- /dev/null +++ b/app/views/feedlist/_feed_for_context.html.erb @@ -0,0 +1,6 @@ +
  • + <%= rss_formatted_link({ :controller=> 'todos', :action => 'index', :context_id => context.to_param }) %> + <%= text_formatted_link({ :controller=> 'todos', :action => 'index', :context_id => context.to_param }) %> + <%= ical_formatted_link({ :controller=> 'todos', :action => 'index', :context_id => context.to_param }) %> + <%=h context.name %> +
  • diff --git a/app/views/feedlist/_feed_for_project.html.erb b/app/views/feedlist/_feed_for_project.html.erb new file mode 100644 index 00000000..54d5e2b3 --- /dev/null +++ b/app/views/feedlist/_feed_for_project.html.erb @@ -0,0 +1,6 @@ +
  • + <%= rss_formatted_link({ :controller=> 'todos', :action => 'index', :project_id => project.to_param }) %> + <%= text_formatted_link({ :controller=> 'todos', :action => 'index', :project_id => project.to_param }) %> + <%= ical_formatted_link({ :controller=> 'todos', :action => 'index', :project_id => project.to_param }) %> + <%=h project.name %> +
  • \ No newline at end of file diff --git a/app/views/feedlist/index.html.erb b/app/views/feedlist/index.html.erb index 5c611008..7c9ed482 100644 --- a/app/views/feedlist/index.html.erb +++ b/app/views/feedlist/index.html.erb @@ -60,26 +60,49 @@
  • Feeds for incomplete actions in a specific context:

  • Feeds for incomplete actions in a specific project:

  • @@ -89,3 +112,11 @@
    <%= render "sidebar/sidebar" %>
    + + diff --git a/public/stylesheets/standard.css b/public/stylesheets/standard.css index e754c456..6a42560d 100644 --- a/public/stylesheets/standard.css +++ b/public/stylesheets/standard.css @@ -845,6 +845,13 @@ input, select, textarea { margin: 0px 0px 5px 0px; } +#feedicons-project, #feedicons-context { + background-color: #D2D3D6; + margin: 0px 0px 0px 60px; + padding: 0px 0px 0px 5px; + width: 70%; +} + .feed { font-family: verdana, sans-serif; font-size: 10px; @@ -948,7 +955,6 @@ ul#prefs {list-style-type: disc; margin-left: 15px;} } #feedlegend { padding: 2px; - border: 1px solid #CCC; background-color: #D2D3D6; color: #666; padding: 5px 20px;