cms-fortress 1.1.8 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +82 -74
- data/VERSION +1 -1
- data/app/assets/javascripts/cms/fortress/media.js.coffee +2 -2
- data/app/assets/stylesheets/cms/fortress/admin_overrides.css +8 -14
- data/app/assets/stylesheets/cms/fortress/session.css +1 -3
- data/app/assets/stylesheets/cms/fortress/themes/wide.css.scss +5 -1
- data/app/controllers/cms/fortress/admin_controller.rb +4 -4
- data/app/controllers/cms/fortress/roles_controller.rb +5 -4
- data/app/controllers/cms/fortress/users_controller.rb +5 -3
- data/app/helpers/cms/fortress/application_helper.rb +7 -7
- data/app/models/cms/page_workflow.rb +1 -1
- data/app/models/cms_ability.rb +5 -5
- data/app/views/cms/fortress/roles/_form.html.haml +5 -18
- data/app/views/cms/fortress/roles/edit.html.haml +5 -1
- data/app/views/cms/fortress/roles/index.html.haml +4 -4
- data/app/views/cms/fortress/roles/new.html.haml +5 -1
- data/app/views/cms/fortress/roles/show.html.haml +3 -3
- data/app/views/cms/fortress/shared/_media_items.html.haml +6 -9
- data/app/views/cms/fortress/shared/_mediaboxes.html.haml +11 -9
- data/app/views/cms/fortress/shared/_menu.html.haml +43 -0
- data/app/views/cms/fortress/shared/_navbar.html.haml +10 -7
- data/app/views/cms/fortress/shared/_page_extend.html.haml +2 -2
- data/app/views/cms/fortress/shared/_page_extend_js.html.haml +1 -1
- data/app/views/cms/fortress/themes/wide/_body.html.haml +11 -9
- data/app/views/cms/fortress/themes/wide/{_admin_topnav.html.haml → _menu.html.haml} +1 -0
- data/app/views/cms/fortress/users/_form.html.haml +9 -34
- data/app/views/cms/fortress/users/edit.html.haml +7 -2
- data/app/views/cms/fortress/users/index.html.haml +6 -4
- data/app/views/cms/fortress/users/new.html.haml +5 -1
- data/app/views/cms/fortress/users/sessions/new.html.haml +12 -8
- data/app/views/{admin → comfy/admin}/cms/pages/_form.html.haml +16 -18
- data/app/views/comfy/admin/cms/partials/_body_before.html.haml +1 -0
- data/app/views/layouts/cms/fortress/session.html.haml +15 -0
- data/app/views/layouts/comfy/admin/cms/_body.html.haml +22 -0
- data/app/views/layouts/{admin → comfy/admin}/cms/_footer.html.haml +0 -0
- data/app/views/layouts/{admin → comfy/admin}/cms/_head.html.haml +10 -6
- data/app/views/layouts/{admin → comfy/admin}/cms/_left.html.haml +3 -6
- data/cms-fortress.gemspec +14 -19
- data/db/migrate/05_add_caching_info_to_pages.rb +1 -1
- data/lib/cms-fortress.rb +5 -5
- data/lib/cms/fortress/application_controller_methods.rb +6 -6
- data/lib/cms/fortress/content_renderer.rb +11 -1
- data/lib/cms/fortress/rails/engine.rb +14 -14
- metadata +14 -19
- data/app/assets/javascripts/cms/fortress/bootstrap.js +0 -2280
- data/app/assets/stylesheets/cms/fortress/bootstrap-responsive.css +0 -1109
- data/app/assets/stylesheets/cms/fortress/bootstrap.css +0 -6167
- data/app/views/admin/cms/partials/_body_before.html.haml +0 -1
- data/app/views/cms/fortress/shared/_admin_topnav.html.haml +0 -37
- data/app/views/layouts/admin/cms/.DS_Store +0 -0
- data/app/views/layouts/admin/cms/_body.html.haml +0 -22
- data/app/views/layouts/cms/fortress/default.html.erb +0 -96
- data/app/views/layouts/cms/fortress/session.html.erb +0 -31
@@ -23,13 +23,13 @@ module Cms
|
|
23
23
|
def back_path
|
24
24
|
case controller_name
|
25
25
|
when "pages"
|
26
|
-
|
26
|
+
comfy_admin_cms_site_pages_path
|
27
27
|
when "files"
|
28
|
-
|
28
|
+
comfy_admin_cms_site_files_path
|
29
29
|
when "layouts"
|
30
|
-
|
30
|
+
comfy_admin_cms_site_layouts_path
|
31
31
|
when "snippets"
|
32
|
-
|
32
|
+
comfy_admin_cms_site_snippets_path
|
33
33
|
else
|
34
34
|
""
|
35
35
|
end
|
@@ -50,14 +50,14 @@ module Cms
|
|
50
50
|
def image_item(m)
|
51
51
|
styles = {original: m.file.url}
|
52
52
|
m.file.styles.keys.each {|k,v| styles[k] = m.file.url(k) }
|
53
|
-
image_tag
|
53
|
+
link_to image_tag(m.file.url(:cms_thumb), alt: m.label, class: 'editor-image', data: styles), "#"
|
54
54
|
end
|
55
55
|
|
56
56
|
def image_styles(m)
|
57
57
|
links = []
|
58
|
-
links << link_to("
|
58
|
+
links << link_to("Original", m.file.url, class: 'label label-primary editor-image-style', target: '_blank', title: "Select original size")
|
59
59
|
i = 0
|
60
|
-
m.file.styles.each {|k,v| links << link_to("#{ i+=1 }", m.file.url(k), class: '
|
60
|
+
m.file.styles.each {|k,v| links << link_to("#{ i+=1 }", m.file.url(k), class: 'label label-primary editor-image-style', target: '_blank', title: "Select #{ k.to_s.titleize }") }
|
61
61
|
raw links.join(" ")
|
62
62
|
end
|
63
63
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Cms::PageWorkflow < ActiveRecord::Base
|
2
2
|
self.table_name = 'cms_page_workflows'
|
3
3
|
|
4
|
-
belongs_to :page, :foreign_key => 'cms_page_id'
|
4
|
+
belongs_to :page, :class_name => 'Comfy::Cms::Page', :foreign_key => 'cms_page_id'
|
5
5
|
|
6
6
|
after_save do |record|
|
7
7
|
record.page.update_attribute(:is_published, record.page_published?)
|
data/app/models/cms_ability.rb
CHANGED
@@ -26,17 +26,17 @@ class CmsAbility
|
|
26
26
|
when 'settings.roles'
|
27
27
|
can :manage, Cms::Fortress::Role
|
28
28
|
when 'settings.sites'
|
29
|
-
can :manage, Cms::Site
|
29
|
+
can :manage, Comfy::Cms::Site
|
30
30
|
when 'settings.users'
|
31
31
|
can :manage, Cms::Fortress::User
|
32
32
|
when 'contents.pages'
|
33
|
-
can :manage, Cms::Page
|
33
|
+
can :manage, Comfy::Cms::Page
|
34
34
|
when 'contents.files'
|
35
|
-
can :manage, Cms::File
|
35
|
+
can :manage, Comfy::Cms::File
|
36
36
|
when 'designs.layouts'
|
37
|
-
can :manage, Cms::Layout
|
37
|
+
can :manage, Comfy::Cms::Layout
|
38
38
|
when 'designs.snippets'
|
39
|
-
can :manage, Cms::Snippet
|
39
|
+
can :manage, Comfy::Cms::Snippet
|
40
40
|
else
|
41
41
|
setup_role(role_detail, user) if defined?(setup_role)
|
42
42
|
end
|
@@ -1,19 +1,6 @@
|
|
1
|
-
=
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
- @cms_fortress_role.errors.full_messages.each do |msg|
|
7
|
-
%li= msg
|
1
|
+
= form.text_field :name
|
2
|
+
= form.text_area :description, :rows => 2
|
3
|
+
|
4
|
+
= form.form_group :class => 'form-actions' do
|
5
|
+
= form.submit @cms_fortress_role.new_record? ? 'Create' : 'Update', :class => 'btn btn-primary'
|
8
6
|
|
9
|
-
.control-group
|
10
|
-
= f.label :name, :class => 'control-label'
|
11
|
-
.controls
|
12
|
-
= f.text_field :name, :class => 'input-large'
|
13
|
-
.control-group
|
14
|
-
= f.label :description, :class => 'control-label'
|
15
|
-
.controls
|
16
|
-
= f.text_area :description, :rows => 2, :class => 'input-xxlarge'
|
17
|
-
.form-actions
|
18
|
-
= f.submit 'Save', :class => 'btn btn-primary'
|
19
|
-
= link_to 'Cancel', cms_fortress_roles_path, :class => 'btn'
|
@@ -1,5 +1,9 @@
|
|
1
1
|
.page-header
|
2
|
+
.btn-group.pull-right
|
3
|
+
= link_to 'Cancel', cms_fortress_roles_path, :class => 'btn btn-default'
|
4
|
+
|
2
5
|
%h3= t('cms.fortress.roles.edit_title')
|
3
6
|
|
4
|
-
=
|
7
|
+
= comfy_form_for @cms_fortress_role, url: {action: :update} do |form|
|
8
|
+
= render form
|
5
9
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.page-header
|
2
|
-
= link_to t('cms.fortress.roles.new_link'), new_cms_fortress_role_path, :class => 'btn pull-right'
|
2
|
+
= link_to t('cms.fortress.roles.new_link'), new_cms_fortress_role_path, :class => 'btn btn-primary btn-sm pull-right'
|
3
3
|
%h2= t('cms.fortress.roles.title')
|
4
4
|
|
5
5
|
%table.table.table-hover.table-bordered.table-striped
|
@@ -14,7 +14,7 @@
|
|
14
14
|
%td= cms_fortress_role.description
|
15
15
|
%td
|
16
16
|
.btn-group.pull-right
|
17
|
-
= link_to 'Show Access Rights', cms_fortress_role, :class => 'btn btn-
|
18
|
-
= link_to 'Edit', edit_cms_fortress_role_path(cms_fortress_role), :class => 'btn btn-
|
19
|
-
= link_to 'Delete', cms_fortress_role, :method => :delete, :data => { :confirm => 'Are you sure?' }, :class => 'btn btn-
|
17
|
+
= link_to 'Show Access Rights', cms_fortress_role, :class => 'btn btn-sm btn-info'
|
18
|
+
= link_to 'Edit', edit_cms_fortress_role_path(cms_fortress_role), :class => 'btn btn-sm btn-default'
|
19
|
+
= link_to 'Delete', cms_fortress_role, :method => :delete, :data => { :confirm => 'Are you sure?' }, :class => 'btn btn-sm btn-danger'
|
20
20
|
|
@@ -1,5 +1,9 @@
|
|
1
1
|
.page-header
|
2
|
+
.btn-group.pull-right
|
3
|
+
= link_to 'Cancel', cms_fortress_roles_path, :class => 'btn btn-default'
|
4
|
+
|
2
5
|
%h3= t('cms.fortress.roles.new_title')
|
3
6
|
|
4
|
-
=
|
7
|
+
= comfy_form_for @cms_fortress_role, url: {action: :create} do |form|
|
8
|
+
= render form
|
5
9
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
.page-header
|
2
2
|
.btn-group.pull-right
|
3
3
|
=# link_to t('.edit'), edit_cms_fortress_role_path(@cms_fortress_role), :class => 'btn'
|
4
|
-
= link_to t('cms.fortress.roles.load'), refresh_cms_fortress_role_path(@cms_fortress_role), :class => 'btn', :method => :post
|
5
|
-
= link_to t('cms.fortress.roles.back'), cms_fortress_roles_path, :class => 'btn'
|
6
|
-
%
|
4
|
+
= link_to t('cms.fortress.roles.load'), refresh_cms_fortress_role_path(@cms_fortress_role), :class => 'btn btn-primary', :method => :post
|
5
|
+
= link_to t('cms.fortress.roles.back'), cms_fortress_roles_path, :class => 'btn btn-default'
|
6
|
+
%h3= "Role: #{ @cms_fortress_role.name }"
|
7
7
|
%p= @cms_fortress_role.description
|
8
8
|
|
9
9
|
|
@@ -1,19 +1,19 @@
|
|
1
|
-
|
1
|
+
.row
|
2
2
|
- media.each do |m|
|
3
3
|
- if type.eql?(:image)
|
4
|
-
|
5
|
-
.thumbnail
|
4
|
+
.col-xs-6.col-md-3
|
5
|
+
.thumbnail
|
6
6
|
= image_item(m)
|
7
7
|
.caption
|
8
8
|
%p
|
9
9
|
= image_styles(m)
|
10
10
|
|
11
11
|
- elsif type.eql?(:video)
|
12
|
-
|
13
|
-
.thumbnail
|
12
|
+
.col-xs-6.col-md-3
|
13
|
+
.thumbnail
|
14
14
|
|
15
15
|
%a.editor-video(href='#{ m.file.url }')
|
16
|
-
%video(width='128' height='90')
|
16
|
+
%video(width='128' height='90' data-video-title="#{ m.label }")
|
17
17
|
%source(src="#{ m.file.url }")
|
18
18
|
|
19
19
|
%p
|
@@ -21,8 +21,5 @@
|
|
21
21
|
%p
|
22
22
|
%small
|
23
23
|
= truncate m.description, length: 60
|
24
|
-
- else
|
25
|
-
|
26
|
-
|
27
24
|
|
28
25
|
|
@@ -1,13 +1,15 @@
|
|
1
|
-
#media-box-dialog.modal.
|
2
|
-
.modal-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
#media-box-dialog.modal.fade
|
2
|
+
.modal-dialog
|
3
|
+
.modal-content
|
4
|
+
.modal-header
|
5
|
+
%button(type="button" class="close" data-dismiss="modal" aria-hidden="true") x
|
6
|
+
%h5.title Image Selector
|
7
|
+
#modal-body.modal-body
|
8
|
+
=# render partial: 'cms/fortress/shared/media_items', locals: {media: media}
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
10
|
+
.modal-footer
|
11
|
+
%small.muted
|
12
|
+
Click the thumbnail to insert item to the selected editor.
|
11
13
|
|
12
14
|
:coffeescript
|
13
15
|
CmsFortress.media.imagesPath = "#{ media_files_path(:image) }"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
%nav.navbar.navbar-default(role="navigation")
|
2
|
+
.container-fluid
|
3
|
+
.navbar-header
|
4
|
+
%button.navbar-toggle(type="button" data-toggle="collapse" data-target="#main-nav")
|
5
|
+
%span.sr-only Toggle Navigation
|
6
|
+
%span.icon-bar
|
7
|
+
%span.icon-bar
|
8
|
+
%span.icon-bar
|
9
|
+
%a.navbar-brand(href="#")= t('cms.fortress.title')
|
10
|
+
|
11
|
+
.collapse.navbar-collapse#main-nav
|
12
|
+
%ul.nav.navbar-nav
|
13
|
+
- if default_theme?
|
14
|
+
- if @site && !@site.new_record?
|
15
|
+
- if Cms::Fortress.configuration.content_resources.any? {|resource| can? :view, "contents.#{resource[:name]}" }
|
16
|
+
= topnav_item t("cms.fortress.contents"), |
|
17
|
+
@site && !@site.new_record? ? comfy_admin_cms_site_pages_path(@site) : comfy_admin_cms_sites_pages_path, |
|
18
|
+
content_page?
|
19
|
+
|
20
|
+
- if Cms::Fortress.configuration.design_resources.any? {|resource| can? :view, "designs.#{resource[:name]}" }
|
21
|
+
= topnav_item t("cms.fortress.design"), |
|
22
|
+
@site && !@site.new_record? ? comfy_admin_cms_site_layouts_path(@site) : comfy_admin_cms_sites_pages_path, |
|
23
|
+
design_page?
|
24
|
+
|
25
|
+
- if Cms::Fortress.configuration.settings_resources.any? {|resource| can? :view, "settings.#{resource[:name]}" }
|
26
|
+
= topnav_item t("cms.fortress.settings"), comfy_admin_cms_sites_path, admin_page?
|
27
|
+
|
28
|
+
- else
|
29
|
+
= themed_partial('menu')
|
30
|
+
|
31
|
+
= render 'cms/fortress/admin/topnav'
|
32
|
+
|
33
|
+
- if current_cms_fortress_user
|
34
|
+
.btn-group.pull-right(style="margin-top: 8px;")
|
35
|
+
%button.btn.btn-default.dropdown-toggle(type="button" data-toggle="dropdown")
|
36
|
+
= current_cms_fortress_user.email
|
37
|
+
%span.caret
|
38
|
+
%ul.dropdown-menu(role="menu")
|
39
|
+
%li
|
40
|
+
= link_to "Logout", destroy_cms_fortress_user_session_path, :method => 'delete'
|
41
|
+
|
42
|
+
|
43
|
+
|
@@ -1,10 +1,13 @@
|
|
1
|
-
.navbar.navbar-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
%button.
|
1
|
+
%nav.navbar.navbar-default(role="navigation")
|
2
|
+
.container-fluid
|
3
|
+
.navbar-header
|
4
|
+
%button.navbar-toggle(type="button" data-toggle="collapse" data-target="#main-nav")
|
5
|
+
%span.sr-only Toggle Navigation
|
5
6
|
%span.icon-bar
|
6
7
|
%span.icon-bar
|
7
8
|
%span.icon-bar
|
8
|
-
%a.brand
|
9
|
-
|
10
|
-
|
9
|
+
%a.navbar-brand(href="#")= t('cms.fortress.title')
|
10
|
+
|
11
|
+
.collapse.navbar-collapse#main-nav
|
12
|
+
%ul.nav.navbar-nav
|
13
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- if Cms::Fortress.configuration.enable_page_workflow
|
2
|
-
= form.fields_for :page_workflow do |wf|
|
2
|
+
= form.fields_for :page_workflow, control_col: "col-sm-4" do |wf|
|
3
3
|
= wf.select :status_id, Cms::PageWorkflow.statuses_for_select(can?(:manage, 'contents.page.publish'), can?(:manage, 'contents.page.review')), {}, {class: "status-control"}
|
4
4
|
= wf.text_field :published_date, label: 'Published', class: "status-control", :data => {:utc_date => (@page.page_workflow.published_date.nil? ? Time.now : @page.page_workflow.published_date).strftime("%d %B, %Y") }
|
5
5
|
|
6
6
|
- if Cms::Fortress.configuration.enable_page_caching
|
7
|
-
= form.select :cached_timeout, Cms::PageWorkflow.cached_timeout_for_select, {label: 'Cached Timeout'}, {class: 'status-control'}
|
7
|
+
= form.select :cached_timeout, Cms::PageWorkflow.cached_timeout_for_select, {label: 'Cached Timeout', control_col: "col-sm-4"}, {class: 'status-control'}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
:coffeescript
|
2
2
|
dateControl = $("#page_page_workflow_attributes_published_date")
|
3
3
|
wkControl = $("#page_page_workflow_attributes_status_id")
|
4
|
-
parentControl = $("#page_page_workflow_attributes_published_date").parents(".
|
4
|
+
parentControl = $("#page_page_workflow_attributes_published_date").parents(".form-group:first")
|
5
5
|
|
6
6
|
dateControl.val(dateControl.data("utcDate")).datepicker(dateFormat: "d MM, yy")
|
7
7
|
|
@@ -1,17 +1,19 @@
|
|
1
|
-
.wide-body
|
2
|
-
= render :partial => 'layouts/admin/cms/center'
|
3
|
-
|
1
|
+
.container.wide-body
|
2
|
+
= render :partial => 'layouts/comfy/admin/cms/center'
|
3
|
+
|
4
|
+
= render :partial => 'layouts/comfy/admin/cms/footer'
|
4
5
|
|
5
6
|
:coffeescript
|
6
7
|
### iconize delete and edit links ###
|
7
|
-
$(".wide-body div.btn-group a:contains(Delete)").html("<i class='
|
8
|
-
$(".wide-body div.btn-group a:contains(Edit)").html("<i class='
|
9
|
-
$(".wide-body div.btn-group a:contains(Add Child)").html("<i class='
|
8
|
+
$(".wide-body div.btn-group a:contains(Delete)").html("<i class='glyphicon glyphicon-remove' />").attr("title", "Delete").tooltip(placement: 'left')
|
9
|
+
$(".wide-body div.btn-group a:contains(Edit)").html("<i class='glyphicon glyphicon-edit' />").attr("title", "Edit").tooltip(placement: 'left')
|
10
|
+
$(".wide-body div.btn-group a:contains(Add Child)").html("<i class='glyphicon glyphicon-plus' /> Child").attr("title", "Add Child").tooltip(placement: 'left')
|
10
11
|
|
11
|
-
$(".wide-body .page-header a:contains(Create New Page)").html("<i class='
|
12
|
+
$(".wide-body .page-header a:contains(Create New Page)").html("<i class='glyphicon glyphicon-file' /> New Page").attr("title", "Create New Page").tooltip(placement: 'left')
|
12
13
|
|
13
14
|
# New Page
|
14
15
|
index_path = "#{ back_path }"
|
15
16
|
$(".wide-body .page-header h2:contains(New), .wide-body .page-header h2:contains(Editing)").parent()
|
16
|
-
.prepend('<a class="btn pull-right" href="' + index_path + '" title="" data-original-title="Create New Page"><i class="
|
17
|
-
|
17
|
+
.prepend('<a class="btn btn-default pull-right" href="' + index_path + '" title="" data-original-title="Create New Page"><i class="glyphicon glyphicon-chevron-left"></i> Back</a> ')
|
18
|
+
|
19
|
+
$(".wide-body .page-header .btn").removeClass("pull-right").wrapAll("<div class='btn-group pull-right'></div>")
|
@@ -1,35 +1,10 @@
|
|
1
|
-
=
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.controls
|
11
|
-
= f.text_field :last_name
|
12
|
-
.control-group
|
13
|
-
= f.label :first_name, :class => 'control-label'
|
14
|
-
.controls
|
15
|
-
= f.text_field :first_name
|
16
|
-
.control-group
|
17
|
-
= f.label :email, :class => 'control-label'
|
18
|
-
.controls
|
19
|
-
= f.text_field :email
|
20
|
-
.control-group
|
21
|
-
= f.label :role_id, :class => 'control-label'
|
22
|
-
.controls
|
23
|
-
= f.select :role_id, Cms::Fortress::Role.all.collect {|role| [role.name, role.id]}
|
24
|
-
.control-group
|
25
|
-
= f.label :password, :class => 'control-label'
|
26
|
-
.controls
|
27
|
-
= f.password_field :password
|
28
|
-
.control-group
|
29
|
-
= f.label :password_confirmation, :class => 'control-label'
|
30
|
-
.controls
|
31
|
-
= f.password_field :password_confirmation
|
32
|
-
.form-actions
|
33
|
-
= f.submit 'Save', :class => 'btn btn-primary'
|
34
|
-
= link_to 'Cancel', cms_fortress_users_path, :class => 'btn'
|
1
|
+
= form.text_field :last_name
|
2
|
+
= form.text_field :first_name
|
3
|
+
= form.text_field :email
|
4
|
+
= form.select :role_id, Cms::Fortress::Role.all.collect {|role| [role.name, role.id]}
|
5
|
+
= form.password_field :password
|
6
|
+
= form.password_field :password_confirmation
|
7
|
+
|
8
|
+
= form.form_group :class => 'form-actions' do
|
9
|
+
= form.submit @cms_fortress_user.new_record? ? 'Create' : 'Update', :class => 'btn btn-primary'
|
35
10
|
|
@@ -1,5 +1,10 @@
|
|
1
1
|
.page-header
|
2
|
-
|
2
|
+
.btn-group.pull-right
|
3
|
+
= link_to "Cancel", cms_fortress_users_path, class: 'btn btn-default btn-sm'
|
4
|
+
|
5
|
+
%h3= t('cms.fortress.users.new_title')
|
6
|
+
|
7
|
+
= comfy_form_for @cms_fortress_user, url: {action: :update} do |form|
|
8
|
+
= render form
|
3
9
|
|
4
|
-
= render 'form'
|
5
10
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
.page-header
|
2
|
-
|
3
|
-
|
2
|
+
.btn-group.pull-right
|
3
|
+
= link_to t('cms.fortress.users.new_link'), new_cms_fortress_user_path, :class => 'btn btn-primary btn-sm'
|
4
|
+
|
5
|
+
%h3= t('cms.fortress.users.title')
|
4
6
|
|
5
7
|
%table.table.table-hover.table-bordered
|
6
8
|
%tr
|
@@ -19,6 +21,6 @@
|
|
19
21
|
%td= cms_fortress_user.role.name
|
20
22
|
%td
|
21
23
|
.btn-group.pull-right
|
22
|
-
= link_to 'Edit', edit_cms_fortress_user_path(cms_fortress_user), :class => 'btn btn-
|
23
|
-
= link_to 'Delete', cms_fortress_user, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-
|
24
|
+
= link_to 'Edit', edit_cms_fortress_user_path(cms_fortress_user), :class => 'btn btn-sm btn-default'
|
25
|
+
= link_to 'Delete', cms_fortress_user, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-sm btn-danger'
|
24
26
|
|
@@ -1,5 +1,9 @@
|
|
1
1
|
.page-header
|
2
|
+
.btn-group.pull-right
|
3
|
+
= link_to "Cancel", cms_fortress_users_path, class: 'btn btn-default btn-sm'
|
4
|
+
|
2
5
|
%h3= t('cms.fortress.users.new_title')
|
3
6
|
|
4
|
-
=
|
7
|
+
= comfy_form_for @cms_fortress_user, url: {action: :create} do |form|
|
8
|
+
= render form
|
5
9
|
|
@@ -1,11 +1,15 @@
|
|
1
1
|
= render :partial => 'cms/fortress/shared/navbar'
|
2
|
-
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => "form-signin" }) do |f|
|
3
|
-
%h3.form-signin-heading Sign
|
4
|
-
|
5
|
-
|
2
|
+
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:role => "form", :class => "form-signin" }) do |f|
|
3
|
+
%h3.form-signin-heading Sign In
|
4
|
+
.form-group
|
5
|
+
= f.email_field :email, :autofocus => true, :placeholder => "Email Address", :class => "form-control"
|
6
|
+
.form-group
|
7
|
+
= f.password_field :password, :placeholder => "Password", :class => "form-control"
|
8
|
+
|
6
9
|
- if devise_mapping.rememberable?
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
10
|
+
.checkbox
|
11
|
+
%label.checkbox
|
12
|
+
= f.check_box :remember_me
|
13
|
+
Remember me
|
14
|
+
= f.submit "Sign in", :class => "btn btn-primary btn-md"
|
11
15
|
= render "devise/shared/links"
|