pulitzer 0.14.4 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/pulitzer/arrangement_styles_controller.rb +1 -3
- data/app/controllers/pulitzer/background_styles_controller.rb +1 -3
- data/app/controllers/pulitzer/free_form_section_types_controller.rb +4 -4
- data/app/controllers/pulitzer/justification_styles_controller.rb +1 -3
- data/app/controllers/pulitzer/partial_types_controller.rb +0 -1
- data/app/controllers/pulitzer/post_type_content_element_types_controller.rb +4 -4
- data/app/controllers/pulitzer/post_type_versions_controller.rb +54 -0
- data/app/controllers/pulitzer/post_types_controller.rb +1 -5
- data/app/controllers/pulitzer/posts_controller.rb +3 -3
- data/app/controllers/pulitzer/sequence_flow_styles_controller.rb +1 -3
- data/app/controllers/pulitzer/versions_controller.rb +8 -2
- data/app/helpers/pulitzer/posts_helper.rb +7 -7
- data/app/interactions/pulitzer/create_free_form_section_partials.rb +2 -2
- data/app/interactions/pulitzer/create_post_type_content_elements.rb +3 -3
- data/app/interactions/pulitzer/create_post_type_free_form_sections.rb +3 -3
- data/app/interactions/pulitzer/create_singleton_post.rb +6 -6
- data/app/interactions/pulitzer/destroy_post_type_content_elements.rb +3 -3
- data/app/interactions/pulitzer/destroy_post_type_free_form_sections.rb +3 -3
- data/app/interactions/pulitzer/post_type_versions_controller/change_state.rb +15 -0
- data/app/interactions/pulitzer/post_type_versions_controller/create.rb +18 -0
- data/app/interactions/pulitzer/post_types_controller/create_singleton_post.rb +15 -0
- data/app/interactions/pulitzer/post_types_controller/create_template_version.rb +12 -0
- data/app/interactions/pulitzer/update_post_type_content_elements.rb +4 -4
- data/app/interactions/pulitzer/update_post_type_free_form_sections.rb +3 -3
- data/app/interactions/pulitzer/update_singleton_post.rb +6 -4
- data/app/models/pulitzer/arrangement_style.rb +1 -1
- data/app/models/pulitzer/background_style.rb +1 -1
- data/app/models/pulitzer/free_form_section_type.rb +1 -1
- data/app/models/pulitzer/justification_style.rb +1 -1
- data/app/models/pulitzer/partial.rb +8 -3
- data/app/models/pulitzer/post.rb +10 -2
- data/app/models/pulitzer/post_type.rb +10 -39
- data/app/models/pulitzer/post_type_content_element_type.rb +1 -1
- data/app/models/pulitzer/post_type_element.rb +1 -1
- data/app/models/pulitzer/post_type_version.rb +84 -0
- data/app/models/pulitzer/sequence_flow_style.rb +1 -1
- data/app/services/pulitzer/post_type_version/preview.rb +30 -0
- data/app/services/pulitzer/post_type_version/publish.rb +38 -0
- data/app/services/pulitzer/post_type_version/retire.rb +20 -0
- data/app/views/pulitzer/arrangement_styles/_new.html.erb +3 -3
- data/app/views/pulitzer/arrangement_styles/_show.html.erb +10 -6
- data/app/views/pulitzer/background_styles/_new.html.erb +3 -3
- data/app/views/pulitzer/background_styles/_show.html.erb +10 -6
- data/app/views/pulitzer/free_form_section_types/_new.html.erb +3 -3
- data/app/views/pulitzer/justification_styles/_new.html.erb +3 -3
- data/app/views/pulitzer/justification_styles/_show.html.erb +10 -6
- data/app/views/pulitzer/partials/_new.html.erb +8 -8
- data/app/views/pulitzer/post_type_content_element_types/_form.html.erb +0 -2
- data/app/views/pulitzer/post_type_content_element_types/_form_fields.html.erb +2 -2
- data/app/views/pulitzer/post_type_content_element_types/_new.html.erb +2 -2
- data/app/views/pulitzer/post_type_content_element_types/_show.html.erb +6 -2
- data/app/views/pulitzer/post_type_versions/_index.html.erb +15 -0
- data/app/views/pulitzer/post_type_versions/_show.html.erb +20 -0
- data/app/views/pulitzer/post_type_versions/_show_wrapper.html.erb +3 -0
- data/app/views/pulitzer/{post_types → post_type_versions}/_template.html.erb +34 -34
- data/app/views/pulitzer/post_types/_show.html.erb +3 -9
- data/app/views/pulitzer/post_types/index.html.erb +13 -10
- data/app/views/pulitzer/posts/_breadcrumbs.html.erb +4 -0
- data/app/views/pulitzer/posts/_edit.html.erb +5 -4
- data/app/views/pulitzer/posts/_index.html.erb +3 -3
- data/app/views/pulitzer/posts/_new.html.erb +1 -1
- data/app/views/pulitzer/posts/_show.html.erb +1 -1
- data/app/views/pulitzer/posts/_show_slug.html.erb +1 -1
- data/app/views/pulitzer/sequence_flow_styles/_new.html.erb +3 -3
- data/app/views/pulitzer/sequence_flow_styles/_show.html.erb +10 -6
- data/config/routes.rb +6 -4
- data/db/migrate/20170515230633_create_post_type_version.rb +9 -0
- data/db/migrate/20170515232938_reconnect_post_type_to_post.rb +13 -0
- data/lib/generators/pulitzer/post_type_generator.rb +24 -4
- data/lib/pulitzer.rb +1 -0
- data/lib/pulitzer/controller_helpers.rb +9 -0
- data/lib/pulitzer/version.rb +1 -1
- metadata +19 -4
- data/app/interactions/pulitzer/destroy_free_form_section_partials.rb +0 -17
@@ -1,10 +1,14 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
2
|
<div class="pulitzer-span one-fifth"><%= arrangement_style.display_name %></div>
|
3
3
|
<div class="pulitzer-span one-fifth"><%= arrangement_style.view_file_name %></div>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
<% if arrangement_style.post_type_version.locked? %>
|
5
|
+
<div class="pulitzer-span one-fifth">live</div>
|
6
|
+
<% else %>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= ajax_link "Edit", edit_arrangement_style_path(arrangement_style), {}, dom_target(arrangement_style) %>
|
9
|
+
</div>
|
10
|
+
<div class="pulitzer-span ten-percent">
|
11
|
+
<%= ajax_delete 'Delete', arrangement_style_path(arrangement_style), {}, dom_target(arrangement_style) %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
10
14
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div class="pulitzer-rowe">
|
2
|
-
<%= form_for background_style, html: ajax_form_hash(dom_target(background_style.
|
3
|
-
<%= f.hidden_field :
|
2
|
+
<%= form_for background_style, html: ajax_form_hash(dom_target(background_style.post_type_version, :background_styles_container), insert_method: 'append', reset_on_success: true) do |f| %>
|
3
|
+
<%= f.hidden_field :post_type_version_id %>
|
4
4
|
<%= render partial: 'form_fields', locals: { f: f, background_style: background_style } %>
|
5
5
|
<div class="pulitzer-span ten-percent">
|
6
6
|
<%= f.submit "Create", data: {disable_with: false} %>
|
7
7
|
</div>
|
8
8
|
<div class="pulitzer-span ten-percent">
|
9
|
-
<a class="button" data-emptier="true" data-target="<%= dom_target(background_style.
|
9
|
+
<a class="button" data-emptier="true" data-target="<%= dom_target(background_style.post_type_version, :new_background_style)%>">Close</a>
|
10
10
|
</div>
|
11
11
|
<% end %>
|
12
12
|
</div>
|
@@ -1,10 +1,14 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
2
|
<div class="pulitzer-span one-fifth"><%= background_style.display_name %></div>
|
3
3
|
<div class="pulitzer-span one-fifth"><%= background_style.css_class_name %></div>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
<% if background_style.post_type_version.locked? %>
|
5
|
+
<div class="pulitzer-span one-fifth">live</div>
|
6
|
+
<% else %>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= ajax_link "Edit", edit_background_style_path(background_style), {}, dom_target(background_style) %>
|
9
|
+
</div>
|
10
|
+
<div class="pulitzer-span ten-percenth">
|
11
|
+
<%= ajax_delete 'Delete', background_style_path(background_style), {}, dom_target(background_style) %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
10
14
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
|
-
<%= form_for ffst, html: ajax_form_hash("#free_form_section_types_container_#{dom_id(ffst.
|
3
|
-
<%= f.hidden_field :
|
2
|
+
<%= form_for ffst, html: ajax_form_hash("#free_form_section_types_container_#{dom_id(ffst.post_type_version)}", insert_method: 'append', empty_on_success: dom_target(ffst.post_type_version, :new_free_form_section_type)) do |f| %>
|
3
|
+
<%= f.hidden_field :post_type_version_id %>
|
4
4
|
<%= render partial: 'form_fields', locals: { f: f, ffst: ffst } %>
|
5
5
|
<div class="pulitzer-span ten-percent">
|
6
6
|
<%= f.submit "Create", data: {disable_with: false} %>
|
7
7
|
</div>
|
8
8
|
<div class="pulitzer-span ten-percent">
|
9
|
-
<a class="button" data-emptier="true" data-target="#new_free_form_section_type_<%= dom_id(ffst.
|
9
|
+
<a class="button" data-emptier="true" data-target="#new_free_form_section_type_<%= dom_id(ffst.post_type_version) %>">Close</a>
|
10
10
|
</div>
|
11
11
|
<% end %>
|
12
12
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
|
-
<%= form_for justification_style, html: ajax_form_hash(dom_target(justification_style.
|
3
|
-
<%= f.hidden_field :
|
2
|
+
<%= form_for justification_style, html: ajax_form_hash(dom_target(justification_style.post_type_version, :justification_styles_container), insert_method: 'append', reset_on_success: true) do |f| %>
|
3
|
+
<%= f.hidden_field :post_type_version_id %>
|
4
4
|
<%= render partial: 'form_fields', locals: { f: f, justification_style: justification_style } %>
|
5
5
|
<div class="pulitzer-span ten-percent">
|
6
6
|
<%= f.submit "Create", data: {disable_with: false} %>
|
7
7
|
</div>
|
8
8
|
<div class="pulitzer-span ten-percent">
|
9
|
-
<a class="button" data-emptier="true" data-target="<%= dom_target(justification_style.
|
9
|
+
<a class="button" data-emptier="true" data-target="<%= dom_target(justification_style.post_type_version, :new_justification_style) %>">Close</a>
|
10
10
|
</div>
|
11
11
|
<% end %>
|
12
12
|
</div>
|
@@ -1,10 +1,14 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
2
|
<div class="pulitzer-span one-fifth"><%= justification_style.display_name %></div>
|
3
3
|
<div class="pulitzer-span one-fifth"><%= justification_style.css_class_name %></div>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
<% if justification_style.post_type_version.locked? %>
|
5
|
+
<div class="pulitzer-span one-fifth">live</div>
|
6
|
+
<% else %>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= ajax_link "Edit", edit_justification_style_path(justification_style), {}, dom_target(justification_style) %>
|
9
|
+
</div>
|
10
|
+
<div class="pulitzer-span ten-percent">
|
11
|
+
<%= ajax_delete 'Delete', justification_style_path(justification_style), {}, dom_target(justification_style) %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
10
14
|
</div>
|
@@ -5,26 +5,26 @@
|
|
5
5
|
<%= f.text_field :label %>
|
6
6
|
</div>
|
7
7
|
<div class="pulitzer-span ten-percent">
|
8
|
-
<%= f.collection_select :
|
8
|
+
<%= f.collection_select :post_type_version_id, Pulitzer::PostType.partials.order(:name), :published_type_version_id, :name, {}, revealer(dom_id(partial.free_form_section, :new_partial_type), highlander: true) %>
|
9
9
|
</div>
|
10
10
|
<div class="pulitzer-span one-half" <%= revealer_target_attrs(dom_id(partial.free_form_section, :new_partial_type)) %>>
|
11
|
-
<% Pulitzer::PostType.partials.each do |
|
12
|
-
<div class="pulitzer-row" <%= revealer_option_attrs(dom_id(partial.free_form_section, :new_partial_type), trigger:
|
11
|
+
<% Pulitzer::PostType.partials.map{|pt| pt.published_type_version}.compact.each do |post_type_version| %>
|
12
|
+
<div class="pulitzer-row" <%= revealer_option_attrs(dom_id(partial.free_form_section, :new_partial_type), trigger: post_type_version.id) %>>
|
13
13
|
<div class="pulitzer-span one-fifth">
|
14
|
-
<% if
|
15
|
-
<%= f.collection_select :arrangement_style_id,
|
14
|
+
<% if post_type_version.arrangement_styles.any? %>
|
15
|
+
<%= f.collection_select :arrangement_style_id, post_type_version.arrangement_styles, :id, :display_name, {}, {} %>
|
16
16
|
<% else %>
|
17
17
|
|
18
18
|
<% end %>
|
19
19
|
</div>
|
20
20
|
<div class="pulitzer-span one-fifth">
|
21
|
-
<%= f.collection_select :background_style_id,
|
21
|
+
<%= f.collection_select :background_style_id, post_type_version.background_styles, :id, :display_name, {}, {} %>
|
22
22
|
</div>
|
23
23
|
<div class="pulitzer-span one-fifth">
|
24
|
-
<%= f.collection_select :justification_style_id,
|
24
|
+
<%= f.collection_select :justification_style_id, post_type_version.justification_styles, :id, :display_name, {}, {} %>
|
25
25
|
</div>
|
26
26
|
<div class="pulitzer-span two-fifths">
|
27
|
-
<%= f.collection_select :sequence_flow_style_id,
|
27
|
+
<%= f.collection_select :sequence_flow_style_id, post_type_version.sequence_flow_styles, :id, :display_name, {}, {} %>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
<% end %>
|
@@ -3,8 +3,6 @@
|
|
3
3
|
<%= render partial: 'form_fields', locals: { f: f, ptcet: ptcet } %>
|
4
4
|
<div class="pulitzer-span ten-percent">
|
5
5
|
<%= f.submit "Update" %>
|
6
|
-
</div>
|
7
|
-
<div class="pulitzer-span ten-percent">
|
8
6
|
<%= link_to('Cancel', post_type_content_element_type_path(ptcet), :class => 'button',
|
9
7
|
data: { ajax_link: true, ajax_target: dom_target(ptcet) } ) %>
|
10
8
|
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= f.collection_select :content_element_type_id, Pulitzer::ContentElementType.all, :id, :name, {},
|
6
6
|
revealer(dom_id(ptcet, :revealer), highlander: true) %>
|
7
7
|
</div>
|
8
|
-
<%= f.hidden_field :
|
8
|
+
<%= f.hidden_field :post_type_version_id %>
|
9
9
|
|
10
10
|
<div <%= revealer_target_attrs(dom_id(ptcet, :revealer)) %>></div>
|
11
11
|
|
@@ -26,7 +26,7 @@ revealer(dom_id(ptcet, :revealer), highlander: true) %>
|
|
26
26
|
<div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Clickable').id) %> class="pulitzer-span two-fifths">
|
27
27
|
<%= f.select :clickable_kind, options_from_collection_for_select(Pulitzer::PostTypeContentElementType.clickable_kinds, :gid, :name, f.object.clickable_kind) %>
|
28
28
|
</div>
|
29
|
-
|
29
|
+
<div class="pulitzer-span ten-percent"> </div>
|
30
30
|
<div class="pulitzer-span five-percent">
|
31
31
|
<%= f.check_box :required %>
|
32
32
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
|
-
<%= form_for ptcet, html: ajax_form_hash("#post_type_content_element_types_container_#{dom_id(ptcet.
|
2
|
+
<%= form_for ptcet, html: ajax_form_hash("#post_type_content_element_types_container_#{dom_id(ptcet.post_type_version)}", insert_method: 'append', reset_on_success: true) do |f| %>
|
3
3
|
<%= render partial: 'form_fields', locals: { f: f, ptcet: ptcet } %>
|
4
4
|
<div class="pulitzer-span ten-percent">
|
5
5
|
<%= f.submit "Create", data: { disable_with: false } %>
|
6
6
|
</div>
|
7
7
|
<div class="pulitzer-span ten-percent">
|
8
|
-
<a class="button" data-emptier="true" data-target="#new_post_type_content_element_type_<%= dom_id(ptcet.
|
8
|
+
<a class="button" data-emptier="true" data-target="#new_post_type_content_element_type_<%= dom_id(ptcet.post_type_version)%>" >Close</a>
|
9
9
|
</div>
|
10
10
|
<% end %>
|
11
11
|
</div>
|
@@ -18,8 +18,12 @@
|
|
18
18
|
<%= ptcet.sort_order %>
|
19
19
|
</div>
|
20
20
|
<div class="pulitzer-span ten-percent">
|
21
|
-
|
22
|
-
|
21
|
+
<% if ptcet.post_type_version.locked? %>
|
22
|
+
live
|
23
|
+
<% else %>
|
24
|
+
<%= ajax_link "Edit", edit_post_type_content_element_type_path(ptcet), {}, dom_target(ptcet) %> |
|
25
|
+
<%= ajax_delete 'Delete', post_type_content_element_type_path(ptcet), {}, dom_target(ptcet) %>
|
26
|
+
<% end %>
|
23
27
|
</div>
|
24
28
|
<div id="<%= dom_id(ptcet, :styles_container) %>"></div>
|
25
29
|
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= ajax_link '> all ' + @post_type.kind.pluralize + ' > ', post_types_path(post_type_kind: @post_type.kind), {}, '[data-tab-id="' + @post_type.kind.pluralize + '"]' %>
|
2
|
+
<h3>"<%= @post_type.name %>" Template Versions</h3>
|
3
|
+
<div class="pulitzer-row margin-bottom list-item">
|
4
|
+
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
5
|
+
<%= ajax_link "create a new version of this template",
|
6
|
+
post_type_versions_path(post_type_version: {post_type_id: @post_type.id}),
|
7
|
+
{}, '#post_type_versions_container', http_method: 'POST', insert_method: 'append' %>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div id="post_type_versions_container">
|
12
|
+
<% @post_type_versions.each do |post_type_version| %>
|
13
|
+
<%= render partial: 'show_wrapper', locals: {post_type_version: post_type_version} %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<ul class="inline-list">
|
3
|
+
<li>Version <%= post_type_version.version_number %></li>
|
4
|
+
<li><%= post_type_version.status_display %></li>
|
5
|
+
<li> <%= ajax_link post_type_version.state_change_display, change_state_post_type_version_path(post_type_version, state_change: post_type_version.state_change), {}, dom_target(post_type_version), http_method: 'PATCH' %>
|
6
|
+
</li>
|
7
|
+
<li>
|
8
|
+
<%= ajax_link 'Template Elements', template_post_type_version_path(post_type_version), {}, dom_target(post_type_version) %>
|
9
|
+
</li>
|
10
|
+
<% unless post_type_version.partial? %>
|
11
|
+
<li><%= link_to_posts(post_type_version, 'Page Index', 'Page Content') %></li>
|
12
|
+
<% end %>
|
13
|
+
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
14
|
+
<li>
|
15
|
+
<%= ajax_delete 'Delete', post_type_version_path(post_type_version), {}, dom_target(post_type_version) %>
|
16
|
+
</li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
|
20
|
+
</div>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%= render partial: 'show', locals: {
|
1
|
+
<%= render partial: 'show', locals: {post_type_version: post_type_version} %>
|
2
2
|
<div class="pulitzer-row highlight-off-white">
|
3
|
-
<div class="pulitzer-indent" id="<%= dom_id(
|
4
|
-
<div class="pulitzer-row margin-bottom" id="<%= dom_id(
|
3
|
+
<div class="pulitzer-indent" id="<%= dom_id(post_type_version, :template) %>">
|
4
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type_version, :post_content_element_types_wrapper) %>">
|
5
5
|
<h4>Content Elements</h4>
|
6
6
|
<div class="pulitzer-row heading">
|
7
7
|
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
@@ -11,92 +11,92 @@
|
|
11
11
|
<div class="pulitzer-span five-percent heading">Req'd</div>
|
12
12
|
<div class="pulitzer-span five-percent heading">Sort</div>
|
13
13
|
</div>
|
14
|
-
<div id="post_type_content_element_types_container_<%= dom_id(
|
15
|
-
<%
|
14
|
+
<div id="post_type_content_element_types_container_<%= dom_id(post_type_version) %>">
|
15
|
+
<% post_type_version.post_type_content_element_types.each do |ptcet| %>
|
16
16
|
<%= render partial: '/pulitzer/post_type_content_element_types/show_wrapper', locals: {ptcet: ptcet} %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
19
|
-
<div id="
|
20
|
-
<%= ajax_link 'add a new content element for ' +
|
19
|
+
<div id="<%= dom_id(post_type_version, :new_post_type_content_element_type) %>"></div>
|
20
|
+
<%= ajax_link 'add a new content element for ' + post_type_version.full_name, new_post_type_content_element_type_path(post_type_version_id: post_type_version.id), {}, dom_target(post_type_version, :new_post_type_content_element_type) %>
|
21
21
|
</div>
|
22
|
-
<% unless
|
23
|
-
<div class="pulitzer-row margin-bottom" id="<%= dom_id(
|
22
|
+
<% unless post_type_version.partial? %>
|
23
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type_version, :free_form_section_types_wrapper) %>">
|
24
24
|
<h4>Free Form Sections</h4>
|
25
25
|
<div class="pulitzer-row heading">
|
26
26
|
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
27
27
|
<div class="pulitzer-span one-fifth heading">Sort</div>
|
28
28
|
</div>
|
29
|
-
<div id="<%= dom_id(
|
30
|
-
<%
|
29
|
+
<div id="<%= dom_id(post_type_version, :free_form_section_types_container) %>">
|
30
|
+
<% post_type_version.free_form_section_types.each do |ffst| %>
|
31
31
|
<%= render partial: '/pulitzer/free_form_section_types/show_wrapper', locals: {ffst: ffst} %>
|
32
32
|
<% end %>
|
33
33
|
</div>
|
34
|
-
<div id="<%= dom_id(
|
35
|
-
<%= ajax_link 'add a new section for ' +
|
34
|
+
<div id="<%= dom_id(post_type_version, :new_free_form_section_type) %>"></div>
|
35
|
+
<%= ajax_link 'add a new section for ' + post_type_version.full_name, new_free_form_section_type_path(post_type_version_id: post_type_version.id), {}, dom_target(post_type_version, :new_free_form_section_type) %>
|
36
36
|
</div>
|
37
37
|
<% end %>
|
38
38
|
|
39
|
-
<% if
|
40
|
-
<div class="pulitzer-row margin-bottom" id="<%= dom_id(
|
39
|
+
<% if post_type_version.partial? %>
|
40
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type_version, :background_styles_wrapper) %>">
|
41
41
|
<h4>Background Styles</h4>
|
42
42
|
<div class="pulitzer-row heading">
|
43
43
|
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
44
44
|
<div class="pulitzer-span one-fifth heading">Css Class</div>
|
45
45
|
</div>
|
46
|
-
<div id="<%= dom_id(
|
47
|
-
<%
|
46
|
+
<div id="<%= dom_id(post_type_version, :background_styles_container) %>">
|
47
|
+
<% post_type_version.background_styles.each do |bg_style| %>
|
48
48
|
<%= render partial: '/pulitzer/background_styles/show_wrapper', locals: {background_style: bg_style} %>
|
49
49
|
<% end %>
|
50
50
|
</div>
|
51
|
-
<div class="pulitzer-row" id="<%= dom_id(
|
51
|
+
<div class="pulitzer-row" id="<%= dom_id(post_type_version, :new_background_style) %>"></div>
|
52
52
|
<div class="pulitzer-row">
|
53
|
-
<%= ajax_link 'add a new background style for ' +
|
53
|
+
<%= ajax_link 'add a new background style for ' + post_type_version.full_name, new_background_style_path(background_style: {post_type_version_id: post_type_version.id}), {}, dom_target(post_type_version, :new_background_style) %>
|
54
54
|
</div>
|
55
55
|
</div>
|
56
56
|
|
57
|
-
<div class="pulitzer-row margin-bottom" id="<%= dom_id(
|
57
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type_version, :justification_styles_wrapper) %>">
|
58
58
|
<h4>Justification Styles</h4>
|
59
59
|
<div class="pulitzer-row heading">
|
60
60
|
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
61
61
|
<div class="pulitzer-span one-fifth heading">Css Class</div>
|
62
62
|
</div>
|
63
|
-
<div id="<%= dom_id(
|
64
|
-
<%
|
63
|
+
<div id="<%= dom_id(post_type_version, :justification_styles_container) %>">
|
64
|
+
<% post_type_version.justification_styles.each do |just_style| %>
|
65
65
|
<%= render partial: '/pulitzer/justification_styles/show_wrapper', locals: {justification_style: just_style} %>
|
66
66
|
<% end %>
|
67
67
|
</div>
|
68
|
-
<div id="<%= dom_id(
|
69
|
-
<%= ajax_link 'add a new justification style for ' +
|
68
|
+
<div id="<%= dom_id(post_type_version, :new_justification_style) %>"></div>
|
69
|
+
<%= ajax_link 'add a new justification style for ' + post_type_version.full_name, new_justification_style_path(justification_style: {post_type_version_id: post_type_version.id}), {}, dom_target(post_type_version, :new_justification_style) %>
|
70
70
|
</div>
|
71
71
|
|
72
|
-
<div class="pulitzer-row margin-bottom" id="<%= dom_id(
|
72
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type_version, :sequence_flow_styles_wrapper) %>">
|
73
73
|
<h4>Sequence Flow Styles</h4>
|
74
74
|
<div class="pulitzer-row heading">
|
75
75
|
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
76
76
|
<div class="pulitzer-span one-fifth heading">Css Class</div>
|
77
77
|
</div>
|
78
|
-
<div id="<%= dom_id(
|
79
|
-
<%
|
78
|
+
<div id="<%= dom_id(post_type_version, :sequence_flow_styles_container) %>">
|
79
|
+
<% post_type_version.sequence_flow_styles.each do |seq_style| %>
|
80
80
|
<%= render partial: '/pulitzer/sequence_flow_styles/show_wrapper', locals: {sequence_flow_style: seq_style} %>
|
81
81
|
<% end %>
|
82
82
|
</div>
|
83
|
-
<div id="<%= dom_id(
|
84
|
-
<%= ajax_link 'add a new sequence_flow style for ' +
|
83
|
+
<div id="<%= dom_id(post_type_version, :new_sequence_flow_style) %>"></div>
|
84
|
+
<%= ajax_link 'add a new sequence_flow style for ' + post_type_version.full_name, new_sequence_flow_style_path(sequence_flow_style: {post_type_version_id: post_type_version.id}), {}, dom_target(post_type_version, :new_sequence_flow_style) %>
|
85
85
|
</div>
|
86
86
|
|
87
|
-
<div class="pulitzer-row margin-bottom" id="<%= dom_id(
|
87
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type_version, :arrangement_styles_wrapper) %>">
|
88
88
|
<h4>Arrangement Styles</h4>
|
89
89
|
<div class="pulitzer-row heading">
|
90
90
|
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
91
91
|
<div class="pulitzer-span one-fifth heading">Rails View File</div>
|
92
92
|
</div>
|
93
|
-
<div id="<%= dom_id(
|
94
|
-
<%
|
93
|
+
<div id="<%= dom_id(post_type_version, :arrangement_styles_container) %>">
|
94
|
+
<% post_type_version.arrangement_styles.each do |arr_style| %>
|
95
95
|
<%= render partial: '/pulitzer/arrangement_styles/show_wrapper', locals: {arrangement_style: arr_style} %>
|
96
96
|
<% end %>
|
97
97
|
</div>
|
98
|
-
<div id="<%= dom_id(
|
99
|
-
<%= ajax_link 'add a new arrangement style for ' +
|
98
|
+
<div id="<%= dom_id(post_type_version, :new_arrangement_style) %>"></div>
|
99
|
+
<%= ajax_link 'add a new arrangement style for ' + post_type_version.full_name, new_arrangement_style_path(arrangement_style: {post_type_version_id: post_type_version.id}), {}, dom_target(post_type_version, :new_arrangement_style) %>
|
100
100
|
</div>
|
101
101
|
<% end %>
|
102
102
|
</div>
|
@@ -1,21 +1,16 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
2
|
<div class="pulitzer-row padding">
|
3
3
|
<div class="pulitzer-span one-quarter"><%= post_type.name %></div>
|
4
|
-
<% unless post_type.partial? %>
|
5
|
-
<div class="pulitzer-span margin ten-percent"><%= link_to_posts(post_type, 'Index', 'Manage') %></div>
|
6
|
-
<% end %>
|
7
4
|
<div class="pulitzer-span ten-percent">
|
8
|
-
<% if
|
9
|
-
<%= ajax_link '
|
5
|
+
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
6
|
+
<%= ajax_link 'Templates', post_type_versions_path(post_type_id: post_type.id), {}, '[data-tab-id="' + post_type.kind.pluralize + '"]' %>
|
10
7
|
<% else %>
|
11
|
-
<%=
|
8
|
+
<%= link_to_posts(post_type.published_type_version, 'Page Index', 'Page Content') %>
|
12
9
|
<% end %>
|
13
10
|
</div>
|
14
11
|
<div class="pulitzer-span ten-percent">
|
15
12
|
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
16
13
|
<%= ajax_link "Details", edit_post_type_path(post_type), {}, dom_target(post_type) %>
|
17
|
-
<% else %>
|
18
|
-
<%= post_type.name %>
|
19
14
|
<% end %>
|
20
15
|
</div>
|
21
16
|
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
@@ -24,5 +19,4 @@
|
|
24
19
|
</div>
|
25
20
|
<% end %>
|
26
21
|
</div>
|
27
|
-
|
28
22
|
</div>
|
@@ -5,13 +5,11 @@
|
|
5
5
|
<%= tab_trigger('tags')%>>
|
6
6
|
Tags
|
7
7
|
</div>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</div>
|
14
|
-
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
8
|
+
<div class="pulitzer-pill"
|
9
|
+
href="<%= post_types_path(post_type_kind: 'template') %>"
|
10
|
+
<%= tab_trigger('templates')%>>
|
11
|
+
Full Page Templates
|
12
|
+
</div>
|
15
13
|
<div class="pulitzer-pill"
|
16
14
|
href="<%= post_types_path(post_type_kind: 'partial') %>"
|
17
15
|
<%= tab_trigger('partials')%>>
|
@@ -22,13 +20,18 @@
|
|
22
20
|
<%= tab_trigger('options')%>>
|
23
21
|
Clickable Options
|
24
22
|
</div>
|
23
|
+
<% else %>
|
24
|
+
<div class="hidden"
|
25
|
+
href="<%= post_types_path(post_type_kind: 'template') %>"
|
26
|
+
<%= tab_trigger('templates')%>>
|
27
|
+
</div>
|
25
28
|
<% end %>
|
26
29
|
</div>
|
27
30
|
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
28
31
|
<div class="pulitzer-row" <%= tab_content('tags') %>></div>
|
29
|
-
|
30
|
-
<div class="pulitzer-row" <%= tab_content('templates') %>></div>
|
31
|
-
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
32
|
+
<div class="pulitzer-row" <%= tab_content('templates') %>></div>
|
32
33
|
<div class="pulitzer-row" <%= tab_content('partials') %>></div>
|
33
34
|
<div class="pulitzer-row" <%= tab_content('options') %>></div>
|
35
|
+
<% else %>
|
36
|
+
<div class="pulitzer-row" <%= tab_content('templates') %>></div>
|
34
37
|
<% end %>
|