pulitzer 0.12.5 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/pulitzer.scss +107 -4
- data/app/controllers/pulitzer/arrangement_styles_controller.rb +52 -0
- data/app/controllers/pulitzer/background_styles_controller.rb +52 -0
- data/app/controllers/pulitzer/content_elements_controller.rb +2 -2
- data/app/controllers/pulitzer/free_form_section_types_controller.rb +2 -2
- data/app/controllers/pulitzer/justification_styles_controller.rb +52 -0
- data/app/controllers/pulitzer/layouts_controller.rb +2 -2
- data/app/controllers/pulitzer/partial_types_controller.rb +1 -1
- data/app/controllers/pulitzer/partials_controller.rb +2 -2
- data/app/controllers/pulitzer/post_tags_controller.rb +2 -2
- data/app/controllers/pulitzer/post_type_content_element_types_controller.rb +2 -2
- data/app/controllers/pulitzer/post_types_controller.rb +2 -2
- data/app/controllers/pulitzer/posts_controller.rb +1 -1
- data/app/controllers/pulitzer/sequence_flow_styles_controller.rb +52 -0
- data/app/controllers/pulitzer/tags_controller.rb +3 -3
- data/app/interactions/pulitzer/update_post_type_content_elements.rb +1 -1
- data/app/models/pulitzer/arrangement_style.rb +8 -0
- data/app/models/pulitzer/background_style.rb +8 -0
- data/app/models/pulitzer/content_element.rb +4 -0
- data/app/models/pulitzer/free_form_section_type.rb +5 -1
- data/app/models/pulitzer/justification_style.rb +8 -0
- data/app/models/pulitzer/partial.rb +39 -5
- data/app/models/pulitzer/partial_type.rb +2 -10
- data/app/models/pulitzer/post.rb +1 -1
- data/app/models/pulitzer/post_type.rb +4 -5
- data/app/models/pulitzer/post_type_content_element_type.rb +20 -1
- data/app/models/pulitzer/sequence_flow_style.rb +8 -0
- data/app/views/pulitzer/arrangement_styles/_form.html.erb +14 -0
- data/app/views/pulitzer/arrangement_styles/_form_fields.html.erb +6 -0
- data/app/views/pulitzer/arrangement_styles/_new.html.erb +12 -0
- data/app/views/pulitzer/arrangement_styles/_show.html.erb +10 -0
- data/app/views/pulitzer/arrangement_styles/_show_wrapper.html.erb +3 -0
- data/app/views/pulitzer/background_styles/_form.html.erb +14 -0
- data/app/views/pulitzer/background_styles/_form_fields.html.erb +6 -0
- data/app/views/pulitzer/background_styles/_new.html.erb +12 -0
- data/app/views/pulitzer/background_styles/_show.html.erb +10 -0
- data/app/views/pulitzer/background_styles/_show_wrapper.html.erb +3 -0
- data/app/views/pulitzer/free_form_section_types/_form.html.erb +16 -7
- data/app/views/pulitzer/free_form_section_types/_form_fields.html.erb +6 -4
- data/app/views/pulitzer/free_form_section_types/_new.html.erb +12 -7
- data/app/views/pulitzer/free_form_section_types/_show.html.erb +10 -12
- data/app/views/pulitzer/free_form_section_types/_show_wrapper.html.erb +2 -2
- data/app/views/pulitzer/justification_styles/_form.html.erb +14 -0
- data/app/views/pulitzer/justification_styles/_form_fields.html.erb +6 -0
- data/app/views/pulitzer/justification_styles/_new.html.erb +12 -0
- data/app/views/pulitzer/justification_styles/_show.html.erb +10 -0
- data/app/views/pulitzer/justification_styles/_show_wrapper.html.erb +3 -0
- data/app/views/pulitzer/partial_types/_index.html.erb +2 -2
- data/app/views/pulitzer/partial_types/_new.html.erb +1 -12
- data/app/views/pulitzer/partial_types/_show.html.erb +15 -5
- data/app/views/pulitzer/partial_types/_show_wrapper.html.erb +1 -1
- data/app/views/pulitzer/partials/_form.html.erb +31 -13
- data/app/views/pulitzer/partials/_new.html.erb +30 -11
- data/app/views/pulitzer/partials/_show.html.erb +8 -4
- data/app/views/pulitzer/post_type_content_element_types/_form.html.erb +12 -6
- data/app/views/pulitzer/post_type_content_element_types/_form_fields.html.erb +15 -13
- data/app/views/pulitzer/post_type_content_element_types/_new.html.erb +11 -6
- data/app/views/pulitzer/post_type_content_element_types/_show.html.erb +16 -9
- data/app/views/pulitzer/post_type_content_element_types/_show_wrapper.html.erb +2 -2
- data/app/views/pulitzer/post_types/_new.html.erb +1 -1
- data/app/views/pulitzer/post_types/_show.html.erb +10 -10
- data/app/views/pulitzer/post_types/_template.html.erb +98 -29
- data/app/views/pulitzer/sequence_flow_styles/_form.html.erb +14 -0
- data/app/views/pulitzer/sequence_flow_styles/_form_fields.html.erb +6 -0
- data/app/views/pulitzer/sequence_flow_styles/_new.html.erb +12 -0
- data/app/views/pulitzer/sequence_flow_styles/_show.html.erb +10 -0
- data/app/views/pulitzer/sequence_flow_styles/_show_wrapper.html.erb +3 -0
- data/config/routes.rb +5 -1
- data/db/migrate/20170518142411_create_pulitzer_background_classes.rb +9 -0
- data/db/migrate/20170518144418_create_pulitzer_justification_classes.rb +9 -0
- data/db/migrate/20170518144449_create_pulitzer_sequence_flow_classes.rb +9 -0
- data/db/migrate/20170518144515_create_pulitzer_arrangement_classes.rb +9 -0
- data/db/migrate/20170518145318_convert_pulitzer_layouts.rb +9 -0
- data/lib/pulitzer/content_element_helper.rb +5 -3
- data/lib/pulitzer/version.rb +1 -1
- data/spec/controllers/pulitzer/free_form_section_types_controller_spec.rb +6 -6
- data/spec/controllers/pulitzer/partials_controller_spec.rb +7 -7
- data/spec/controllers/pulitzer/post_types_controller_spec.rb +3 -3
- data/spec/controllers/pulitzer/versions_controller_spec.rb +8 -8
- data/spec/controllers/tags_controller_spec.rb +28 -29
- data/spec/dummy/app/controllers/application_controller.rb +1 -1
- data/spec/dummy/config/application.rb +0 -1
- data/spec/dummy/config/environments/test.rb +2 -2
- data/spec/dummy/db/schema.rb +30 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +0 -3971
- data/spec/factories/partial_type.rb +0 -1
- data/spec/rails_helper.rb +1 -1
- metadata +35 -9
- data/app/views/pulitzer/layouts/_form.html.erb +0 -8
- data/app/views/pulitzer/layouts/_form_fields.html.erb +0 -2
- data/app/views/pulitzer/layouts/_new.html.erb +0 -7
- data/app/views/pulitzer/layouts/_show.html.erb +0 -9
- data/app/views/pulitzer/layouts/_show_wrapper.html.erb +0 -3
- data/spec/factories/layout.rb +0 -6
@@ -1,3 +1,3 @@
|
|
1
|
-
<
|
1
|
+
<div class="pulitzer-row" id="<%= dom_id(ffst) %>">
|
2
2
|
<%= render partial: '/pulitzer/free_form_section_types/show', locals: {ffst: ffst} %>
|
3
|
-
</
|
3
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<%= render 'pulitzer/shared/error_messages', object: justification_style %>
|
3
|
+
<%= form_for justification_style, html: ajax_form_hash(dom_target(justification_style)) do |f| %>
|
4
|
+
<%= render partial: 'form_fields', locals: { f: f, justification_style: justification_style } %>
|
5
|
+
<div class="pulitzer-span ten-percent">
|
6
|
+
<%= f.submit "Update" %>
|
7
|
+
</div>
|
8
|
+
<div class="pulitzer-span ten-percent">
|
9
|
+
<%= link_to('Cancel', justification_style_path(justification_style), :class => 'button',
|
10
|
+
data: { ajax_link: true, ajax_target: dom_target(justification_style) } ) %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<%= form_for justification_style, html: ajax_form_hash(dom_target(justification_style.post_type, :justification_styles_container), insert_method: 'append', reset_on_success: true) do |f| %>
|
3
|
+
<%= f.hidden_field :post_type_id %>
|
4
|
+
<%= render partial: 'form_fields', locals: { f: f, justification_style: justification_style } %>
|
5
|
+
<div class="pulitzer-span ten-percent">
|
6
|
+
<%= f.submit "Create", data: {disable_with: false} %>
|
7
|
+
</div>
|
8
|
+
<div class="pulitzer-span ten-percent">
|
9
|
+
<a class="button" data-emptier="true" data-target="<%= dom_target(justification_style.post_type, :new_justification_style) %>">Close</a>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<div class="pulitzer-span one-fifth"><%= justification_style.display_name %></div>
|
3
|
+
<div class="pulitzer-span one-fifth"><%= justification_style.css_class_name %></div>
|
4
|
+
<div class="pulitzer-span ten-percent">
|
5
|
+
<%= ajax_link "Edit", edit_justification_style_path(justification_style), {}, dom_target(justification_style) %>
|
6
|
+
</div>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= ajax_delete 'Delete', justification_style_path(justification_style), {}, dom_target(justification_style) %>
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="<%= dom_id ffst, :partial_container %>"
|
1
|
+
<div id="<%= dom_id ffst, :partial_container %>" >
|
2
2
|
<% @ffst.partial_types.each do |partial_type| %>
|
3
3
|
<%= render partial: '/pulitzer/partial_types/show_wrapper', locals: { partial_type: partial_type } %>
|
4
4
|
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<div id="<%= dom_id ffst, :partials %>">
|
8
8
|
<div class="pulitzer-row margin-bottom list-item">
|
9
|
-
<%= ajax_link "add a new partial for #{ffst.name}", new_partial_type_path({ffst_id: ffst}), {}, dom_target(ffst, :new_partial) %>
|
9
|
+
<%= ajax_link "add a new required partial for #{ffst.name}", new_partial_type_path({ffst_id: ffst}), {}, dom_target(ffst, :new_partial) %>
|
10
10
|
<div id="<%= dom_id(ffst, :new_partial) %>"></div>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -1,20 +1,9 @@
|
|
1
1
|
<%= render 'pulitzer/shared/error_messages', object: partial_type %>
|
2
2
|
<%= form_for partial_type, html: ajax_form_hash(dom_target(partial_type.free_form_section_type, :partial_container), insert_method: 'append', empty_on_success: dom_target(partial_type.free_form_section_type, :new_partial)) do |f| %>
|
3
3
|
<%= f.hidden_field :free_form_section_type_id %>
|
4
|
-
<%= f.label :label %>
|
5
|
-
<%= f.text_field :label %>
|
6
4
|
<%= f.label :post_type_id, 'Partial Type' %>
|
7
5
|
<%= f.collection_select :post_type_id, Pulitzer::PostType.partials, :id, :name, {}, revealer(dom_id(partial_type.free_form_section_type, :new_partial_type), highlander: true) %>
|
8
|
-
<div <%= revealer_target_attrs(dom_id(partial_type.free_form_section_type, :new_partial_type)) %>>
|
9
|
-
<% Pulitzer::PostType.partials.each do |post_type| %>
|
10
|
-
<div <%= revealer_option_attrs(dom_id(partial_type.free_form_section_type, :new_partial_type), trigger: post_type.id) %>>
|
11
|
-
<%= f.label :layout_id, 'Layout' %>
|
12
|
-
<%= f.collection_select :layout_id, post_type.layouts, :id, :name, {}, {} %>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
</div>
|
16
6
|
|
17
7
|
<%= submit_tag "Create" %>
|
18
|
-
<%=
|
19
|
-
data: { emptier: true, target: dom_target(partial_type.free_form_section_type, :new_partial) } ) %>
|
8
|
+
<a class="button" data-emptier="true" data-target="<%= dom_target(partial_type.free_form_section_type, :new_partial) %>">Close</a>
|
20
9
|
<% end %>
|
@@ -1,6 +1,16 @@
|
|
1
|
-
<div class="pulitzer-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div class="pulitzer-span one-fifth empty padding"> </div>
|
2
|
+
<div class="pulitzer-span one-fifth empty margin">
|
3
|
+
<% if partial_type.first? %>
|
4
|
+
<a data-emptier="true" data-target="<%= dom_target(partial_type.free_form_section_type, :associations_container) %>">close required partials</a>
|
5
|
+
<% else %>
|
6
|
+
|
7
|
+
<% end %>
|
6
8
|
</div>
|
9
|
+
<div class="pulitzer-span one-fifth margin">
|
10
|
+
<div class="pulitzer-row">
|
11
|
+
<div class="pulitzer-span"><%= partial_type.post_type.name %></div>
|
12
|
+
<div class="pulitzer-span right"><%= ajax_delete 'ⓧ', partial_type_path(partial_type), {}, dom_target(partial_type) %></div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<div class="pulitzer-span one-fifth empty"> </div>
|
16
|
+
<div class="pulitzer-span one-fifth empty padding"> </div>
|
@@ -1,19 +1,37 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
|
-
<div class="pulitzer-span margin"><h5><%= partial.name %></h5></div>
|
3
2
|
<div class="pulitzer-span right">
|
4
3
|
<%= render partial: '/pulitzer/shared/drag_handle' %>
|
5
4
|
</div>
|
6
5
|
</div>
|
7
6
|
<%= render 'pulitzer/shared/error_messages', object: partial %>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<% end %>
|
7
|
+
<div class="pulitzer-row">
|
8
|
+
<%= form_for partial, html: ajax_form_hash(dom_target(partial)), multipart: true,
|
9
|
+
data: { server_endpoint: partial_path(partial) } do |f| %>
|
10
|
+
<div class="pulitzer-span one-fifth">
|
11
|
+
<%= f.text_field :label %>
|
12
|
+
</div>
|
13
|
+
<div class="pulitzer-span <%= partial.available_arrangements.any? ? 'ten-percent' : 'one-fifth' %>"><%= partial.folder_path %>/<%= partial.available_arrangements.empty? ? partial.template_path : '' %></div>
|
14
|
+
<% if partial.available_arrangements.any? %>
|
15
|
+
<div class="pulitzer-span ten-percent">
|
16
|
+
<%= f.collection_select :arrangement_style_id, partial.available_arrangements, :id, :display_name, {}, {} %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
<div class="pulitzer-span ten-percent">
|
20
|
+
<%= f.collection_select :background_style_id, partial.available_backgrounds, :id, :display_name, {}, {} %>
|
21
|
+
</div>
|
22
|
+
<div class="pulitzer-span ten-percent">
|
23
|
+
<%= f.collection_select :justification_style_id, partial.available_justifications, :id, :display_name, {}, {} %>
|
24
|
+
</div>
|
25
|
+
<div class="pulitzer-span one-fifth">
|
26
|
+
<%= f.collection_select :sequence_flow_style_id, partial.available_sequence_flows, :id, :display_name, {}, {} %>
|
27
|
+
</div>
|
28
|
+
<div class="pulitzer-span ten-percent">
|
29
|
+
<%= submit_tag "Update" %>
|
30
|
+
</div>
|
31
|
+
<div class="pulitzer-span ten-percent">
|
32
|
+
<%= link_to('Cancel', partial_path(partial), :class => 'button',
|
33
|
+
data: { ajax_link: true, ajax_target: dom_target(partial) } ) %>
|
34
|
+
<%= ajax_delete 'delete', partial_path(partial), {class: 'button'}, dom_target(partial) %>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
</div>
|
@@ -1,20 +1,39 @@
|
|
1
1
|
<%= render 'pulitzer/shared/error_messages', object: partial %>
|
2
2
|
<%= form_for partial, html: ajax_form_hash(dom_target(partial.free_form_section, :partial_container), insert_method: 'append', empty_on_success: dom_target(partial.free_form_section, :new_partial)) do |f| %>
|
3
3
|
<%= f.hidden_field :free_form_section_id %>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
<div class="pulitzer-span one-fifth">
|
5
|
+
<%= f.text_field :label %>
|
6
|
+
</div>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= f.collection_select :post_type_id, Pulitzer::PostType.partials, :id, :name, {}, revealer(dom_id(partial.free_form_section, :new_partial_type), highlander: true) %>
|
9
|
+
</div>
|
10
|
+
<div class="pulitzer-span one-half" <%= revealer_target_attrs(dom_id(partial.free_form_section, :new_partial_type)) %>>
|
9
11
|
<% Pulitzer::PostType.partials.each do |post_type| %>
|
10
|
-
<div <%= revealer_option_attrs(dom_id(partial.free_form_section, :new_partial_type), trigger: post_type.id) %>>
|
11
|
-
|
12
|
-
|
12
|
+
<div class="pulitzer-row" <%= revealer_option_attrs(dom_id(partial.free_form_section, :new_partial_type), trigger: post_type.id) %>>
|
13
|
+
<div class="pulitzer-span one-fifth">
|
14
|
+
<% if post_type.arrangement_styles.any? %>
|
15
|
+
<%= f.collection_select :arrangement_style_id, post_type.arrangement_styles, :id, :display_name, {}, {} %>
|
16
|
+
<% else %>
|
17
|
+
|
18
|
+
<% end %>
|
19
|
+
</div>
|
20
|
+
<div class="pulitzer-span one-fifth">
|
21
|
+
<%= f.collection_select :background_style_id, post_type.background_styles, :id, :display_name, {}, {} %>
|
22
|
+
</div>
|
23
|
+
<div class="pulitzer-span one-fifth">
|
24
|
+
<%= f.collection_select :justification_style_id, post_type.justification_styles, :id, :display_name, {}, {} %>
|
25
|
+
</div>
|
26
|
+
<div class="pulitzer-span two-fifths">
|
27
|
+
<%= f.collection_select :sequence_flow_style_id, post_type.sequence_flow_styles, :id, :display_name, {}, {} %>
|
28
|
+
</div>
|
13
29
|
</div>
|
14
30
|
<% end %>
|
15
31
|
</div>
|
16
32
|
|
17
|
-
|
18
|
-
|
19
|
-
|
33
|
+
<div class="pulitzer-span ten-percent">
|
34
|
+
<%= submit_tag "Create" %>
|
35
|
+
</div>
|
36
|
+
<div class="pulitzer-span ten-percent">
|
37
|
+
<a class="button" data-emptier="true" data-target="<%= dom_target(partial.free_form_section, :new_partial)%>">Close</a>
|
38
|
+
</div>
|
20
39
|
<% end %>
|
@@ -1,10 +1,14 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
2
|
<div class="pulitzer-span margin match-h5" <%= expander(dom_id(partial)) %>>▸</div>
|
3
3
|
<div class="pulitzer-span margin match-h5" <%= collapser(dom_id(partial)) %>>▾</div>
|
4
|
-
<div class="pulitzer-span margin"><h5><%= partial.label %></h5></div>
|
5
|
-
<div class="pulitzer-span match-h5"
|
6
|
-
|
7
|
-
|
4
|
+
<div class="pulitzer-span one-fifth margin"><h5><%= partial.label %></h5></div>
|
5
|
+
<div class="pulitzer-span one-fifth margin match-h5">
|
6
|
+
<%= partial.folder_path %>/<%= partial.template_path %>
|
7
|
+
</div>
|
8
|
+
<div class="pulitzer-span margin match-h5 ten-percent"><%= partial.background_style&.display_name %></div>
|
9
|
+
<div class="pulitzer-span margin match-h5 ten-percent"><%= partial.justification_style&.display_name %></div>
|
10
|
+
<div class="pulitzer-span margin match-h5 one-fifth"><%= partial.sequence_flow_style&.display_name %></div>
|
11
|
+
<div class="pulitzer-span match-h5 ten-percent"><%= ajax_link 'edit design', edit_partial_path(partial), {}, dom_target(partial) %></div>
|
8
12
|
<div class="pulitzer-span right">
|
9
13
|
<%= render partial: '/pulitzer/shared/drag_handle' %>
|
10
14
|
</div>
|
@@ -1,6 +1,12 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<%= form_for ptcet, html: ajax_form_hash(dom_target(ptcet)) do |f| %>
|
3
|
+
<%= render partial: 'form_fields', locals: { f: f, ptcet: ptcet } %>
|
4
|
+
<div class="pulitzer-span ten-percent">
|
5
|
+
<%= f.submit "Update" %>
|
6
|
+
</div>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= link_to('Cancel', post_type_content_element_type_path(ptcet), :class => 'button',
|
9
|
+
data: { ajax_link: true, ajax_target: dom_target(ptcet) } ) %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
@@ -1,30 +1,32 @@
|
|
1
|
-
|
2
|
-
<%= f.text_field :label %>
|
3
|
-
|
4
|
-
|
1
|
+
<div class="pulitzer-span one-fifth">
|
2
|
+
<%= f.text_field :label %>
|
3
|
+
</div>
|
4
|
+
<div class="pulitzer-span one-fifth">
|
5
|
+
<%= f.collection_select :content_element_type_id, Pulitzer::ContentElementType.all, :id, :name, {},
|
5
6
|
revealer(dom_id(ptcet, :revealer), highlander: true) %>
|
7
|
+
</div>
|
6
8
|
<%= f.hidden_field :post_type_id %>
|
7
9
|
|
8
10
|
<div <%= revealer_target_attrs(dom_id(ptcet, :revealer)) %>></div>
|
9
11
|
|
10
|
-
<div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Image').id) %> >
|
11
|
-
<%= f.label :height %>
|
12
|
+
<div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Image').id) %> class="pulitzer-span one-fifth">
|
12
13
|
<%= f.text_field :height, placeholder: 'Height' %>
|
13
|
-
|
14
|
+
x
|
14
15
|
<%= f.text_field :width, placeholder: 'Width' %>
|
15
16
|
</div>
|
16
17
|
|
17
|
-
<div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Text').id) %> >
|
18
|
-
<%= f.label :text_editor, "Text editor" %>
|
18
|
+
<div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Text').id) %> class="pulitzer-span one-fifth">
|
19
19
|
<%= f.select :text_editor, Pulitzer.text_editor_toolbars.map { |t| t[:name] } %>
|
20
20
|
</div>
|
21
21
|
|
22
|
-
<div>
|
23
|
-
|
22
|
+
<div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Video').id) %> class="pulitzer-span one-fifth">
|
23
|
+
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="pulitzer-span ten-percent">
|
24
27
|
<%= f.check_box :required %>
|
25
28
|
</div>
|
26
29
|
|
27
|
-
<div>
|
28
|
-
<%= f.label :sort_order %>
|
30
|
+
<div class="pulitzer-span ten-percent">
|
29
31
|
<%= f.text_field :sort_order %>
|
30
32
|
</div>
|
@@ -1,6 +1,11 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<%= form_for ptcet, html: ajax_form_hash("#post_type_content_element_types_container_#{dom_id(ptcet.post_type)}", insert_method: 'append', reset_on_success: true) do |f| %>
|
3
|
+
<%= render partial: 'form_fields', locals: { f: f, ptcet: ptcet } %>
|
4
|
+
<div class="pulitzer-span ten-percent">
|
5
|
+
<%= f.submit "Create", data: { disable_with: false } %>
|
6
|
+
</div>
|
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.post_type)%>" >Close</a>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
@@ -1,10 +1,17 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<%=
|
6
|
-
</
|
7
|
-
<
|
1
|
+
<div class="pulitzer-row">
|
2
|
+
<div class="pulitzer-span one-fifth"><%= ptcet.label %></div>
|
3
|
+
<div class="pulitzer-span one-fifth"><%= ptcet.content_element_type.name %></div>
|
4
|
+
<div class="pulitzer-span one-fifth">
|
5
|
+
<%= ptcet.type_specific_display %>
|
6
|
+
</div>
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
|
+
<%= ptcet.required? ? 'required' : 'optional' %>
|
9
|
+
</div>
|
10
|
+
<div class="pulitzer-span ten-percent">
|
11
|
+
<%= ptcet.sort_order %>
|
12
|
+
</div>
|
13
|
+
<div class="pulitzer-span ten-percent">
|
14
|
+
<%= ajax_link "Edit", edit_post_type_content_element_type_path(ptcet), {}, dom_target(ptcet) %> |
|
8
15
|
<%= ajax_delete 'Delete', post_type_content_element_type_path(ptcet), {}, dom_target(ptcet) %>
|
9
|
-
</
|
10
|
-
</
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<
|
1
|
+
<div class="pulitzer-row" id="<%= dom_id(ptcet) %>">
|
2
2
|
<%= render partial: '/pulitzer/post_type_content_element_types/show', locals: {ptcet: ptcet} %>
|
3
|
-
</
|
3
|
+
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= form_for post_type, html: ajax_form_hash("##{post_type.kind}s_container", insert_method: 'append', empty_on_success: "#new_#{post_type.kind}") do |f| %>
|
2
2
|
<%= render partial: 'form_fields', locals: { f: f } %>
|
3
3
|
<div class="pulitzer-span margin"><%= f.submit "Create" %></div>
|
4
|
-
<div class="button pulitzer-span" <%= emptier "#new_#{post_type.kind}" %>>
|
4
|
+
<div class="button pulitzer-span" <%= emptier "#new_#{post_type.kind}" %>>Close</div>
|
5
5
|
<% end %>
|
6
6
|
<%= render 'pulitzer/shared/error_messages', object: post_type %>
|
@@ -1,28 +1,28 @@
|
|
1
1
|
<div class="pulitzer-row">
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<div class="pulitzer-row padding">
|
3
|
+
<div class="pulitzer-span one-quarter"><%= post_type.name %></div>
|
4
4
|
<% unless post_type.partial? %>
|
5
|
-
<
|
5
|
+
<div class="pulitzer-span margin ten-percent"><%= link_to_posts(post_type, 'Index', 'Manage') %></div>
|
6
6
|
<% end %>
|
7
|
-
<
|
7
|
+
<div class="pulitzer-span ten-percent">
|
8
8
|
<% if 'template' == action_name %>
|
9
9
|
<%= ajax_link 'Template', post_type_path(post_type), {}, dom_target(post_type) %>
|
10
10
|
<% else %>
|
11
11
|
<%= ajax_link 'Template', template_post_type_path(post_type), {}, dom_target(post_type) %>
|
12
12
|
<% end %>
|
13
|
-
</
|
14
|
-
<
|
13
|
+
</div>
|
14
|
+
<div class="pulitzer-span ten-percent">
|
15
15
|
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
16
16
|
<%= ajax_link "Details", edit_post_type_path(post_type), {}, dom_target(post_type) %>
|
17
17
|
<% else %>
|
18
18
|
<%= post_type.name %>
|
19
19
|
<% end %>
|
20
|
-
</
|
20
|
+
</div>
|
21
21
|
<% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
|
22
|
-
<
|
22
|
+
<div class="pulitzer-span ten-percent">
|
23
23
|
<%= ajax_delete 'Delete', post_type_path(post_type), {}, dom_target(post_type) %>
|
24
|
-
</
|
24
|
+
</div>
|
25
25
|
<% end %>
|
26
|
-
</
|
26
|
+
</div>
|
27
27
|
|
28
28
|
</div>
|
@@ -1,33 +1,102 @@
|
|
1
1
|
<%= render partial: 'show', locals: {post_type: post_type} %>
|
2
|
-
<div class="pulitzer-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<div class="pulitzer-row highlight-off-white">
|
3
|
+
<div class="pulitzer-indent" id="<%= dom_id(post_type, :template) %>">
|
4
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type, :post_type_content_element_types_wrapper) %>">
|
5
|
+
<h4>Content Elements</h4>
|
6
|
+
<div class="pulitzer-row heading">
|
7
|
+
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
8
|
+
<div class="pulitzer-span one-fifth heading">Content Type</div>
|
9
|
+
<div class="pulitzer-span one-fifth heading">Details</div>
|
10
|
+
<div class="pulitzer-span ten-percent heading">Required</div>
|
11
|
+
<div class="pulitzer-span ten-percent heading">Sort</div>
|
12
|
+
</div>
|
13
|
+
<div id="post_type_content_element_types_container_<%= dom_id(post_type) %>">
|
14
|
+
<% post_type.post_type_content_element_types.each do |ptcet| %>
|
15
|
+
<%= render partial: '/pulitzer/post_type_content_element_types/show_wrapper', locals: {ptcet: ptcet} %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
<div id="new_post_type_content_element_type_<%= dom_id(post_type) %>"></div>
|
19
|
+
<%= ajax_link 'add a new content element for ' + post_type.name, new_post_type_content_element_type_path(post_type_id: post_type.id), {}, "#new_post_type_content_element_type_#{dom_id(post_type)}" %>
|
20
|
+
</div>
|
21
|
+
<% unless post_type.partial? %>
|
22
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type, :free_form_section_types_wrapper) %>">
|
23
|
+
<h4>Free Form Sections</h4>
|
24
|
+
<div class="pulitzer-row heading">
|
25
|
+
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
26
|
+
<div class="pulitzer-span one-fifth heading">Sort</div>
|
27
|
+
</div>
|
28
|
+
<div id="<%= dom_id(post_type, :free_form_section_types_container) %>">
|
29
|
+
<% post_type.free_form_section_types.each do |ffst| %>
|
30
|
+
<%= render partial: '/pulitzer/free_form_section_types/show_wrapper', locals: {ffst: ffst} %>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
33
|
+
<div id="<%= dom_id(post_type, :new_free_form_section_type) %>"></div>
|
34
|
+
<%= ajax_link 'add a new section for ' + post_type.name, new_free_form_section_type_path(post_type_id: post_type.id), {}, dom_target(post_type, :new_free_form_section_type) %>
|
35
|
+
</div>
|
7
36
|
<% end %>
|
8
|
-
</div>
|
9
|
-
<%= ajax_link 'add a new content element for ' + post_type.name, new_post_type_content_element_type_path(post_type_id: post_type.id), {}, "#new_post_type_content_element_type_#{dom_id(post_type)}" %>
|
10
|
-
<div id="new_post_type_content_element_type_<%= dom_id(post_type) %>"></div>
|
11
37
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
38
|
+
<% if post_type.partial? %>
|
39
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type, :background_styles_wrapper) %>">
|
40
|
+
<h4>Background Styles</h4>
|
41
|
+
<div class="pulitzer-row heading">
|
42
|
+
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
43
|
+
<div class="pulitzer-span one-fifth heading">Css Class</div>
|
44
|
+
</div>
|
45
|
+
<div id="<%= dom_id(post_type, :background_styles_container) %>">
|
46
|
+
<% post_type.background_styles.each do |bg_style| %>
|
47
|
+
<%= render partial: '/pulitzer/background_styles/show_wrapper', locals: {background_style: bg_style} %>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
<div class="pulitzer-row" id="<%= dom_id(post_type, :new_background_style) %>"></div>
|
51
|
+
<div class="pulitzer-row">
|
52
|
+
<%= ajax_link 'add a new background style for ' + post_type.name, new_background_style_path(background_style: {post_type_id: post_type.id}), {}, dom_target(post_type, :new_background_style) %>
|
53
|
+
</div>
|
54
|
+
</div>
|
22
55
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
</div>
|
56
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type, :justification_styles_wrapper) %>">
|
57
|
+
<h4>Justification Styles</h4>
|
58
|
+
<div class="pulitzer-row heading">
|
59
|
+
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
60
|
+
<div class="pulitzer-span one-fifth heading">Css Class</div>
|
61
|
+
</div>
|
62
|
+
<div id="<%= dom_id(post_type, :justification_styles_container) %>">
|
63
|
+
<% post_type.justification_styles.each do |just_style| %>
|
64
|
+
<%= render partial: '/pulitzer/justification_styles/show_wrapper', locals: {justification_style: just_style} %>
|
65
|
+
<% end %>
|
66
|
+
</div>
|
67
|
+
<div id="<%= dom_id(post_type, :new_justification_style) %>"></div>
|
68
|
+
<%= ajax_link 'add a new justification style for ' + post_type.name, new_justification_style_path(justification_style: {post_type_id: post_type.id}), {}, dom_target(post_type, :new_justification_style) %>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type, :sequence_flow_styles_wrapper) %>">
|
72
|
+
<h4>Sequence Flow Styles</h4>
|
73
|
+
<div class="pulitzer-row heading">
|
74
|
+
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
75
|
+
<div class="pulitzer-span one-fifth heading">Css Class</div>
|
76
|
+
</div>
|
77
|
+
<div id="<%= dom_id(post_type, :sequence_flow_styles_container) %>">
|
78
|
+
<% post_type.sequence_flow_styles.each do |seq_style| %>
|
79
|
+
<%= render partial: '/pulitzer/sequence_flow_styles/show_wrapper', locals: {sequence_flow_style: seq_style} %>
|
80
|
+
<% end %>
|
81
|
+
</div>
|
82
|
+
<div id="<%= dom_id(post_type, :new_sequence_flow_style) %>"></div>
|
83
|
+
<%= ajax_link 'add a new sequence_flow style for ' + post_type.name, new_sequence_flow_style_path(sequence_flow_style: {post_type_id: post_type.id}), {}, dom_target(post_type, :new_sequence_flow_style) %>
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<div class="pulitzer-row margin-bottom" id="<%= dom_id(post_type, :arrangement_styles_wrapper) %>">
|
87
|
+
<h4>Arrangement Styles</h4>
|
88
|
+
<div class="pulitzer-row heading">
|
89
|
+
<div class="pulitzer-span one-fifth heading">Editor Display</div>
|
90
|
+
<div class="pulitzer-span one-fifth heading">Rails View File</div>
|
91
|
+
</div>
|
92
|
+
<div id="<%= dom_id(post_type, :arrangement_styles_container) %>">
|
93
|
+
<% post_type.arrangement_styles.each do |arr_style| %>
|
94
|
+
<%= render partial: '/pulitzer/arrangement_styles/show_wrapper', locals: {arrangement_style: arr_style} %>
|
95
|
+
<% end %>
|
96
|
+
</div>
|
97
|
+
<div id="<%= dom_id(post_type, :new_arrangement_style) %>"></div>
|
98
|
+
<%= ajax_link 'add a new arrangement style for ' + post_type.name, new_arrangement_style_path(arrangement_style: {post_type_id: post_type.id}), {}, dom_target(post_type, :new_arrangement_style) %>
|
99
|
+
</div>
|
100
|
+
<% end %>
|
101
|
+
</div>
|
102
|
+
</div>
|