portfolio 0.9.1 → 0.9.1.5
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.
data/README
CHANGED
@@ -5,10 +5,42 @@ http://github.com/resolve/Refinery
|
|
5
5
|
By: Resolve Digital Ltd
|
6
6
|
http://www.resolvedigital.com
|
7
7
|
|
8
|
+
Plugin Installation
|
9
|
+
===================
|
10
|
+
|
8
11
|
Just 'git clone' Refinery, install this as a plugin using:
|
9
12
|
script/plugin install git://github.com/resolve/portfolio.git
|
10
13
|
|
11
14
|
Then run:
|
12
15
|
rake portfolio:install
|
13
16
|
|
17
|
+
..and follow the instructions!
|
18
|
+
|
19
|
+
Gem Installation
|
20
|
+
================
|
21
|
+
|
22
|
+
METHOD ONE
|
23
|
+
===========
|
24
|
+
Just install the gem 'portfolio' with the command:
|
25
|
+
gem install portfolio --source http://gemcutter.org
|
26
|
+
|
27
|
+
Then run:
|
28
|
+
portfolio-install /path/to/your/refinery/application
|
29
|
+
|
30
|
+
Then place in your config/environment.rb file after other all other Refinery gem calls:
|
31
|
+
config.gem "portfolio", :version => ">= 0.9.1.5", :lib => "portfolio", :source => "http://gemcutter.org"
|
32
|
+
|
33
|
+
..and follow the instructions!
|
34
|
+
|
35
|
+
METHOD TWO
|
36
|
+
===========
|
37
|
+
Place in your config/environment.rb file after other all other Refinery gem calls:
|
38
|
+
config.gem "portfolio", :version => ">= 0.9.1.5", :lib => "portfolio", :source => "http://gemcutter.org"
|
39
|
+
|
40
|
+
Then run in your application's directory:
|
41
|
+
rake gems:install
|
42
|
+
|
43
|
+
Then run:
|
44
|
+
portfolio-install /path/to/your/refinery/application
|
45
|
+
|
14
46
|
..and follow the instructions!
|
@@ -3,7 +3,7 @@ class PortfolioController < ApplicationController
|
|
3
3
|
before_filter :load_page, :only => [:index, :show, :empty]
|
4
4
|
|
5
5
|
def index
|
6
|
-
redirect_to portfolio_url(PortfolioEntry.
|
6
|
+
redirect_to portfolio_url(PortfolioEntry.find_by_parent_id(nil, :order => "position ASC")) rescue error_404
|
7
7
|
end
|
8
8
|
|
9
9
|
def show
|
@@ -11,7 +11,7 @@ class PortfolioController < ApplicationController
|
|
11
11
|
if params[:id]
|
12
12
|
@master_entry = PortfolioEntry.find(params[:id])
|
13
13
|
else
|
14
|
-
@master_entry = PortfolioEntry.
|
14
|
+
@master_entry = PortfolioEntry.find_by_parent_id(nil, :order => "position ASC")
|
15
15
|
end
|
16
16
|
|
17
17
|
if params[:portfolio_id]
|
@@ -37,7 +37,7 @@ class PortfolioController < ApplicationController
|
|
37
37
|
protected
|
38
38
|
|
39
39
|
def load_page
|
40
|
-
@page = Page.find_by_link_url('/portfolio', :include => [:parts
|
40
|
+
@page = Page.find_by_link_url('/portfolio', :include => [:parts])
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
@@ -2,9 +2,10 @@ class PortfolioEntry < ActiveRecord::Base
|
|
2
2
|
|
3
3
|
validates_presence_of :title
|
4
4
|
|
5
|
+
# call to gems included in refinery.
|
5
6
|
has_friendly_id :title, :use_slug => true, :strip_diacritics => true
|
6
|
-
|
7
7
|
acts_as_tree :order => "position"
|
8
|
+
|
8
9
|
has_and_belongs_to_many :images
|
9
10
|
|
10
11
|
def content
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<% insert_args = "?thickbox=true&modal=true&titlebar=true&field=portfolio_entry_image_id&callback=image_added&update_image=current_portfolio_entry_image&thumbnail=grid&KeepThis=true&TB_iframe=true&width=950&height=510" %>
|
2
1
|
<%= error_messages_for :portfolio_entry %>
|
3
2
|
<% form_for [:admin, @portfolio_entry] do |f| %>
|
4
3
|
<div class='field'>
|
@@ -8,7 +7,7 @@
|
|
8
7
|
<div class='field images_field'>
|
9
8
|
<span class='clearfix label_inline_with_link'>
|
10
9
|
<%= label_tag('portfolio_entry_image_ids', 'Images') %>
|
11
|
-
<%= link_to "#{refinery_icon_tag "add.png"} Add", "#{insert_admin_images_url}
|
10
|
+
<%= link_to "#{refinery_icon_tag "add.png"} Add", "#{insert_admin_images_url}?thickbox=true&modal=true&titlebar=true&field=portfolio_entry_image_id&callback=image_added&update_image=current_portfolio_entry_image&thumbnail=grid&KeepThis=true&TB_iframe=true&width=950&height=510", :class => "thickbox", :name => "Add Another Image", :id => "add_image_link" %>
|
12
11
|
</span>
|
13
12
|
<ul id='portfolio_images' class='clearfix portfolio_entry_images'>
|
14
13
|
<% @portfolio_entry.images.each do |image| %>
|
data/bin/portfolio-install
CHANGED
@@ -14,8 +14,8 @@ unless RAILS_ROOT.nil? or RAILS_ROOT.length == 0
|
|
14
14
|
{:from => ["public", "javascripts"],:to => ["public", "javascripts"],:filename => "portfolio.js"}
|
15
15
|
]
|
16
16
|
copies.each do |copy|
|
17
|
+
copy_from = File.join(PORTFOLIO_ROOT, copy[:from], copy[:filename])
|
17
18
|
copy_to = File.join(RAILS_ROOT, copy[:to], copy[:filename])
|
18
|
-
copy_from = File.join(PORTFOLIO_ROOT, copy[:from], copy[:filename])
|
19
19
|
unless File.exists?(copy_to)
|
20
20
|
FileUtils::copy_file copy_from, copy_to
|
21
21
|
else
|
@@ -42,7 +42,7 @@ image_added = function() {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
new_list_item = new Element("li").addClassName("empty");
|
45
|
-
img = new Element("img", {id: 'current_portfolio_entry_image', src: '', alt: ''});
|
45
|
+
img = new Element("img", {id: 'current_portfolio_entry_image', src: '', alt: '', style: 'display:none'});
|
46
46
|
|
47
47
|
hidden_id = new Element("input", {'type': 'hidden', 'id' : "portfolio_entry_image_id", 'name':'portfolio_entry[image_ids][]'});
|
48
48
|
|
data/{init.rb → rails/init.rb}
RENAMED
@@ -2,7 +2,8 @@ Refinery::Plugin.register do |plugin|
|
|
2
2
|
plugin.directory = directory
|
3
3
|
plugin.title = "Portfolio"
|
4
4
|
plugin.description = "Manage a portfolio"
|
5
|
-
plugin.
|
5
|
+
plugin.url = "/admin/#{plugin.title.downcase}"
|
6
|
+
plugin.version = '0.9.1.5'
|
6
7
|
plugin.menu_match = /admin\/((portfolio)|(portfolio_entries))/
|
7
8
|
plugin.activity = {
|
8
9
|
:class => PortfolioEntry,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: portfolio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.1
|
4
|
+
version: 0.9.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Resolve Digital
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-10-
|
13
|
+
date: 2009-10-09 00:00:00 +13:00
|
14
14
|
default_executable: portfolio-install
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -42,11 +42,11 @@ files:
|
|
42
42
|
- bin/portfolio-install
|
43
43
|
- config/routes.rb
|
44
44
|
- db/migrate/20090917224823_create_portfolio_structure.rb
|
45
|
-
- init.rb
|
46
45
|
- lib/portfolio.rb
|
47
46
|
- lib/tasks/portfolio.rake
|
48
47
|
- public/javascripts/portfolio.js
|
49
48
|
- public/stylesheets/portfolio.css
|
49
|
+
- rails/init.rb
|
50
50
|
has_rdoc: true
|
51
51
|
homepage: http://refinerycms.com
|
52
52
|
licenses: []
|