refinerycms-portfolio 0.9.8.rc5 → 0.9.8.rc6
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/portfolio_controller.rb +6 -2
- data/app/models/portfolio_entry.rb +1 -0
- data/app/views/admin/portfolio/_form.html.erb +11 -0
- data/app/views/portfolio/index.html.erb +14 -0
- data/app/views/portfolio/show.html.erb +1 -1
- data/lib/generators/{portfolio/portfolio_generator.rb → refinerycms_portfolio/refinerycms_portfolio_generator.rb} +1 -1
- data/lib/generators/{portfolio → refinerycms_portfolio}/templates/db/migrate/migration_number_create_structure_for_portfolio.rb +1 -0
- data/lib/generators/{portfolio → refinerycms_portfolio}/templates/db/seeds/portfolio.rb +0 -0
- data/lib/portfolio/version.rb +1 -1
- data/readme.md +2 -2
- metadata +8 -7
@@ -3,8 +3,12 @@ class PortfolioController < ApplicationController
|
|
3
3
|
before_filter :load_page, :only => [:index, :show, :empty]
|
4
4
|
|
5
5
|
def index
|
6
|
-
if
|
7
|
-
|
6
|
+
if RefinerySetting.find_or_set(:portfolio_has_no_index, true)
|
7
|
+
if (first_entry = PortfolioEntry.where(:parent_id => nil).first).present?
|
8
|
+
redirect_to portfolio_url(first_entry)
|
9
|
+
end
|
10
|
+
else
|
11
|
+
@portfolio_entries = PortfolioEntry.all
|
8
12
|
end
|
9
13
|
end
|
10
14
|
|
@@ -13,6 +13,17 @@
|
|
13
13
|
<%= f.required_label t('.title') %>
|
14
14
|
<%= f.text_field :title, :class => "larger widest" %>
|
15
15
|
</div>
|
16
|
+
<% unless RefinerySetting.find_or_set(:portfolio_has_no_index, true)%>
|
17
|
+
<div class='field'>
|
18
|
+
<%= f.label :image -%>
|
19
|
+
<%= render :partial => "/shared/admin/image_picker", :locals => {
|
20
|
+
:f => f,
|
21
|
+
:field => :title_image_id,
|
22
|
+
:image => @portfolio_entry.title_image,
|
23
|
+
:toggle_image_display => false
|
24
|
+
} %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
16
27
|
<div class='field clearfix'>
|
17
28
|
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content'>
|
18
29
|
<ul id='page_parts'>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% content_for :body_content_title do -%>
|
2
|
+
Portfolios
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<% content_for :body_content_left do -%>
|
6
|
+
<% @portfolio_entries.each do | portfolio | -%>
|
7
|
+
<span>
|
8
|
+
<%= link_to raw("#{image_fu portfolio.title_image, '200x200' unless portfolio.title_image.nil?} #{portfolio.title}"),
|
9
|
+
portfolio_path(portfolio) %>
|
10
|
+
</span>
|
11
|
+
<% end -%>
|
12
|
+
<% end -%>
|
13
|
+
|
14
|
+
<%= render :partial => '/shared/content_page' -%>
|
@@ -37,6 +37,6 @@
|
|
37
37
|
<%= jquery_include_tags(:include_ui => false) %>
|
38
38
|
<%= javascript_include_tag 'portfolio' %>
|
39
39
|
<script type='text/javascript'>
|
40
|
-
var portfolio_entry_url = "<%= portfolio_project_url(@master_entry,
|
40
|
+
var portfolio_entry_url = "<%= portfolio_project_url(@master_entry, @portfolio_entry) if ::Refinery::Portfolio.multi_level? %>";
|
41
41
|
</script>
|
42
42
|
<% end %>
|
File without changes
|
data/lib/portfolio/version.rb
CHANGED
data/readme.md
CHANGED
@@ -6,11 +6,11 @@ By: [Resolve Digital](http://www.resolvedigital.com)
|
|
6
6
|
|
7
7
|
Open your ``Gemfile`` and add this line to the bottom:
|
8
8
|
|
9
|
-
gem 'refinerycms-portfolio', '>= 0.9.8.
|
9
|
+
gem 'refinerycms-portfolio', '>= 0.9.8.rc5'
|
10
10
|
|
11
11
|
Now run ``bundle install`` and once bundler has installed the gem run:
|
12
12
|
|
13
|
-
rails generate
|
13
|
+
rails generate refinerycms_portfolio
|
14
14
|
rake db:migrate
|
15
15
|
|
16
16
|
Now, restart your web server and enjoy.
|
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:
|
4
|
+
hash: 977940515
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 8
|
10
|
-
-
|
11
|
-
version: 0.9.8.
|
10
|
+
- rc6
|
11
|
+
version: 0.9.8.rc6
|
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-10-
|
19
|
+
date: 2010-10-20 00:00:00 +13:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- app/views/admin/portfolio/new.html.erb
|
60
60
|
- app/views/portfolio/_main_image.html.erb
|
61
61
|
- app/views/portfolio/empty.html.erb
|
62
|
+
- app/views/portfolio/index.html.erb
|
62
63
|
- app/views/portfolio/show.html.erb
|
63
64
|
- config/locales/en.yml
|
64
65
|
- config/locales/lv.yml
|
@@ -67,9 +68,9 @@ files:
|
|
67
68
|
- config/locales/sl.yml
|
68
69
|
- config/routes.rb
|
69
70
|
- lib/gemspec.rb
|
70
|
-
- lib/generators/
|
71
|
-
- lib/generators/
|
72
|
-
- lib/generators/
|
71
|
+
- lib/generators/refinerycms_portfolio/refinerycms_portfolio_generator.rb
|
72
|
+
- lib/generators/refinerycms_portfolio/templates/db/migrate/migration_number_create_structure_for_portfolio.rb
|
73
|
+
- lib/generators/refinerycms_portfolio/templates/db/seeds/portfolio.rb
|
73
74
|
- lib/portfolio/version.rb
|
74
75
|
- lib/portfolio.rb
|
75
76
|
- lib/refinerycms-portfolio.rb
|