radiant-concurrent_draft-extension 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/views/admin/_draft_controls.html.haml +13 -13
- data/app/views/admin/_edit_buttons.html.haml +16 -5
- data/concurrent_draft_extension.rb +2 -2
- data/config/locales/en.yml +16 -9
- data/lib/concurrent_draft/helper_extensions.rb +4 -4
- data/pkg/{radiant-concurrent_draft-extension-1.0.1.gem → radiant-concurrent_draft-extension-1.0.2.gem} +0 -0
- data/radiant-concurrent_draft-extension.gemspec +4 -4
- metadata +6 -6
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -8,50 +8,50 @@
|
|
8
8
|
%td.label Draft Controls >
|
9
9
|
%td.actions
|
10
10
|
- if @controller.model.has_draft_promotion_scheduled?
|
11
|
-
= link_to t('scheduled') + ' ' + @controller.model.draft_promotion_scheduled_at.strftime('%m/%d/%y %I:%M%p'), "#draft_options", :class => "action dropdown"
|
11
|
+
= link_to t('concurrent_draft.scheduled') + ' ' + @controller.model.draft_promotion_scheduled_at.strftime('%m/%d/%y %I:%M%p'), "#draft_options", :class => "action dropdown"
|
12
12
|
- elsif @controller.model.publishable? && ! @controller.model.published?
|
13
|
-
%em= link_to t('unpublished'), "#draft_options", :class => "action dropdown"
|
13
|
+
%em= link_to t('concurrent_draft.unpublished'), "#draft_options", :class => "action dropdown"
|
14
14
|
- else
|
15
|
-
%em= link_to t('draft_promotion_unscheduled'), "#draft_options", :class => "action dropdown"
|
15
|
+
%em= link_to t('concurrent_draft.draft_promotion_unscheduled'), "#draft_options", :class => "action dropdown"
|
16
16
|
%ul.menu{:id => "draft_options"}
|
17
17
|
- if @controller.authorized_user?
|
18
|
-
%li.schedule_draft= link_to image('clock') + ' ' + t('schedule_promotion'), '#schedule-draft-popup', :class => 'popup'
|
18
|
+
%li.schedule_draft= link_to image('clock') + ' ' + t('concurrent_draft.schedule_promotion'), '#schedule-draft-popup', :class => 'popup'
|
19
19
|
%li.publish
|
20
20
|
- form_for @controller.model, :url => {:action => 'schedule_draft_promotion', :commit => @controller.model_class.promote_now_text}, :html => {:method => :post} do |f|
|
21
|
-
= link_to_function image('tick') + ' ' + t('promote_now'), "$(this).up('form').submit();showStatus('
|
21
|
+
= link_to_function image('tick') + ' ' + t('concurrent_draft.promote_now'), "$(this).up('form').submit();showStatus('" + t('concurrent_draft.promoting', :resource => resource) + "', true)"
|
22
22
|
- if @controller.model.has_draft_promotion_scheduled?
|
23
23
|
%li.cancel
|
24
24
|
- form_for @controller.model, :url => {:action => 'schedule_draft_promotion', :commit => @controller.model_class.cancel_promotion_text}, :html => {:method => :post} do |f|
|
25
|
-
= link_to_function image('cancel') + ' ' + t('cancel_promotion'), "$(this).up('form').submit();showStatus('
|
25
|
+
= link_to_function image('cancel') + ' ' + t('concurrent_draft.cancel_promotion'), "$(this).up('form').submit();showStatus('" + t('concurrent_draft.canceling', :resource => resource) + "', true)"
|
26
26
|
- if @controller.model.publishable? && @controller.model.published?
|
27
27
|
%li.unpublish
|
28
28
|
- form_for @controller.model, :url => {:action => 'unpublish', :method => :post} do |f|
|
29
|
-
= link_to_function image('page_delete') + ' ' + t('unpublish'), "$(this).up('form').submit();showStatus('
|
29
|
+
= link_to_function image('page_delete') + ' ' + t('concurrent_draft.unpublish'), "$(this).up('form').submit();showStatus('" + t('concurrent_draft.unpublishing', :resource => resource) + "', true)"
|
30
30
|
- if @controller.model.has_draft_promoted?
|
31
|
-
%li.revert= link_to image('page_refresh') + ' ' + t('revert_draft'), '#revert-draft-popup', :class => 'popup'
|
31
|
+
%li.revert= link_to image('page_refresh') + ' ' + t('concurrent_draft.revert_draft'), '#revert-draft-popup', :class => 'popup'
|
32
32
|
|
33
33
|
- content_for :popups do
|
34
34
|
- if @controller.authorized_user?
|
35
35
|
.popup#schedule-draft-popup{:style => 'display:none'}
|
36
36
|
.popup_title
|
37
37
|
= image('clock')
|
38
|
-
= t('schedule_promotion')
|
39
|
-
- form_for @controller.model, :url => {:action => 'schedule_draft_promotion'}, :html => {:method => :post, 'data-onsubmit_status' =>
|
38
|
+
= t('concurrent_draft.schedule_promotion')
|
39
|
+
- form_for @controller.model, :url => {:action => 'schedule_draft_promotion'}, :html => {:method => :post, 'data-onsubmit_status' => t('concurrent_draft.scheduling', :resource => resource)} do |f|
|
40
40
|
%div
|
41
41
|
= f.datetime_select :draft_promotion_scheduled_at, :start_year => Date.today.year, :minute_step => 15, :twelve_hour => true
|
42
42
|
= hidden_field_tag :commit, @controller.model_class.schedule_promotion_text
|
43
43
|
%p{:style => 'text-align: right'}
|
44
|
-
%button{:type => 'submit'}= t('schedule')
|
44
|
+
%button{:type => 'submit'}= t('concurrent_draft.schedule')
|
45
45
|
= t('or')
|
46
46
|
= link_to_function t('cancel'), "$(this).closePopup();"
|
47
47
|
|
48
48
|
.popup#revert-draft-popup{:style => 'display:none'}
|
49
49
|
%p.revert
|
50
50
|
= image('page_refresh')
|
51
|
-
|
51
|
+
= t('concurrent_draft.revert_draft_message')
|
52
52
|
%br/
|
53
53
|
%br/
|
54
|
-
%em
|
54
|
+
%em= t('concurrent_draft.revert_draft_save_msg')
|
55
55
|
%span{:style => 'padding-left:8px'}= link_to_function 'OK', "$(this).closePopup();"
|
56
56
|
|
57
57
|
- content_for :page_css do
|
@@ -1,10 +1,21 @@
|
|
1
1
|
- if @controller.model.is_a?(Page)
|
2
2
|
- @buttons_partials.each do |partial|
|
3
|
-
= render :partial => partial
|
4
|
-
%p.buttons
|
5
|
-
= save_model_and_continue_editing_button(@controller.model)
|
3
|
+
= render :partial => partial, :locals => {:f => fields}
|
4
|
+
%p.buttons{:style=>"clear: left"}
|
6
5
|
= save_model_button(@controller.model)
|
6
|
+
= save_model_and_continue_editing_button(@controller.model)
|
7
7
|
- if @controller.authorized_user?
|
8
8
|
= save_model_and_promote_button(@controller.model)
|
9
|
-
|
10
|
-
|
9
|
+
- if @controller.model.is_a?(Page)
|
10
|
+
= submit_tag(t('preview', :default => 'Preview'), :class => 'button', :id => 'show-preview')
|
11
|
+
= t('or')
|
12
|
+
= link_to t('cancel'), :action => 'index'
|
13
|
+
- if @controller.model.is_a?(Page)
|
14
|
+
#preview_panel.fullcover.grey_out{:style => 'display: none;'}
|
15
|
+
%iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => '/loading-iframe.html', :frameborder => 0, :scrolling => "auto"}
|
16
|
+
.preview_tools
|
17
|
+
=submit_tag(t('buttons.save_changes'), :class => 'big save_changes')
|
18
|
+
=submit_tag(t('buttons.save_and_continue'), :class => 'big save_and_continue', :name => 'continue')
|
19
|
+
%span.info
|
20
|
+
= t('or')
|
21
|
+
=link_to(t('edit_page'),{}, :class => 'cancel')
|
@@ -21,8 +21,8 @@ class ConcurrentDraftExtension < Radiant::Extension
|
|
21
21
|
SiteController.send :include, ConcurrentDraft::SiteControllerExtensions
|
22
22
|
%w{page snippet layout}.each do |view|
|
23
23
|
admin.send(view).edit.add :main, "admin/draft_controls", :before => "edit_header"
|
24
|
-
|
25
|
-
|
24
|
+
admin.send(view).edit.form_bottom.delete 'edit_buttons'
|
25
|
+
admin.send(view).edit.add :form_bottom, 'admin/edit_buttons'
|
26
26
|
end
|
27
27
|
# admin.page.edit.add :extended_metadata, 'published_meta'
|
28
28
|
Time::DATE_FORMATS[:long_civilian] = lambda {|time| time.strftime("%B %d, %Y %I:%M%p").gsub(/(\s+)0(\d+)/, '\1\2') }
|
data/config/locales/en.yml
CHANGED
@@ -1,11 +1,18 @@
|
|
1
1
|
---
|
2
2
|
en:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
concurrent_draft:
|
4
|
+
cancel_promotion: "Cancel promotion"
|
5
|
+
canceling: "Canceling scheduled promotion of %{resource}"
|
6
|
+
draft_promotion_unscheduled: "Draft promotion unscheduled"
|
7
|
+
promote_now: "Promote now"
|
8
|
+
promoting: "Promoting %{resource}"
|
9
|
+
revert_draft: "Revert draft"
|
10
|
+
revert_draft_message: "The draft has been replaced with the live content."
|
11
|
+
revert_draft_save_message: "You must save the page for this to take effect."
|
12
|
+
schedule: "Schedule"
|
13
|
+
scheduled: "Scheduled"
|
14
|
+
schedule_promotion: "Schedule promotion"
|
15
|
+
scheduling: "Scheduling promotion of %{resource}"
|
16
|
+
unpublish: "Unpublish"
|
17
|
+
unpublished: "Unpublished"
|
18
|
+
unpublishing: "Unpublishing %{resource}"
|
@@ -32,8 +32,8 @@ module ConcurrentDraft::HelperExtensions
|
|
32
32
|
# submit_tag label, :name => 'continue', :class => 'button'
|
33
33
|
# end
|
34
34
|
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
def save_model_and_promote_button(_model)
|
36
|
+
label = _model.new_record? ? "Create" : "Save"
|
37
|
+
submit_tag "#{label} and Promote Now", :name => 'promote', :class => 'button'
|
38
|
+
end
|
39
39
|
end
|
Binary file
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-concurrent_draft-extension}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew vonderLuft", "Sean Cribbs"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-14}
|
13
13
|
s.description = %q{Enables draft versions of pages, snippets and layouts, which can be scheduled for promotion.}
|
14
14
|
s.email = %q{avonderluft@avlux.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
"lib/concurrent_draft/site_controller_extensions.rb",
|
43
43
|
"lib/concurrent_draft/tags.rb",
|
44
44
|
"lib/tasks/concurrent_draft_extension_tasks.rake",
|
45
|
-
"pkg/radiant-concurrent_draft-extension-1.0.
|
45
|
+
"pkg/radiant-concurrent_draft-extension-1.0.2.gem",
|
46
46
|
"public/images/admin/cancel.png",
|
47
47
|
"public/images/admin/clock.png",
|
48
48
|
"public/images/admin/page_delete.png",
|
@@ -70,7 +70,7 @@ Gem::Specification.new do |s|
|
|
70
70
|
]
|
71
71
|
s.homepage = %q{https://github.com/avonderluft/radiant-concurrent_draft-extension}
|
72
72
|
s.require_paths = ["lib"]
|
73
|
-
s.rubygems_version = %q{1.
|
73
|
+
s.rubygems_version = %q{1.5.2}
|
74
74
|
s.summary = %q{Concurrent Draft Extension for Radiant CMS}
|
75
75
|
s.test_files = [
|
76
76
|
"spec/controllers/admin_controller_extensions_spec.rb",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-concurrent_draft-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew vonderLuft
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-04-
|
19
|
+
date: 2011-04-14 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -70,7 +70,7 @@ files:
|
|
70
70
|
- lib/concurrent_draft/site_controller_extensions.rb
|
71
71
|
- lib/concurrent_draft/tags.rb
|
72
72
|
- lib/tasks/concurrent_draft_extension_tasks.rake
|
73
|
-
- pkg/radiant-concurrent_draft-extension-1.0.
|
73
|
+
- pkg/radiant-concurrent_draft-extension-1.0.2.gem
|
74
74
|
- public/images/admin/cancel.png
|
75
75
|
- public/images/admin/clock.png
|
76
76
|
- public/images/admin/page_delete.png
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
requirements: []
|
126
126
|
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 1.
|
128
|
+
rubygems_version: 1.5.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 3
|
131
131
|
summary: Concurrent Draft Extension for Radiant CMS
|