ecm_news 0.1.5.pre → 0.1.7.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,11 @@
1
1
  module Ecm::NewsHelper
2
2
  def render_news(count = nil)
3
3
  count = count ||= Ecm::News::Configuration.render_news_default_count
4
- items = Ecm::News::Item.published.where(:locale => I18n.locale.to_s).limit(count)
4
+ items = Ecm::News::Item.published.where(:locale => I18n.locale.to_s).order("published_at DESC").limit(count)
5
5
  return I18n.t('ecm.news.item.messages.empty') if items.empty?
6
6
  output = ''
7
- output << render(:partial => 'ecm/news/items/item_preview', :collection => items, :as => :item)
8
- output << link_to(ecm_news_items_path, :class => 'btn list-link') do
9
- content_tag(:i, "", :class => 'icon-list') + " " +
10
- I18n.t('ecm.news.item.actions.all')
11
- end
7
+ output << render(:partial => 'ecm/news/items/item_for_render_news', :collection => items, :as => :item)
8
+ output << render(:partial => 'ecm/news/render_news_footer')
12
9
  return output.html_safe
13
10
  end
14
11
  end
@@ -0,0 +1,4 @@
1
+ <%= link_to(ecm_news_items_path, :class => 'btn list-link') do %>
2
+ <i class="icon-list"></i>&nbsp;<%= I18n.t('ecm.news.item.actions.all') %>
3
+ <% end %>
4
+
@@ -5,7 +5,7 @@
5
5
  <p class="item-body"><%= truncate(mu(item, :body), :length => 250, :separator => ' ').html_safe %></p>
6
6
 
7
7
 
8
- <%= link_to(item, :class => 'btn more-link') do %><i class="icon-arrow-right"></i> <%= I18n.t('ecm.news.item.actions.more') %><% end %>
8
+ <%= link_to(item, :class => 'btn more-link') do %><i class="icon-arrow-right"></i> <%= I18n.t('ecm.news.item.actions.more') %><% end %>
9
9
 
10
10
  <hr />
11
11
  </div>
@@ -0,0 +1,11 @@
1
+ <div class="news-item small-preview">
2
+ <h2 class="item-title"><%= item.title %></h2>
3
+ <small class="item-published_at"><%= I18n.l(item.published_at) %></small>
4
+
5
+ <p class="item-body"><%= truncate(mu(item, :body), :length => 250, :separator => ' ').html_safe %></p>
6
+
7
+
8
+ <%= link_to(item, :class => 'btn more-link') do %><i class="icon-arrow-right"></i> <%= I18n.t('ecm.news.item.actions.more') %><% end %>
9
+
10
+ <hr />
11
+ </div>
@@ -1,5 +1,5 @@
1
1
  <h1><%= I18n.t('ecm.news.news') %></h1>
2
2
 
3
- <%= render :partial => 'item_preview', :collection => @items, :as => :item %>
3
+ <%= render :partial => 'item_for_preview', :collection => @items, :as => :item %>
4
4
 
5
5
  <%= paginate @items, :theme => 'twitter-bootstrap' %>
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module News
3
- VERSION = "0.1.5.pre"
3
+ VERSION = "0.1.7.pre"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_news
3
3
  version: !ruby/object:Gem::Version
4
- hash: 961915992
4
+ hash: 961915984
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
9
+ - 7
10
10
  - pre
11
- version: 0.1.5.pre
11
+ version: 0.1.7.pre
12
12
  platform: ruby
13
13
  authors:
14
14
  - Roberto Vasquez Angel
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-10-01 00:00:00 Z
19
+ date: 2012-11-29 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails
@@ -306,10 +306,12 @@ files:
306
306
  - app/controllers/ecm/news/items_controller.rb
307
307
  - app/helpers/ecm/news_helper.rb
308
308
  - app/helpers/markup_helper.rb
309
+ - app/views/ecm/news/_render_news_footer.html.erb
309
310
  - app/views/ecm/news/items/_item.html.erb
310
- - app/views/ecm/news/items/_item_preview.html.erb
311
311
  - app/views/ecm/news/items/show.html.erb
312
312
  - app/views/ecm/news/items/index.html.erb
313
+ - app/views/ecm/news/items/_item_for_preview.html.erb
314
+ - app/views/ecm/news/items/_item_for_render_news.html.erb
313
315
  - app/models/ecm/news.rb
314
316
  - app/models/ecm/news/item.rb
315
317
  - config/locales/ecm.news.item.de.yml