Sha256: 9ecc89ef7691125a81aae516f1768ed337de31b9d32ec94aa5ec72c6323c78f2

Contents?: true

Size: 1.92 KB

Versions: 18

Compression:

Stored size: 1.92 KB

Contents

= submenu_entry 'pages', pages_path do
  .wrapper
    - if can? :manage, @page
      .header
        %p
          = link_to new_page_path do
            %i.icon-plus
            = t('locomotive.pages.index.new')
    .inner
      %h2!= t('locomotive.pages.index.latest_entries')
      %ul
        - current_site.pages.unscoped.latest_updated.minimal_attributes.each do |page|
          %li
            %i.icon-chevron-right
            = link_to truncate(page.title, length: 25), edit_page_path(page)
            %span= time_ago_in_words(page.updated_at)

- each_content_type do |menu_item|
  -if menu_item.is_a?(Array)
    - content_types = menu_item
    = submenu_entry '...', '#', i18n: false do
      .wrapper
        .inner
          %ul.big-links
            - content_types.each do |content_type|
              %li
                = link_to truncate(content_type.name, length: 20), content_entries_path(content_type.slug)
  - else
    - content_type = menu_item
    = submenu_entry truncate(content_type.name, length: 15), content_entries_path(content_type.slug), i18n: false, css: "#{'on' if is_content_type_selected(content_type)}" do
      .wrapper
        .header
          %p
            = link_to new_content_entry_path(content_type.slug) do
              %i.icon-plus
              = t('locomotive.content_entries.index.new')

          - if can? :manage, content_type
            %p.edit
              = link_to edit_content_type_path(content_type) do
                %i.icon-pencil
                = t('locomotive.content_types.index.edit')

        .inner
          %h2!= t('locomotive.content_entries.index.latest_entries')
          %ul
            - content_type.entries.latest_updated.each do |entry|
              %li
                %i.icon-chevron-right
                = link_to truncate(entry._label(content_type), length: 20), edit_content_entry_path(content_type.slug, entry)
                %span= time_ago_in_words(entry.updated_at)

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.6 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.6.rc2 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.6.rc1 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.5 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.4 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.3 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.2 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.1 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.0 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.0.rc3 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.0.rc2 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.5.0.rc1 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.4.1 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.4.0 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.3.1 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.3.0 app/views/locomotive/shared/menu/_contents.html.haml
locomotive_cms-2.2.3 app/views/locomotive/shared/menu/_contents.html.haml