beef-pages 0.3.3 → 0.3.4
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
@@ -105,8 +105,10 @@ class Admin::PagesController < Admin::BaseController
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
def preview
|
109
|
-
|
108
|
+
def preview
|
109
|
+
@page = Page.find(params[:id])
|
110
|
+
@page.attributes = params[:page]
|
111
|
+
session[:page_preview] = @page.attributes
|
110
112
|
end
|
111
113
|
|
112
114
|
def move_up
|
@@ -14,6 +14,8 @@ class PagesController < ApplicationController
|
|
14
14
|
def preview
|
15
15
|
@page = Page.new(session[:page_preview])
|
16
16
|
@page.id = 0
|
17
|
+
@page.published_at = Time.now
|
18
|
+
@page.created_by = current_user if @page.created_by.nil?
|
17
19
|
session[:page_preview] = nil
|
18
20
|
render :template => "pages/templates/#{(@page.template || get_template_names.first)}"
|
19
21
|
end
|
@@ -6,10 +6,10 @@
|
|
6
6
|
<td><%= page.editor %><%= "<br />(#{page.updated_at.to_formatted_s(:short)})" unless page.updated_at.nil? %></td>
|
7
7
|
<td class="date"><%= page.published_at.to_formatted_s(:short) unless page.published_at.nil? %></td>
|
8
8
|
<td class="date"><%= page.published_to.to_formatted_s(:short) unless page.published_to.nil? %></td>
|
9
|
-
<td><%= link_to 'Show', page_path(page.permalink), :class => 'show' if page.published? %></td>
|
10
|
-
<td><%= link_to 'Add page', new_admin_page_page_path(page), :class => 'add', :title => "Add a sub-page under #{page.title}" %></td>
|
11
|
-
<td><%= link_to 'Edit', [:admin, page], :class => 'edit' %></td>
|
12
|
-
<td><%= link_to('Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete, :class => 'delete') unless page.lock_level >=1 || !current_user.admin? %></td>
|
13
|
-
<td><%= link_to 'up', move_up_admin_page_path(page), { :class => "page_up" } if current_user.admin? && !page.first? %></td>
|
14
|
-
<td><%= link_to 'down', move_down_admin_page_path(page), { :class => 'page_down' } if current_user.admin? && !page.last? %></td>
|
9
|
+
<td class="action"><%= link_to 'Show', page_path(page.permalink), :class => 'show' if page.published? %></td>
|
10
|
+
<td class="action"><%= link_to 'Add page', new_admin_page_page_path(page), :class => 'add', :title => "Add a sub-page under #{page.title}" %></td>
|
11
|
+
<td class="action"><%= link_to 'Edit', [:admin, page], :class => 'edit' %></td>
|
12
|
+
<td class="action"><%= link_to('Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete, :class => 'delete') unless page.lock_level >=1 || !current_user.admin? %></td>
|
13
|
+
<td class="action"><%= link_to 'up', move_up_admin_page_path(page), { :class => "page_up" } if current_user.admin? && !page.first? %></td>
|
14
|
+
<td class="action"><%= link_to 'down', move_down_admin_page_path(page), { :class => 'page_down' } if current_user.admin? && !page.last? %></td>
|
15
15
|
</tr>
|
data/pages.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pages}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Steve England"]
|
12
|
-
s.date = %q{2009-09-
|
12
|
+
s.date = %q{2009-09-24}
|
13
13
|
s.email = %q{steve@wearebeef.co.uk}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beef-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve England
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-24 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|