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 CHANGED
@@ -1 +1 @@
1
- 1.0.2
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('Promoting #{resource}', true)"
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('Canceling scheduled promotion of #{resource}', true)"
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('Unpublishing #{resource}', true)"
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' => "Scheduling promotion of #{resource}"} do |f|
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
- The draft has been replaced with the live content.
51
+ = t('concurrent_draft.revert_draft_message')
52
52
  %br/
53
53
  %br/
54
- %em You must save the page for this to take effect.
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
- or
10
- = link_to t('cancel'), :action => 'index'
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
- # admin.send(view).edit.form_bottom.delete 'edit_buttons'
25
- # admin.send(view).edit.add :form_bottom, 'admin/edit_buttons'
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') }
@@ -1,11 +1,18 @@
1
1
  ---
2
2
  en:
3
- cancel_promotion: "Cancel promotion"
4
- draft_promotion_unscheduled: "Draft promotion unscheduled"
5
- promote_now: "Promote now"
6
- revert_draft: "Revert draft"
7
- schedule: "Schedule"
8
- scheduled: "Scheduled"
9
- schedule_promotion: "Schedule promotion"
10
- unpublish: "Unpublish"
11
- unpublished: "Unpublished"
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
- # 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
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
@@ -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.2"
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-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.1.gem",
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.6.2}
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
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-04 00:00:00 -07:00
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.1.gem
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.6.2
128
+ rubygems_version: 1.5.2
129
129
  signing_key:
130
130
  specification_version: 3
131
131
  summary: Concurrent Draft Extension for Radiant CMS