browsercms 4.0.0.alpha → 4.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/bcms/ckeditor.js +1 -0
- data/app/assets/javascripts/bcms/{ckeditor_load.js.erb → ckeditor_load.js} +4 -1
- data/app/assets/javascripts/bcms/ckeditor_standard_config.js +1 -13
- data/app/assets/javascripts/cms/application.js +1 -0
- data/app/assets/javascripts/cms/{attachment_manager.js.erb → attachment_manager.js} +19 -13
- data/app/assets/javascripts/cms/content_types.js +13 -0
- data/app/assets/javascripts/cms/core_library.js.erb +3 -3
- data/app/assets/javascripts/cms/form_builder.js +1 -1
- data/app/assets/javascripts/cms/page_editor.js +9 -8
- data/app/assets/javascripts/cms/sitemap.js +5 -5
- data/app/assets/javascripts/cms/user.js +1 -1
- data/app/assets/stylesheets/cms/_assets.css.scss +5 -0
- data/app/assets/stylesheets/cms/_main-area.css.scss +1 -1
- data/app/assets/stylesheets/cms/_sitemap.css.scss +13 -0
- data/app/assets/stylesheets/cms/styles/_images.css.scss +11 -0
- data/app/controllers/cms/application_controller.rb +0 -1
- data/app/controllers/cms/content_controller.rb +3 -0
- data/app/controllers/cms/content_types_controller.rb +14 -0
- data/app/controllers/cms/inline_content_controller.rb +10 -8
- data/app/controllers/cms/passwords_controller.rb +5 -0
- data/app/controllers/cms/sites/passwords_controller.rb +5 -0
- data/app/helpers/cms/content_types_helper.rb +4 -0
- data/app/helpers/cms/form_tag_helper.rb +9 -1
- data/app/helpers/cms/page_helper.rb +2 -6
- data/app/helpers/cms/path_helper.rb +9 -0
- data/app/helpers/cms/section_nodes_helper.rb +1 -1
- data/app/inputs/name_input.rb +42 -0
- data/app/models/cms/attachment.rb +1 -0
- data/app/models/cms/content_type.rb +6 -0
- data/app/models/cms/dynamic_view.rb +2 -1
- data/app/models/cms/page.rb +6 -0
- data/app/models/cms/persistent_user.rb +1 -0
- data/app/models/cms/section_node.rb +8 -0
- data/app/models/cms/user.rb +9 -0
- data/app/portlets/helpers/cms/list_portlet_helper.rb +5 -0
- data/app/portlets/list_portlet.rb +40 -0
- data/app/views/cms/application/_add_content_modal.html.erb +2 -2
- data/app/views/cms/application/_exception.html.erb +1 -1
- data/app/views/cms/attachments/_attachment.html.erb +8 -6
- data/app/views/cms/attachments/_attachment_manager.html.erb +35 -18
- data/app/views/cms/attachments/_attachment_table.html.erb +12 -7
- data/app/views/cms/content/editing_frame.html.erb +1 -1
- data/app/views/cms/content_block/_sidebar.html.erb +2 -1
- data/app/views/cms/content_types/_order_field.html.erb +5 -0
- data/app/views/cms/content_types/index.html.erb +3 -0
- data/app/views/cms/forms/_form.html.erb +3 -2
- data/app/views/cms/pages/_main_form.html.erb +1 -1
- data/app/views/cms/passwords/new.html.erb +16 -0
- data/app/views/cms/section_nodes/_children.html.erb +2 -0
- data/app/views/cms/section_nodes/_row_buttons.html.erb +1 -1
- data/app/views/cms/section_nodes/_section_node.html.erb +1 -1
- data/app/views/cms/sessions/new.html.erb +10 -11
- data/app/views/layouts/cms/application.html.erb +4 -1
- data/app/views/portlets/email_page/_form.html.erb +1 -1
- data/app/views/portlets/email_page/render.html.erb +1 -1
- data/app/views/portlets/list/_form.html.erb +33 -0
- data/app/views/portlets/list/_list.html.erb +6 -0
- data/app/views/portlets/list/_table.html.erb +13 -0
- data/app/views/portlets/list/render.html.erb +1 -0
- data/app/views/portlets/tag_cloud/_form.html.erb +1 -1
- data/config/routes.rb +10 -5
- data/db/browsercms.seeds.rb +10 -8
- data/db/migrate/20130327184912_browsercms400.rb +30 -0
- data/doc/features/simple_form_refactor.md +2 -2
- data/doc/release_notes.md +38 -1
- data/lib/cms/acts/cms_user.rb +2 -2
- data/lib/cms/authentication/test_password_strategy.rb +10 -1
- data/lib/cms/behaviors/connecting.rb +20 -9
- data/lib/cms/commands/actions.rb +1 -3
- data/lib/cms/configuration.rb +2 -1
- data/lib/cms/configure_simple_form_bootstrap.rb +9 -0
- data/lib/cms/engine.rb +14 -5
- data/lib/cms/route_extensions.rb +2 -0
- data/lib/cms/version.rb +1 -1
- data/lib/generators/cms/content_block/content_block_generator.rb +21 -0
- data/lib/generators/cms/content_block/templates/_form.html.erb +1 -1
- data/lib/generators/cms/content_block/templates/application_controller.rb.erb +4 -0
- data/lib/generators/cms/content_block/templates/render.html.erb +22 -20
- data/lib/generators/cms/portlet/templates/_form.html.erb +3 -3
- data/lib/generators/cms/portlet/templates/portlet.rb +2 -0
- metadata +25 -15
- data/app/inputs/cms_text_field_input.rb +0 -29
- data/db/migrate/20131206214021_devise_create_users.rb +0 -47
- data/db/migrate/20131211223908_kill_reset_password.rb +0 -5
- data/db/migrate/20131218222005_create_cms_external_users.rb +0 -10
@@ -8,14 +8,22 @@ module Cms
|
|
8
8
|
# support.
|
9
9
|
def content_block_form_for(object, *args, &block)
|
10
10
|
options = args.extract_options!
|
11
|
-
simple_form_for(engine_aware_path(object), *(args << options.merge(builder: Cms::FormBuilder::ContentBlockFormBuilder)), &block)
|
11
|
+
simple_form_for(engine_aware_path(object), *(args << options.merge(builder: Cms::FormBuilder::ContentBlockFormBuilder, wrapper: 'browsercms')), &block)
|
12
12
|
end
|
13
13
|
|
14
|
+
# Simple wrapper for Rails form_for that will use the CMS CustomFormBuilder.
|
15
|
+
# Can be used by portlets or other random public facing views to render content.
|
16
|
+
def cms_form_for(*args, &block)
|
17
|
+
options = args.extract_options!
|
18
|
+
options.merge!(:builder => Cms::FormBuilder::ContentBlockFormBuilder)
|
19
|
+
form_for(*(args + [options]), &block)
|
20
|
+
end
|
14
21
|
|
15
22
|
def forecasting_a_new_section?(form_object)
|
16
23
|
Cms::Section.with_path(form_object.object.class.path).first.nil?
|
17
24
|
end
|
18
25
|
|
26
|
+
|
19
27
|
def slug_source_if(boolean)
|
20
28
|
if boolean
|
21
29
|
{input_html: {class: 'slug-source'}}
|
@@ -26,13 +26,9 @@ module Cms
|
|
26
26
|
# Return the JS file to load the configured default WYSIWYG editor
|
27
27
|
#
|
28
28
|
# Ideally, this could be improved if sprockets allows for dynamically determining which js library to use.
|
29
|
-
# @return [
|
29
|
+
# @return [String] Names of the JS file needed to load the editor.
|
30
30
|
def cms_content_editor
|
31
|
-
|
32
|
-
Cms.content_editor
|
33
|
-
else
|
34
|
-
"bcms/#{Cms.content_editor}" # Handles existing FCKEditor behavior
|
35
|
-
end
|
31
|
+
"bcms/#{Cms.content_editor}"
|
36
32
|
end
|
37
33
|
|
38
34
|
# Outputs the title for this page. Used by both internal CMS pages, as well as page templates. Call use_page_title to
|
@@ -5,6 +5,15 @@ module Cms
|
|
5
5
|
# From app, should be cms.xyz_path
|
6
6
|
module PathHelper
|
7
7
|
|
8
|
+
# @return A link if content is addressable, name otherwise.
|
9
|
+
# Link_to_if would call content.path even if it doesn't respond to '
|
10
|
+
def link_to_addressable_content(name, content)
|
11
|
+
if content.respond_to? :path
|
12
|
+
link_to name, content.path
|
13
|
+
else
|
14
|
+
name
|
15
|
+
end
|
16
|
+
end
|
8
17
|
# Returns the relative path to the given attachment.
|
9
18
|
# Content editors will see exact specific version path, while other users will see the 'public' url for the path.
|
10
19
|
def attachment_path_for(attachment)
|
@@ -26,7 +26,7 @@ module Cms
|
|
26
26
|
|
27
27
|
# When sitemap initially renders, we only want to show first level.
|
28
28
|
def initial_visibility_class(section_node)
|
29
|
-
section_node.depth
|
29
|
+
section_node.depth >= 1 ? 'hide' : ''
|
30
30
|
end
|
31
31
|
|
32
32
|
# Returns a css class for determine sitemap depth.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# A text field that is used for the Name fields of content.
|
2
|
+
#
|
3
|
+
# @example <%= f.name as: :name %>
|
4
|
+
#
|
5
|
+
# Add the following behaviors above and beyond
|
6
|
+
# 1. Will generate a slug if the class requires it. (Requires a as: :path field to work)
|
7
|
+
# 2. If no label is specified, it shows a larger than normal input which spans the full row.
|
8
|
+
# 3. Labels are turned off by default.
|
9
|
+
class NameInput < SimpleForm::Inputs::TextInput
|
10
|
+
|
11
|
+
def initialize(*args)
|
12
|
+
super(*args)
|
13
|
+
options[:label] = false if options[:label].nil?
|
14
|
+
options[:placeholder] = "Name" if options[:placeholder].nil?
|
15
|
+
end
|
16
|
+
|
17
|
+
def input
|
18
|
+
add_slug_source_for_content_that_needs_it
|
19
|
+
|
20
|
+
unless options[:label]
|
21
|
+
input_html_options[:class] << 'input-block-level input-xxlarge'
|
22
|
+
end
|
23
|
+
|
24
|
+
@builder.text_field(attribute_name, input_html_options).html_safe
|
25
|
+
end
|
26
|
+
|
27
|
+
protected
|
28
|
+
|
29
|
+
def add_slug_source_for_content_that_needs_it
|
30
|
+
if should_autogenerate_slug?
|
31
|
+
input_html_options[:class] << 'slug-source'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def should_autogenerate_slug?
|
36
|
+
content_requires_slug_field? && (object.new_record? || (object.name.blank? && object.slug.blank?))
|
37
|
+
end
|
38
|
+
|
39
|
+
def content_requires_slug_field?
|
40
|
+
object.class.requires_slug?
|
41
|
+
end
|
42
|
+
end
|
@@ -108,6 +108,12 @@ module Cms
|
|
108
108
|
klass.content_type
|
109
109
|
end
|
110
110
|
|
111
|
+
# Returns a list of column names and values for this content type which are allowed be orderable.
|
112
|
+
def orderable_attributes
|
113
|
+
attribute_names = model_class.new.attribute_names
|
114
|
+
attribute_names -= ["id", "version", "lock_version", "created_by_id", "updated_by_id"]
|
115
|
+
end
|
116
|
+
|
111
117
|
# @deprecated
|
112
118
|
def save!
|
113
119
|
ActiveSupport::Deprecation.warn "Cms::ContentType#save! should no longer be called. Content Types do not need to be registered in the database."
|
@@ -29,7 +29,8 @@ module Cms
|
|
29
29
|
|
30
30
|
validates_presence_of :name, :format, :handler, :path, :locale
|
31
31
|
validates_uniqueness_of :name, :scope => [:format, :handler],
|
32
|
-
:message => "Must have a unique combination of name, format and handler"
|
32
|
+
:message => "Must have a unique combination of name, format and handler",
|
33
|
+
conditions: -> { where(deleted: false) }
|
33
34
|
|
34
35
|
end
|
35
36
|
end
|
data/app/models/cms/page.rb
CHANGED
@@ -379,6 +379,12 @@ class Cms::Page < ActiveRecord::Base
|
|
379
379
|
path == "/"
|
380
380
|
end
|
381
381
|
|
382
|
+
|
383
|
+
# @return [Boolean] true if this page can be deleted or not.
|
384
|
+
def deletable?
|
385
|
+
!home?
|
386
|
+
end
|
387
|
+
|
382
388
|
# This will return the "top level section" for this page, which is the section directly
|
383
389
|
# below the root (a.k.a My Site) that this page is in. If this page is in root,
|
384
390
|
# then this will return root.
|
@@ -11,6 +11,7 @@ module Cms
|
|
11
11
|
# Note that Chrome doesn't expire session cookies immediately so test this in other browsers.
|
12
12
|
# http://stackoverflow.com/questions/16817229/issues-with-devise-rememberable
|
13
13
|
:rememberable,
|
14
|
+
:recoverable, # Needs to be here so forgot password link works.
|
14
15
|
:authentication_keys => [:login]
|
15
16
|
|
16
17
|
|
@@ -78,6 +78,14 @@ class Cms::SectionNode < ActiveRecord::Base
|
|
78
78
|
def link?
|
79
79
|
node_type == 'Cms::Link'
|
80
80
|
end
|
81
|
+
|
82
|
+
def deletable?
|
83
|
+
return false if self.root?
|
84
|
+
if node.respond_to?(:deletable?)
|
85
|
+
return node.deletable?
|
86
|
+
end
|
87
|
+
true
|
88
|
+
end
|
81
89
|
|
82
90
|
# @param [Section] section
|
83
91
|
# @param [Integer] position
|
data/app/models/cms/user.rb
CHANGED
@@ -19,9 +19,18 @@ module Cms
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
# Generate a new random password for this user.
|
23
|
+
# @return [String] The newly generated and assigned password
|
24
|
+
def new_password
|
25
|
+
pwd = SecureRandom.hex(4)
|
26
|
+
change_password(pwd)
|
27
|
+
pwd
|
28
|
+
end
|
29
|
+
|
22
30
|
# Change this User's password to a new value.
|
23
31
|
def change_password(new_password)
|
24
32
|
update(:password => new_password, :password_confirmation => new_password)
|
33
|
+
new_password
|
25
34
|
end
|
26
35
|
|
27
36
|
# By default, Users are coming from the the CMS database (cms_users). All Cms::User class have have the same source.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class ListPortlet < Cms::Portlet
|
2
|
+
|
3
|
+
description "Find and display content blocks."
|
4
|
+
enable_template_editor false
|
5
|
+
|
6
|
+
def render
|
7
|
+
query = current_content_type.model_class
|
8
|
+
limit = self.limit
|
9
|
+
unless limit.blank?
|
10
|
+
query = query.limit(limit.to_i)
|
11
|
+
end
|
12
|
+
direction = self.reverse_order.blank? || self.reverse_order == "0" ? 'asc' : 'desc'
|
13
|
+
unless self.order.blank?
|
14
|
+
query = query.order("#{self.order} #{direction}")
|
15
|
+
end
|
16
|
+
@content_blocks = query.all.to_a
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
# This is far less flexible than prepending additional view paths, but it suffices for now.
|
21
|
+
def view_as_full_path
|
22
|
+
if File.exists?(expected_view_path())
|
23
|
+
"portlets/list/#{self.name.parameterize('_')}/_#{self.view_as}"
|
24
|
+
else
|
25
|
+
"portlets/list/_#{self.view_as}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def expected_view_path
|
30
|
+
File.join(Rails.root, 'app', 'views', 'portlets', 'list', self.name.parameterize('_'), "_#{self.view_as}.html.erb")
|
31
|
+
end
|
32
|
+
|
33
|
+
def view_as_path
|
34
|
+
"portlets/list/#{self.name.parameterize('_')}/_#{self.view_as}.html.erb"
|
35
|
+
end
|
36
|
+
|
37
|
+
def current_content_type
|
38
|
+
Cms::ContentType.named(self.content_type).first
|
39
|
+
end
|
40
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<div id="modal-add-content" class="modal fade
|
2
|
-
|
1
|
+
<div id="modal-add-content" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
2
|
+
<div class="modal-content"></div>
|
3
3
|
</div>
|
@@ -1,14 +1,16 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
|
2
|
+
show_delete = true
|
3
|
+
show_delete = can_delete if defined?(can_delete)
|
4
4
|
%>
|
5
|
-
<tr id="<%= dom_id(attachment)%>">
|
5
|
+
<tr id="<%= dom_id(attachment) %>">
|
6
6
|
<% if attachment.is_image? %>
|
7
|
-
|
7
|
+
<td><%= link_to(image_tag(attachment_path_for(attachment), :size => '60x60', :data => {:purpose => 'attachment'}), attachment_path_for(attachment), target: "_blank") %></td>
|
8
8
|
<% else %>
|
9
|
-
|
9
|
+
<td><%= image_tag "cms/icons/file_types/#{attachment.icon}.png" %>
|
10
10
|
<% end %>
|
11
11
|
<td><%= attachment.attachment_name.singularize.capitalize %></td>
|
12
12
|
<td><%= number_to_human_size(attachment.size) %></td>
|
13
|
-
<td><%=
|
13
|
+
<td><%= link_to("Delete", '#',
|
14
|
+
data: {purpose: 'delete-attachment', id: attachment.id},
|
15
|
+
class: 'btn btn-mini btn-danger') if show_delete %></td>
|
14
16
|
</tr>
|
@@ -1,22 +1,39 @@
|
|
1
1
|
<%= render :partial => 'cms/attachments/attachment_table', :locals => {:block => @block, :can_delete => true} %>
|
2
|
-
|
3
|
-
<p>Upload a new attachment:</p>
|
4
|
-
</div>
|
2
|
+
<%= link_to 'Upload a New Attachment', "#", class: 'btn btn-primary', data: {toggle: "modal", target: "#upload-attachment"} %>
|
5
3
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
<% content_for :before_main_content do
|
5
|
+
# Must be outside main form, since we can't have a form within a form.
|
6
|
+
%>
|
7
|
+
<div class="modal fade" id="upload-attachment">
|
8
|
+
<div class="modal-dialog">
|
9
|
+
<div class="modal-content">
|
10
|
+
<div class="modal-header">
|
11
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
12
|
+
<h4 class="modal-title">Upload a New Attachment</h4>
|
13
|
+
</div>
|
14
|
+
<div class="modal-body">
|
15
|
+
<%= simple_form_for Cms::Attachment.new do |af| %>
|
16
|
+
<%= af.input :attachable_type, collection: asset_types, label: 'Type', include_blank: false %>
|
17
|
+
<%= hidden_field_tag :attachment_id_list, "", :id => "attachment_manager_ids_list" %>
|
18
|
+
<%= hidden_field_tag :attachments_changed, "", :id => "attachments_manager_changed" %>
|
12
19
|
|
13
|
-
|
14
|
-
|
20
|
+
<%= af.input :data, label: 'File', input_html: {id: 'asset_add_file', onchange: "$.cms.AttachmentManager.upload(this)"} %>
|
21
|
+
<input type="hidden" id="asset_attachable_id" name="asset[attachable_id]" value="<%= object.id %>"/>
|
22
|
+
<input type="hidden" id="asset_attachable_class" value="<%= object.class.name %>"/>
|
23
|
+
|
24
|
+
<div id="asset_add" class="fields file_fields" style="display:<%= asset_types.size > 1 ? "none" : "block" %>">
|
25
|
+
|
26
|
+
<div id="asset_add_div">
|
27
|
+
<iframe src="javascript:false" name="asset_add_uploader" id="asset_add_uploader"></iframe>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
<div class="modal-footer">
|
33
|
+
<button type="button" class="btn btn-small" data-dismiss="modal">Never Mind</button>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<% end %>
|
15
39
|
|
16
|
-
<div id="asset_add_div">
|
17
|
-
<input type="file" name="attachment[data]" id="asset_add_file" onchange="$.cms.AttachmentManager.upload(this)"/>
|
18
|
-
<input type="hidden" id="asset_attachable_id" name="asset[attachable_id]" value="<%= object.id %>"/>
|
19
|
-
<input type="hidden" id="asset_attachable_class" value="<%= object.class.name %>"/>
|
20
|
-
<iframe src="javascript:false" name="asset_add_uploader" id="asset_add_uploader"></iframe>
|
21
|
-
</div>
|
22
|
-
</div>
|
@@ -1,17 +1,22 @@
|
|
1
1
|
<div class="fields" id="assets_table">
|
2
|
-
<
|
3
|
-
|
4
|
-
<table style="display:<%= block.multiple_attachments.empty? ? "none" : "block"%>">
|
2
|
+
<table class="table table-bordered assets">
|
3
|
+
<thead>
|
5
4
|
<tr>
|
6
5
|
<th>Preview</th>
|
7
6
|
<th>Type</th>
|
8
7
|
<th>Size</th>
|
9
|
-
<th
|
8
|
+
<th>Actions</th>
|
10
9
|
<tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<% if @block.multiple_attachments.empty? %>
|
13
|
+
<tr class='empty-row'><td colspan="4" >There are no attachments yet.</td></tr>
|
14
|
+
<% end %>
|
11
15
|
<% for attachment in block.multiple_attachments %>
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
<% unless attachment.new_record? %>
|
17
|
+
<%= render :partial => "cms/attachments/attachment", :locals => {:attachment => attachment, :can_delete => can_delete} %>
|
18
|
+
<% end %>
|
15
19
|
<% end %>
|
20
|
+
</tbody>
|
16
21
|
</table>
|
17
22
|
</div>
|
@@ -1 +1 @@
|
|
1
|
-
<%= page_content_iframe(
|
1
|
+
<%= page_content_iframe(@edit_page_path) %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<ul class="unstyled">
|
13
13
|
<h4 class="gray">Changes will affect:</h4>
|
14
14
|
<% @block.connected_pages.each do |page| %>
|
15
|
-
<li><%= link_to page.name, page_path(page), target: "_blank" %></li>
|
15
|
+
<li><%= link_to page.name, cms.page_path(page), target: "_blank" %></li>
|
16
16
|
<% end %>
|
17
17
|
</ul>
|
18
18
|
<% end %>
|
@@ -33,3 +33,4 @@
|
|
33
33
|
<%= link_to "Delete", engine_aware_path(@block), class: "btn btn-small btn-danger confirm_with_title http_delete", title: "Are you sure you want to delete this content?" %>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
|
+
<%= yield :sidebar_after if content_for(:sidebar_after)%>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<h3>Form Settings</h3>
|
6
|
-
<%= f.input :name, as: :
|
6
|
+
<%= f.input :name, as: :name %>
|
7
7
|
<%= f.input :slug, as: :path %>
|
8
8
|
<%= f.input :description %>
|
9
9
|
<%= hidden_field_tag "field_ids", @block.field_ids %>
|
@@ -41,7 +41,8 @@
|
|
41
41
|
<% end %>
|
42
42
|
<%# Can't have a form inside a form, so this must go into the head. %>
|
43
43
|
<%= content_for :html_head do %>
|
44
|
-
<div id="modal-edit-field" class="modal
|
44
|
+
<div id="modal-edit-field" class="modal" tabindex="-1" role="dialog" aria-labelledby="model_label" aria-hidden="true">
|
45
|
+
<div class="modal-content"></div>
|
45
46
|
</div>
|
46
47
|
|
47
48
|
<div id="modal-confirm-delete-field" class="modal modal-content" tabindex="-1" role="dialog" aria-labelledby="model_label" aria-hidden="true">
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= f.hidden_field :lock_version %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
<%= f.input :name,
|
8
|
+
<%= f.input :name, placeholder: 'Page Name', as: :name %>
|
9
9
|
<%= f.input :path, placeholder: 'Page Path' %>
|
10
10
|
<%= f.input :template_file_name, collection: Cms::PageTemplate.options, label: "Template", as: :select, include_blank: false %>
|
11
11
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# Overrides devise/passwords/new to add CMS specific styles. %>
|
2
|
+
<%= render 'cms/application/page_title' %>
|
3
|
+
|
4
|
+
<%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
5
|
+
<%= render layout: 'cms/application/main_with_sidebar' do %>
|
6
|
+
<%= f.error_notification %>
|
7
|
+
<%= f.input :email, :required => true, :autofocus => true %>
|
8
|
+
|
9
|
+
<%= render "devise/shared/links" %>
|
10
|
+
<% end %>
|
11
|
+
<%= render layout: 'cms/application/row' do %>
|
12
|
+
<%= button_menu :bottom do %>
|
13
|
+
<%= f.button :submit, "Send me reset password instructions", class: 'right btn-primary' %>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|