refinerycms-portfolio 0.9.8.rc3 → 0.9.8.rc4

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,7 @@ class PortfolioEntry < ActiveRecord::Base
6
6
  has_friendly_id :title, :use_slug => true
7
7
  acts_as_nested_set
8
8
  default_scope :order => 'lft ASC'
9
+ acts_as_indexed :fields => [:title, :image_titles, :image_names]
9
10
 
10
11
  has_many :images_portfolio_entries
11
12
  has_many :images, :through => :images_portfolio_entries, :order => 'images_portfolio_entries.position ASC'
@@ -20,6 +21,14 @@ class PortfolioEntry < ActiveRecord::Base
20
21
  end
21
22
  }.compact
22
23
  end
24
+
25
+ def image_titles
26
+ self.images.collect{|i| i.title}
27
+ end
28
+
29
+ def image_names
30
+ self.images.collect{|i| i.image_name}
31
+ end
23
32
 
24
33
  alias_attribute :content, :body
25
34
 
@@ -1,2 +1,5 @@
1
- <%= render :partial => 'list', :collection => @portfolio_entries %>
2
- <%= render :partial => "/shared/admin/sortable_list", :locals => {:continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)} %>
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'list', :collection => @portfolio_entries %>
3
+ </ul>
4
+ <%= render :partial => "/shared/admin/sortable_list",
5
+ :locals => {:continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)} %>
@@ -1,30 +1,43 @@
1
+ <div id='records' class='tree'>
2
+ <% if searching? %>
3
+ <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
4
+ <% end %>
5
+ <% if @portfolio_entries.any? %>
6
+ <%= render :partial => 'sortable_list' %>
7
+ <% else %>
8
+ <p>
9
+ <% unless searching? %>
10
+ <strong>
11
+ <%= t('.no_portfolio_entries_yet') %>
12
+ </strong>
13
+ <% else %>
14
+ <%= t('shared.admin.search.no_results') %>
15
+ <% end %>
16
+ </p>
17
+ <% end %>
18
+ </div>
1
19
  <div id='actions'>
2
- <h2><%= t('.actions') %></h2>
3
20
  <ul>
4
21
  <li>
5
- <%= link_to t('.create_new_portfolio_entry'), new_admin_portfolio_entry_url, :class => "add_icon" %>
22
+ <%= render :partial => "/shared/admin/search",
23
+ :locals => {:url => admin_portfolio_entries_url} %>
6
24
  </li>
7
- <% if PortfolioEntry.count > 1 %>
8
25
  <li>
9
- <%= link_to t('.reorder_portfolio'), "", :id => "reorder_action", :class => "reorder_icon" %>
10
- <%= link_to t('.reorder_portfolio_done'), "", :id => "reorder_action_done", :style => "display: none;", :class => "reorder_icon" %>
26
+ <%= link_to t('.create_new_portfolio_entry'), new_admin_portfolio_entry_url,
27
+ :class => "add_icon" %>
28
+ </li>
29
+ <% if @portfolio_entries.many? %>
30
+ <li>
31
+ <%= link_to t('.reorder_portfolio'), "",
32
+ :id => "reorder_action",
33
+ :class => "reorder_icon" %>
34
+ <%= link_to t('.reorder_portfolio_done'), "",
35
+ :id => "reorder_action_done",
36
+ :style => "display: none;",
37
+ :class => "reorder_icon" %>
11
38
  </li>
12
39
  <% end %>
13
40
  </ul>
14
41
  </div>
15
- <div id='records' class='tree'>
16
- <% if @portfolio_entries.any? %>
17
- <h2><%= t('.portfolio') %></h2>
18
- <ul id='sortable_list'>
19
- <%= render :partial => 'sortable_list' %>
20
- </ul>
21
- <% else %>
22
- <p>
23
- <strong>
24
- <%= t('.no_portfolio_entries_yet') %>
25
- </strong>
26
- </p>
27
- <% end %>
28
- </div>
29
42
  <%= render :partial => "/shared/admin/make_sortable",
30
- :locals => { :tree => ::Refinery::Portfolio.multi_level? } if PortfolioEntry.count > 1 %>
43
+ :locals => { :tree => ::Refinery::Portfolio.multi_level? } if @portfolio_entries.many? %>
@@ -0,0 +1,26 @@
1
+ nl:
2
+ plugins:
3
+ portfolio:
4
+ title: Portfolio
5
+ description: Beheer een portfolio in Refinery CMS
6
+ admin:
7
+ portfolio:
8
+ index:
9
+ actions: Acties
10
+ create_new_portfolio_entry: "Maak een nieuw Portfolio item"
11
+ reorder_portfolio: "Herschikken portfolio"
12
+ reorder_portfolio_done: "Klaar met herschikken portfolio"
13
+ portfolio: Portfolio
14
+ no_portfolio_entries_yet: 'Er bestaan nog geen portfolio items. Klik "Maak een nieuw Portfolio item" om een eerste portfolio toe te voegen.'
15
+ list:
16
+ view_live: "Preview dit item <br/><em>(opent in nieuw venster)</em>"
17
+ edit_this_entry: "Bewerk dit item"
18
+ move_this_entry_up: "Verplaats dit item een niveau hoger"
19
+ confirm_delete_entry_title: "Verwijder dit item voorgoed"
20
+ form:
21
+ title: Titel
22
+ images: Afbeeldingen
23
+ add: Toevoegen
24
+ add_another_image: "Voeg afbeelding toe"
25
+ content: Inhoud
26
+ parent: Ouder
@@ -1,7 +1,7 @@
1
1
  module Refinery
2
2
  module Portfolio
3
3
  def self.version
4
- %q{0.9.8.rc3}
4
+ %q{0.9.8.rc4}
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-portfolio
3
3
  version: !ruby/object:Gem::Version
4
- hash: 977940516
4
+ hash: 977940517
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 8
10
- - rc3
11
- version: 0.9.8.rc3
10
+ - rc4
11
+ version: 0.9.8.rc4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Resolve Digital
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-27 00:00:00 +13:00
19
+ date: 2010-10-05 00:00:00 +13:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -62,6 +62,7 @@ files:
62
62
  - app/views/portfolio/show.html.erb
63
63
  - config/locales/en.yml
64
64
  - config/locales/lv.yml
65
+ - config/locales/nl.yml
65
66
  - config/locales/pt-BR.yml
66
67
  - config/locales/sl.yml
67
68
  - config/routes.rb