2011-10-31 23:44:23 +00:00
|
|
|
= admin_content_menu_item 'pages', pages_url do
|
2011-06-25 16:25:31 +00:00
|
|
|
- if can? :manage, @page
|
|
|
|
.header
|
2011-10-31 23:44:23 +00:00
|
|
|
%p= link_to t('locomotive.pages.index.new'), new_page_url
|
2011-04-27 05:18:02 +00:00
|
|
|
.inner
|
2011-10-30 23:02:41 +00:00
|
|
|
%h2!= t('locomotive.pages.index.lastest_items')
|
2011-04-27 05:18:02 +00:00
|
|
|
%ul
|
|
|
|
- current_site.pages.latest_updated.minimal_attributes.each do |page|
|
|
|
|
%li
|
2011-10-31 23:44:23 +00:00
|
|
|
= link_to truncate(page.title, :length => 25), edit_page_url(page)
|
2011-04-27 05:18:02 +00:00
|
|
|
%span= time_ago_in_words(page.updated_at)
|
2010-05-24 00:18:23 +00:00
|
|
|
|
2011-04-27 05:18:02 +00:00
|
|
|
- each_content_type_menu_item do |content_type|
|
|
|
|
.header
|
2011-10-31 23:44:23 +00:00
|
|
|
%p= link_to t('locomotive.contents.index.new'), new_content_url(content_type.slug)
|
2011-06-25 16:25:31 +00:00
|
|
|
|
|
|
|
- if can? :manage, content_type
|
2011-10-31 23:44:23 +00:00
|
|
|
%p.edit= link_to t('locomotive.contents.index.edit'), edit_content_type_url(content_type)
|
2011-06-25 16:25:31 +00:00
|
|
|
|
2011-04-27 05:18:02 +00:00
|
|
|
.inner
|
2011-10-30 23:02:41 +00:00
|
|
|
%h2!= t('locomotive.contents.index.lastest_items')
|
2011-04-27 05:18:02 +00:00
|
|
|
%ul
|
2011-05-24 19:23:05 +00:00
|
|
|
- content_type.latest_updated_contents.each do |content|
|
2011-04-27 05:18:02 +00:00
|
|
|
%li
|
|
|
|
= link_to truncate(content.send(content_type.highlighted_field_name).to_s, :length => 20), edit_admin_content_path(content_type.slug, content)
|
|
|
|
%span= time_ago_in_words(content.updated_at)
|
2011-03-08 15:05:07 +00:00
|
|
|
|
2011-04-27 05:18:02 +00:00
|
|
|
- other_content_types do |content_types|
|
|
|
|
.inner
|
|
|
|
%ul.big-links
|
|
|
|
- content_types.each do |content_type|
|
|
|
|
%li
|
2011-10-31 23:44:23 +00:00
|
|
|
= link_to truncate(content_type.name, :length => 20), contents_url(content_type.slug)
|