Class: Cms::DashboardController

Inherits:
BaseController show all
Defined in:
app/controllers/cms/dashboard_controller.rb

Instance Method Summary collapse

Methods included from PageHelper

#able_to?, #cms_content_editor, #cms_toolbar, #container, #container_has_block?, #current_page, #page_title, #render_breadcrumbs, #render_portlet

Methods included from PathHelper

#attachment_path_for, #cms_connectable_path, #cms_index_path_for, #cms_index_url_for, #cms_new_path_for, #cms_new_url_for, #cms_sortable_column_path, #edit_cms_connectable_path, #engine_for, #link_to_usages, #path_elements_for

Methods included from ErrorHandling

#handle_access_denied, #handle_server_error, #with_format

Instance Method Details

#indexObject



6
7
8
9
10
11
12
# File 'app/controllers/cms/dashboard_controller.rb', line 6

def index
  @unpublished_pages = Page.unpublished.all(:order => "updated_at desc")
  @unpublished_pages = @unpublished_pages.select { |page| current_user.able_to_publish?(page) }
  @incomplete_tasks = current_user.tasks.incomplete.all(
      :include => :page,
      :order => "#{Task.table_name}.due_date desc, #{Page.table_name}.name")
end