engine/app/views/admin/shared/menu/_contents.html.haml

33 lines
1.3 KiB
Plaintext
Raw Normal View History

2011-07-25 21:07:32 +00:00
= admin_content_menu_item 'pages', admin_pages_url do
- if can? :manage, @page
.header
%p= link_to t('admin.pages.index.new'), new_admin_page_url
.inner
2012-01-19 01:30:12 +00:00
%h2!= t('admin.pages.index.latest_items')
%ul
- current_site.pages.latest_updated.minimal_attributes.each do |page|
%li
= link_to truncate(page.title, :length => 25), edit_admin_page_url(page)
%span= time_ago_in_words(page.updated_at)
- each_content_type_menu_item do |content_type|
.header
%p= link_to t('admin.contents.index.new'), new_admin_content_url(content_type.slug)
- if can? :manage, content_type
%p.edit= link_to t('admin.contents.index.edit'), edit_admin_content_type_url(content_type)
.inner
2012-01-19 01:30:12 +00:00
%h2!= t('admin.contents.index.latest_items')
%ul
2011-05-24 19:23:05 +00:00
- content_type.latest_updated_contents.each do |content|
%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)
- other_content_types do |content_types|
.inner
%ul.big-links
- content_types.each do |content_type|
%li
= link_to truncate(content_type.name, :length => 20), admin_contents_url(content_type.slug)