Sha256: 0d058b61c8469eea05dd2c9a41eb560906674402f274c45cbe766a854da6d31c

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

<% 
clas   = (opts.dig(:settings, opts[:element], 'clas') || 'news') + ' list'
small  = (opts.dig(:settings, opts[:element], 'small') || 1).to_i
medium = (opts.dig(:settings, opts[:element], 'medium') || small).to_i
large  = (opts.dig(:settings, opts[:element], 'large') || medium).to_i
paging = opts.dig(:settings, opts[:element], 'paging') == '1' 
link   = opts.dig(:settings, opts[:element], 'link') || @page.subject_link
title  = opts.dig(:settings, opts[:element], 'title') || t('dc_news.news')
%>

<div class="<%= clas %>">
  <%= news_settings(opts) %>
  <% unless title == '-'  %><h1><%= title %></h1><% end %>
  <%= if opts[:edit_mode] > 1 
    dc_link_for_create(controller: 'cmsedit', table: 'dc_news', title: 'dc_blog.new_entry' )
  end %>
  
  <% documents.each do |document| %>
    <div class="document">
      <%= dc_pretty_date(document.created_at) %>
      <%= link_to( { path: "#{link}/#{document.link}" } ) do %>
        <h2><%= document.subject %></h2>
      <% end %>
    </div>
  <% end %>
  <% if paging %><div class="paginate"><%= paginate documents %></div><% end %>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
drg_blog_news_forum-0.6.5 app/views/dc_news/_list.html.erb