cms-fortress 1.0.4 → 1.0.5

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.4
1
+ 1.0.5
@@ -1,5 +1,5 @@
1
1
  body#comfy .body-wrapper {
2
- margin-top: 3em;
2
+ margin-top: 2.9em;
3
3
  }
4
4
 
5
5
  .navbar-container, .footer-container {
@@ -14,3 +14,7 @@ body#comfy form.formatted.form-horizontal .control-group .controls select.status
14
14
  body#comfy form.formatted.form-horizontal .control-group .controls input[type='text'].status-control {
15
15
  width: 30%;
16
16
  }
17
+
18
+ body#comfy .nav-height {
19
+
20
+ }
@@ -16,12 +16,16 @@ class Cms::PageWorkflow < ActiveRecord::Base
16
16
  }
17
17
  end
18
18
 
19
- def self.statuses_for_select
20
- self.statuses.map {|k,v| [v.to_s.titleize, k]}
19
+ def self.statuses_for_select(can_publish, can_review)
20
+ ret = [["Draft", 0]]
21
+ ret << ["Review", 1] if can_review
22
+ ret << ["Published", 3] if can_publish
23
+ # self.statuses.map {|k,v| [v.to_s.titleize, k]}
24
+ ret
21
25
  end
22
26
 
23
27
  def page_published?
24
- status_id.eql?(3) || status_id.eql?(2) && published_date < Time.now
28
+ (status_id.eql?(3) || status_id.eql?(2)) && published_date <= Date.today
25
29
  end
26
30
 
27
31
  end
@@ -1,8 +1,11 @@
1
+ - @page.page_workflow ||= Cms::PageWorkflow.new
2
+
1
3
  - content_for :right_column do
2
4
  #form-save.box
3
- %label.checkbox.inline
4
- %input{:type => 'checkbox'}
5
- = ::Cms::Page.human_attribute_name(:is_published)
5
+
6
+ /%label.checkbox.inline
7
+ / %input{:type => 'checkbox'}
8
+ / = ::Cms::Page.human_attribute_name(:is_published)
6
9
  %button.btn.btn-small.btn-primary.pull-right
7
10
  = render :partial => 'admin/cms/files/index'
8
11
 
@@ -31,9 +34,8 @@
31
34
  = render :partial => 'form_blocks'
32
35
 
33
36
  =# form.check_box :is_published, :label => t('.is_published')
34
- - @page.page_workflow ||= Cms::PageWorkflow.new
35
37
  = form.fields_for :page_workflow do |wf|
36
- = wf.select :status_id, Cms::PageWorkflow.statuses_for_select, {}, {class: "status-control"}
38
+ = wf.select :status_id, Cms::PageWorkflow.statuses_for_select(can?(:manage, 'contents.page.publish'), can?(:manage, 'contents.page.review')), {}, {class: "status-control"}
37
39
  = wf.text_field :published_date, class: "status-control", :data => {:utc_date => (@page.page_workflow.published_date.nil? ? Time.now : @page.page_workflow.published_date).strftime("%d %B, %Y") }
38
40
 
39
41
  = render 'admin/cms/partials/page_form_after', :object => form
@@ -1,5 +1,5 @@
1
1
  .navbar.navbar-inverse.navbar-fixed-top
2
- .navbar-inner
2
+ .navbar-inner.nav-height
3
3
  .navbar-container
4
4
  %button.btn.btn-navbar{'type' => 'button', 'data-toggle' => 'collapse', 'data-target' => '.nav-collapse'}
5
5
  %span.icon-bar
@@ -22,7 +22,7 @@
22
22
  %ul.nav.nav-pill.pull-right
23
23
  - if current_cms_fortress_user
24
24
  %li
25
- = link_to ":: #{ current_cms_fortress_user.email }", "#"
25
+ = link_to "#{ current_cms_fortress_user.email } ::", "#"
26
26
  %li
27
27
  = link_to "Logout", destroy_cms_fortress_user_session_path, :method => 'delete'
28
28
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cms-fortress"
8
- s.version = "1.0.4"
8
+ s.version = "1.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Melvin Sembrano"]
12
- s.date = "2013-12-11"
12
+ s.date = "2013-12-12"
13
13
  s.description = "Comfortable Mexican Sofa (CMS) - User and role management extension"
14
14
  s.email = "melvinsembrano@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cms-fortress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-11 00:00:00.000000000 Z
12
+ date: 2013-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -264,7 +264,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
264
  version: '0'
265
265
  segments:
266
266
  - 0
267
- hash: 3584437866439993559
267
+ hash: 2392009849821988709
268
268
  required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  none: false
270
270
  requirements: