pulitzer 0.12.5 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/pulitzer.scss +107 -4
  3. data/app/controllers/pulitzer/arrangement_styles_controller.rb +52 -0
  4. data/app/controllers/pulitzer/background_styles_controller.rb +52 -0
  5. data/app/controllers/pulitzer/content_elements_controller.rb +2 -2
  6. data/app/controllers/pulitzer/free_form_section_types_controller.rb +2 -2
  7. data/app/controllers/pulitzer/justification_styles_controller.rb +52 -0
  8. data/app/controllers/pulitzer/layouts_controller.rb +2 -2
  9. data/app/controllers/pulitzer/partial_types_controller.rb +1 -1
  10. data/app/controllers/pulitzer/partials_controller.rb +2 -2
  11. data/app/controllers/pulitzer/post_tags_controller.rb +2 -2
  12. data/app/controllers/pulitzer/post_type_content_element_types_controller.rb +2 -2
  13. data/app/controllers/pulitzer/post_types_controller.rb +2 -2
  14. data/app/controllers/pulitzer/posts_controller.rb +1 -1
  15. data/app/controllers/pulitzer/sequence_flow_styles_controller.rb +52 -0
  16. data/app/controllers/pulitzer/tags_controller.rb +3 -3
  17. data/app/interactions/pulitzer/update_post_type_content_elements.rb +1 -1
  18. data/app/models/pulitzer/arrangement_style.rb +8 -0
  19. data/app/models/pulitzer/background_style.rb +8 -0
  20. data/app/models/pulitzer/content_element.rb +4 -0
  21. data/app/models/pulitzer/free_form_section_type.rb +5 -1
  22. data/app/models/pulitzer/justification_style.rb +8 -0
  23. data/app/models/pulitzer/partial.rb +39 -5
  24. data/app/models/pulitzer/partial_type.rb +2 -10
  25. data/app/models/pulitzer/post.rb +1 -1
  26. data/app/models/pulitzer/post_type.rb +4 -5
  27. data/app/models/pulitzer/post_type_content_element_type.rb +20 -1
  28. data/app/models/pulitzer/sequence_flow_style.rb +8 -0
  29. data/app/views/pulitzer/arrangement_styles/_form.html.erb +14 -0
  30. data/app/views/pulitzer/arrangement_styles/_form_fields.html.erb +6 -0
  31. data/app/views/pulitzer/arrangement_styles/_new.html.erb +12 -0
  32. data/app/views/pulitzer/arrangement_styles/_show.html.erb +10 -0
  33. data/app/views/pulitzer/arrangement_styles/_show_wrapper.html.erb +3 -0
  34. data/app/views/pulitzer/background_styles/_form.html.erb +14 -0
  35. data/app/views/pulitzer/background_styles/_form_fields.html.erb +6 -0
  36. data/app/views/pulitzer/background_styles/_new.html.erb +12 -0
  37. data/app/views/pulitzer/background_styles/_show.html.erb +10 -0
  38. data/app/views/pulitzer/background_styles/_show_wrapper.html.erb +3 -0
  39. data/app/views/pulitzer/free_form_section_types/_form.html.erb +16 -7
  40. data/app/views/pulitzer/free_form_section_types/_form_fields.html.erb +6 -4
  41. data/app/views/pulitzer/free_form_section_types/_new.html.erb +12 -7
  42. data/app/views/pulitzer/free_form_section_types/_show.html.erb +10 -12
  43. data/app/views/pulitzer/free_form_section_types/_show_wrapper.html.erb +2 -2
  44. data/app/views/pulitzer/justification_styles/_form.html.erb +14 -0
  45. data/app/views/pulitzer/justification_styles/_form_fields.html.erb +6 -0
  46. data/app/views/pulitzer/justification_styles/_new.html.erb +12 -0
  47. data/app/views/pulitzer/justification_styles/_show.html.erb +10 -0
  48. data/app/views/pulitzer/justification_styles/_show_wrapper.html.erb +3 -0
  49. data/app/views/pulitzer/partial_types/_index.html.erb +2 -2
  50. data/app/views/pulitzer/partial_types/_new.html.erb +1 -12
  51. data/app/views/pulitzer/partial_types/_show.html.erb +15 -5
  52. data/app/views/pulitzer/partial_types/_show_wrapper.html.erb +1 -1
  53. data/app/views/pulitzer/partials/_form.html.erb +31 -13
  54. data/app/views/pulitzer/partials/_new.html.erb +30 -11
  55. data/app/views/pulitzer/partials/_show.html.erb +8 -4
  56. data/app/views/pulitzer/post_type_content_element_types/_form.html.erb +12 -6
  57. data/app/views/pulitzer/post_type_content_element_types/_form_fields.html.erb +15 -13
  58. data/app/views/pulitzer/post_type_content_element_types/_new.html.erb +11 -6
  59. data/app/views/pulitzer/post_type_content_element_types/_show.html.erb +16 -9
  60. data/app/views/pulitzer/post_type_content_element_types/_show_wrapper.html.erb +2 -2
  61. data/app/views/pulitzer/post_types/_new.html.erb +1 -1
  62. data/app/views/pulitzer/post_types/_show.html.erb +10 -10
  63. data/app/views/pulitzer/post_types/_template.html.erb +98 -29
  64. data/app/views/pulitzer/sequence_flow_styles/_form.html.erb +14 -0
  65. data/app/views/pulitzer/sequence_flow_styles/_form_fields.html.erb +6 -0
  66. data/app/views/pulitzer/sequence_flow_styles/_new.html.erb +12 -0
  67. data/app/views/pulitzer/sequence_flow_styles/_show.html.erb +10 -0
  68. data/app/views/pulitzer/sequence_flow_styles/_show_wrapper.html.erb +3 -0
  69. data/config/routes.rb +5 -1
  70. data/db/migrate/20170518142411_create_pulitzer_background_classes.rb +9 -0
  71. data/db/migrate/20170518144418_create_pulitzer_justification_classes.rb +9 -0
  72. data/db/migrate/20170518144449_create_pulitzer_sequence_flow_classes.rb +9 -0
  73. data/db/migrate/20170518144515_create_pulitzer_arrangement_classes.rb +9 -0
  74. data/db/migrate/20170518145318_convert_pulitzer_layouts.rb +9 -0
  75. data/lib/pulitzer/content_element_helper.rb +5 -3
  76. data/lib/pulitzer/version.rb +1 -1
  77. data/spec/controllers/pulitzer/free_form_section_types_controller_spec.rb +6 -6
  78. data/spec/controllers/pulitzer/partials_controller_spec.rb +7 -7
  79. data/spec/controllers/pulitzer/post_types_controller_spec.rb +3 -3
  80. data/spec/controllers/pulitzer/versions_controller_spec.rb +8 -8
  81. data/spec/controllers/tags_controller_spec.rb +28 -29
  82. data/spec/dummy/app/controllers/application_controller.rb +1 -1
  83. data/spec/dummy/config/application.rb +0 -1
  84. data/spec/dummy/config/environments/test.rb +2 -2
  85. data/spec/dummy/db/schema.rb +30 -2
  86. data/spec/dummy/db/test.sqlite3 +0 -0
  87. data/spec/dummy/log/test.log +0 -3971
  88. data/spec/factories/partial_type.rb +0 -1
  89. data/spec/rails_helper.rb +1 -1
  90. metadata +35 -9
  91. data/app/views/pulitzer/layouts/_form.html.erb +0 -8
  92. data/app/views/pulitzer/layouts/_form_fields.html.erb +0 -2
  93. data/app/views/pulitzer/layouts/_new.html.erb +0 -7
  94. data/app/views/pulitzer/layouts/_show.html.erb +0 -9
  95. data/app/views/pulitzer/layouts/_show_wrapper.html.erb +0 -3
  96. data/spec/factories/layout.rb +0 -6
@@ -1,3 +1,3 @@
1
- <li id="<%= dom_id(ffst) %>">
1
+ <div class="pulitzer-row" id="<%= dom_id(ffst) %>">
2
2
  <%= render partial: '/pulitzer/free_form_section_types/show', locals: {ffst: ffst} %>
3
- </li>
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,6 @@
1
+ <div class="pulitzer-span one-fifth">
2
+ <%= f.text_field :display_name %>
3
+ </div>
4
+ <div class="pulitzer-span one-fifth">
5
+ <%= f.text_field :css_class_name %>
6
+ </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>
@@ -0,0 +1,3 @@
1
+ <div class="pulitzer-row" id="<%= dom_id(justification_style) %>">
2
+ <%= render partial: '/pulitzer/justification_styles/show', locals: {justification_style: justification_style} %>
3
+ </div>
@@ -1,4 +1,4 @@
1
- <div id="<%= dom_id ffst, :partial_container %>" data-sorter href="<%= update_all_partial_types_path %>">
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
- <%= link_to('Cancel', '#', :class => 'button',
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-row">
2
- <div class="pulitzer-span margin"><h5><%= partial_type.label %></h5></div>
3
- <div class="pulitzer-span match-h5"><%= partial_type.folder_path %>/</div>
4
- <div class="pulitzer-span margin match-h5"><%= partial_type.template_path %></div>
5
- <div class="pulitzer-span match-h5"><%= ajax_link 'edit', edit_partial_type_path(partial_type), {}, dom_target(partial_type) %></div>
1
+ <div class="pulitzer-span one-fifth empty padding">&nbsp;</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
+ &nbsp;
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">&nbsp;</div>
16
+ <div class="pulitzer-span one-fifth empty padding">&nbsp;</div>
@@ -1,3 +1,3 @@
1
- <div class="pulitzer-row margin-bottom list-item" id="<%= dom_id(partial_type) %>">
1
+ <div class="pulitzer-row" id="<%= dom_id(partial_type) %>">
2
2
  <%= render partial: '/pulitzer/partial_types/show', locals: { partial_type: partial_type } %>
3
3
  </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
- <%= form_for partial, html: ajax_form_hash(dom_target(partial)), multipart: true,
9
- data: { server_endpoint: partial_path(partial) } do |f| %>
10
- <%= f.label :label %>
11
- <%= f.text_field :label %>
12
- <%= f.label :layout_id, 'Layout' %>
13
- <%= f.collection_select :layout_id, partial.available_layouts, :id, :name, {}, {} %>
14
- <%= submit_tag "Update" %>
15
- <%= link_to('Cancel', partial_path(partial), :class => 'button',
16
- data: { ajax_link: true, ajax_target: dom_target(partial) } ) %>
17
- or
18
- <%= ajax_delete 'delete', partial_path(partial), {class: 'button'}, dom_target(partial) %>
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
- <%= f.label :label %>
5
- <%= f.text_field :label %>
6
- <%= f.label :post_type_id, 'Partial Type' %>
7
- <%= f.collection_select :post_type_id, Pulitzer::PostType.partials, :id, :name, {}, revealer(dom_id(partial.free_form_section, :new_partial_type), highlander: true) %>
8
- <div <%= revealer_target_attrs(dom_id(partial.free_form_section, :new_partial_type)) %>>
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
- <%= f.label :layout_id, 'Layout' %>
12
- <%= f.collection_select :layout_id, post_type.layouts, :id, :name, {}, {} %>
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
+ &nbsp;
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
- <%= submit_tag "Create" %>
18
- <%= link_to('Cancel', '#', :class => 'button',
19
- data: { emptier: true, target: dom_target(partial.free_form_section, :new_partial) } ) %>
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)) %>>&rtrif;</div>
3
3
  <div class="pulitzer-span margin match-h5" <%= collapser(dom_id(partial)) %>>&dtrif;</div>
4
- <div class="pulitzer-span margin"><h5><%= partial.label %></h5></div>
5
- <div class="pulitzer-span match-h5"><%= partial.folder_path %>/</div>
6
- <div class="pulitzer-span margin match-h5"><%= partial.template_path %></div>
7
- <div class="pulitzer-span match-h5"><%= ajax_link 'edit', edit_partial_path(partial), {}, dom_target(partial) %></div>
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
- <%= form_for ptcet, html: ajax_form_hash(dom_target(ptcet)) do |f| %>
2
- <%= render partial: 'form_fields', locals: { f: f, ptcet: ptcet } %>
3
- <%= f.submit "Update" %>
4
- <%= link_to('Cancel', post_type_content_element_type_path(ptcet), :class => 'button',
5
- data: { ajax_link: true, ajax_target: dom_target(ptcet) } ) %>
6
- <% end %>
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
- <%= f.label :label %>
2
- <%= f.text_field :label %>
3
- <%= f.label :content_element_type_id, "Type" %>
4
- <%= f.collection_select :content_element_type_id, Pulitzer::ContentElementType.all, :id, :name, {},
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
- <%= f.label :width %>
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
- <%= f.label :required %>
22
+ <div <%= revealer_option_attrs(dom_id(ptcet, :revealer), trigger: Pulitzer::ContentElementType.find_by(name: 'Video').id) %> class="pulitzer-span one-fifth">
23
+ &nbsp;
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
- <%= form_for ptcet, html: ajax_form_hash("#post_type_content_element_types_container_#{dom_id(ptcet.post_type)}", insert_method: 'append') do |f| %>
2
- <%= render partial: 'form_fields', locals: { f: f, ptcet: ptcet } %>
3
- <%= f.submit "Create", data: { disable_with: false } %>
4
- <%= link_to('Close', '#', :class => 'button',
5
- data: { emptier: true, target: "#new_post_type_content_element_type_#{dom_id(ptcet.post_type)}" } ) %>
6
- <% end %>
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
- <ul class="inline-list">
2
- <li><%= ptcet.label %></li>
3
- <li><%= ptcet.content_element_type.name %></li>
4
- <li>
5
- <%= ajax_link "Edit", edit_post_type_content_element_type_path(ptcet), {}, dom_target(ptcet) %>
6
- </li>
7
- <li>
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
- </li>
10
- </ul>
16
+ </div>
17
+ </div>
@@ -1,3 +1,3 @@
1
- <li id="<%= dom_id(ptcet) %>">
1
+ <div class="pulitzer-row" id="<%= dom_id(ptcet) %>">
2
2
  <%= render partial: '/pulitzer/post_type_content_element_types/show', locals: {ptcet: ptcet} %>
3
- </li>
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}" %>>Cancel</div>
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
- <ul class="inline-list">
3
- <li><%= post_type.name %></li>
2
+ <div class="pulitzer-row padding">
3
+ <div class="pulitzer-span one-quarter"><%= post_type.name %></div>
4
4
  <% unless post_type.partial? %>
5
- <li><%= link_to_posts(post_type, 'Index', 'Manage') %></li>
5
+ <div class="pulitzer-span margin ten-percent"><%= link_to_posts(post_type, 'Index', 'Manage') %></div>
6
6
  <% end %>
7
- <li>
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
- </li>
14
- <li>
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
- </li>
20
+ </div>
21
21
  <% if Pulitzer.skip_metadata_auth? || self.instance_eval(&Pulitzer.metadata_closure) %>
22
- <li>
22
+ <div class="pulitzer-span ten-percent">
23
23
  <%= ajax_delete 'Delete', post_type_path(post_type), {}, dom_target(post_type) %>
24
- </li>
24
+ </div>
25
25
  <% end %>
26
- </ul>
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-indent" id="<%= dom_id(post_type, :template) %>">
3
- <h5>Content Elements</h5>
4
- <div id="post_type_content_element_types_container_<%= dom_id(post_type) %>">
5
- <% post_type.post_type_content_element_types.each do |ptcet| %>
6
- <%= render partial: '/pulitzer/post_type_content_element_types/show_wrapper', locals: {ptcet: ptcet} %>
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
- <% unless post_type.partial? %>
13
- <h5>Free Form Sections</h5>
14
- <div id="<%= dom_id(post_type, :free_form_section_types_container) %>">
15
- <% post_type.free_form_section_types.each do |ffst| %>
16
- <%= render partial: '/pulitzer/free_form_section_types/show_wrapper', locals: {ffst: ffst} %>
17
- <% end %>
18
- </div>
19
- <%= 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) %>
20
- <div id="<%= dom_id(post_type, :new_free_form_section_type) %>"></div>
21
- <% end %>
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
- <% if post_type.partial? %>
24
- <h5>Layouts</h5>
25
- <div id="<%= dom_id(post_type, :layouts_container) %>">
26
- <% post_type.layouts.each do |layout| %>
27
- <%= render partial: '/pulitzer/layouts/show_wrapper', locals: {layout: layout} %>
28
- <% end %>
29
- </div>
30
- <%= ajax_link 'add a new layout for ' + post_type.name, new_layout_path(layout: {post_type_id: post_type.id}), {}, dom_target(post_type, :new_layout) %>
31
- <div id="<%= dom_id(post_type, :new_layout) %>"></div>
32
- <% end %>
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>