radiant 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of radiant might be problematic. Click here for more details.

Files changed (208) hide show
  1. data/CHANGELOG +15 -0
  2. data/CONTRIBUTORS +8 -0
  3. data/app/controllers/admin/page_controller.rb +1 -11
  4. data/app/controllers/admin/welcome_controller.rb +5 -6
  5. data/app/controllers/application.rb +2 -0
  6. data/app/controllers/site_controller.rb +1 -0
  7. data/app/helpers/admin/page_helper.rb +36 -0
  8. data/app/helpers/admin/regions_helper.rb +28 -0
  9. data/app/helpers/admin/user_helper.rb +6 -0
  10. data/app/helpers/application_helper.rb +2 -1
  11. data/app/models/user.rb +7 -8
  12. data/app/views/admin/extension/index.html.haml +28 -0
  13. data/app/views/admin/layout/edit.html.haml +44 -0
  14. data/app/views/admin/layout/index.html.haml +25 -0
  15. data/app/views/admin/layout/remove.html.haml +16 -0
  16. data/app/views/admin/page/_meta_row.html.haml +6 -0
  17. data/app/views/admin/page/_node.html.haml +25 -0
  18. data/app/views/admin/page/_part.html.haml +17 -0
  19. data/app/views/admin/page/_tag_reference.html.haml +3 -0
  20. data/app/views/admin/page/children.html.haml +2 -0
  21. data/app/views/admin/page/edit.html.haml +114 -0
  22. data/app/views/admin/page/index.html.haml +28 -0
  23. data/app/views/admin/page/remove.html.haml +20 -0
  24. data/app/views/admin/snippet/edit.html.haml +36 -0
  25. data/app/views/admin/snippet/index.html.haml +20 -0
  26. data/app/views/admin/snippet/remove.html.haml +19 -0
  27. data/app/views/admin/user/edit.html.haml +80 -0
  28. data/app/views/admin/user/index.html.haml +23 -0
  29. data/app/views/admin/user/preferences.html.haml +28 -0
  30. data/app/views/admin/user/remove.html.haml +18 -0
  31. data/app/views/admin/welcome/login.html.haml +44 -0
  32. data/app/views/layouts/application.html.haml +54 -0
  33. data/app/views/site/not_found.html.haml +3 -0
  34. data/db/migrate/019_add_salt_to_users.rb +11 -0
  35. data/db/schema.rb +2 -1
  36. data/lib/login_system.rb +1 -0
  37. data/lib/radiant.rb +1 -1
  38. data/lib/radiant/admin_ui.rb +65 -0
  39. data/lib/radiant/admin_ui/region_partials.rb +18 -0
  40. data/lib/radiant/admin_ui/region_set.rb +35 -0
  41. data/lib/tasks/extensions.rake +33 -0
  42. data/public/javascripts/admin/admin.js +8 -2
  43. data/public/javascripts/admin/sitemap.js +2 -1
  44. data/public/stylesheets/admin/main.css +4 -0
  45. data/spec/controllers/admin/abstract_model_controller_spec.rb +2 -0
  46. data/spec/controllers/admin/page_controller_spec.rb +3 -28
  47. data/spec/controllers/admin/user_controller_spec.rb +1 -1
  48. data/spec/controllers/admin/welcome_controller_spec.rb +26 -0
  49. data/spec/helpers/admin/page_helper_spec.rb +4 -0
  50. data/spec/helpers/admin/regions_helper_spec.rb +47 -0
  51. data/spec/helpers/admin/user_helper_spec.rb +7 -0
  52. data/spec/helpers/application_helper_spec.rb +7 -3
  53. data/spec/lib/login_system_spec.rb +5 -0
  54. data/spec/lib/radiant/admin_ui/region_partials_spec.rb +35 -0
  55. data/spec/lib/radiant/admin_ui/region_set_spec.rb +61 -0
  56. data/spec/lib/radiant/admin_ui_spec.rb +74 -18
  57. data/spec/models/user_spec.rb +11 -4
  58. data/spec/scenarios/users_scenario.rb +2 -2
  59. data/vendor/plugins/haml/MIT-LICENSE +20 -0
  60. data/vendor/plugins/haml/README.rdoc +319 -0
  61. data/vendor/plugins/haml/Rakefile +158 -0
  62. data/vendor/plugins/haml/TODO +9 -0
  63. data/vendor/plugins/haml/VERSION +1 -0
  64. data/vendor/plugins/haml/bin/css2sass +7 -0
  65. data/vendor/plugins/haml/bin/haml +8 -0
  66. data/vendor/plugins/haml/bin/html2haml +7 -0
  67. data/vendor/plugins/haml/bin/sass +8 -0
  68. data/vendor/plugins/haml/extra/haml-mode.el +328 -0
  69. data/vendor/plugins/haml/extra/sass-mode.el +88 -0
  70. data/vendor/plugins/haml/init.rb +2 -0
  71. data/vendor/plugins/haml/lib/haml.rb +977 -0
  72. data/vendor/plugins/haml/lib/haml/buffer.rb +229 -0
  73. data/vendor/plugins/haml/lib/haml/engine.rb +274 -0
  74. data/vendor/plugins/haml/lib/haml/error.rb +23 -0
  75. data/vendor/plugins/haml/lib/haml/exec.rb +347 -0
  76. data/vendor/plugins/haml/lib/haml/filters.rb +249 -0
  77. data/vendor/plugins/haml/lib/haml/helpers.rb +413 -0
  78. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +45 -0
  79. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +122 -0
  80. data/vendor/plugins/haml/lib/haml/html.rb +188 -0
  81. data/vendor/plugins/haml/lib/haml/precompiler.rb +757 -0
  82. data/vendor/plugins/haml/lib/haml/template.rb +43 -0
  83. data/vendor/plugins/haml/lib/haml/template/patch.rb +58 -0
  84. data/vendor/plugins/haml/lib/haml/template/plugin.rb +72 -0
  85. data/vendor/plugins/haml/lib/sass.rb +833 -0
  86. data/vendor/plugins/haml/lib/sass/constant.rb +245 -0
  87. data/vendor/plugins/haml/lib/sass/constant/color.rb +101 -0
  88. data/vendor/plugins/haml/lib/sass/constant/literal.rb +53 -0
  89. data/vendor/plugins/haml/lib/sass/constant/number.rb +87 -0
  90. data/vendor/plugins/haml/lib/sass/constant/operation.rb +30 -0
  91. data/vendor/plugins/haml/lib/sass/constant/string.rb +22 -0
  92. data/vendor/plugins/haml/lib/sass/css.rb +378 -0
  93. data/vendor/plugins/haml/lib/sass/engine.rb +459 -0
  94. data/vendor/plugins/haml/lib/sass/error.rb +35 -0
  95. data/vendor/plugins/haml/lib/sass/plugin.rb +165 -0
  96. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +56 -0
  97. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +24 -0
  98. data/vendor/plugins/haml/lib/sass/tree/attr_node.rb +53 -0
  99. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +20 -0
  100. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +46 -0
  101. data/vendor/plugins/haml/lib/sass/tree/node.rb +42 -0
  102. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +89 -0
  103. data/vendor/plugins/haml/lib/sass/tree/value_node.rb +16 -0
  104. data/vendor/plugins/haml/test/benchmark.rb +82 -0
  105. data/vendor/plugins/haml/test/haml/engine_test.rb +587 -0
  106. data/vendor/plugins/haml/test/haml/helper_test.rb +187 -0
  107. data/vendor/plugins/haml/test/haml/html2haml_test.rb +60 -0
  108. data/vendor/plugins/haml/test/haml/markaby/standard.mab +52 -0
  109. data/vendor/plugins/haml/test/haml/mocks/article.rb +6 -0
  110. data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +16 -0
  111. data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +11 -0
  112. data/vendor/plugins/haml/test/haml/results/filters.xhtml +82 -0
  113. data/vendor/plugins/haml/test/haml/results/helpers.xhtml +94 -0
  114. data/vendor/plugins/haml/test/haml/results/helpful.xhtml +10 -0
  115. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +64 -0
  116. data/vendor/plugins/haml/test/haml/results/list.xhtml +12 -0
  117. data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +22 -0
  118. data/vendor/plugins/haml/test/haml/results/partials.xhtml +21 -0
  119. data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +74 -0
  120. data/vendor/plugins/haml/test/haml/results/standard.xhtml +42 -0
  121. data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +28 -0
  122. data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +7 -0
  123. data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +94 -0
  124. data/vendor/plugins/haml/test/haml/rhtml/_av_partial_1.rhtml +12 -0
  125. data/vendor/plugins/haml/test/haml/rhtml/_av_partial_2.rhtml +8 -0
  126. data/vendor/plugins/haml/test/haml/rhtml/action_view.rhtml +62 -0
  127. data/vendor/plugins/haml/test/haml/rhtml/standard.rhtml +54 -0
  128. data/vendor/plugins/haml/test/haml/template_test.rb +168 -0
  129. data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +9 -0
  130. data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +5 -0
  131. data/vendor/plugins/haml/test/haml/templates/_partial.haml +8 -0
  132. data/vendor/plugins/haml/test/haml/templates/_text_area.haml +3 -0
  133. data/vendor/plugins/haml/test/haml/templates/action_view.haml +47 -0
  134. data/vendor/plugins/haml/test/haml/templates/breakage.haml +8 -0
  135. data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +10 -0
  136. data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +11 -0
  137. data/vendor/plugins/haml/test/haml/templates/filters.haml +81 -0
  138. data/vendor/plugins/haml/test/haml/templates/helpers.haml +69 -0
  139. data/vendor/plugins/haml/test/haml/templates/helpful.haml +11 -0
  140. data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +77 -0
  141. data/vendor/plugins/haml/test/haml/templates/list.haml +12 -0
  142. data/vendor/plugins/haml/test/haml/templates/original_engine.haml +17 -0
  143. data/vendor/plugins/haml/test/haml/templates/partialize.haml +1 -0
  144. data/vendor/plugins/haml/test/haml/templates/partials.haml +12 -0
  145. data/vendor/plugins/haml/test/haml/templates/silent_script.haml +40 -0
  146. data/vendor/plugins/haml/test/haml/templates/standard.haml +42 -0
  147. data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +24 -0
  148. data/vendor/plugins/haml/test/haml/templates/very_basic.haml +4 -0
  149. data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +87 -0
  150. data/vendor/plugins/haml/test/haml/test_helper.rb +15 -0
  151. data/vendor/plugins/haml/test/profile.rb +65 -0
  152. data/vendor/plugins/haml/test/sass/engine_test.rb +276 -0
  153. data/vendor/plugins/haml/test/sass/plugin_test.rb +159 -0
  154. data/vendor/plugins/haml/test/sass/results/alt.css +4 -0
  155. data/vendor/plugins/haml/test/sass/results/basic.css +9 -0
  156. data/vendor/plugins/haml/test/sass/results/compact.css +5 -0
  157. data/vendor/plugins/haml/test/sass/results/complex.css +87 -0
  158. data/vendor/plugins/haml/test/sass/results/compressed.css +1 -0
  159. data/vendor/plugins/haml/test/sass/results/constants.css +14 -0
  160. data/vendor/plugins/haml/test/sass/results/expanded.css +19 -0
  161. data/vendor/plugins/haml/test/sass/results/import.css +29 -0
  162. data/vendor/plugins/haml/test/sass/results/mixins.css +95 -0
  163. data/vendor/plugins/haml/test/sass/results/multiline.css +24 -0
  164. data/vendor/plugins/haml/test/sass/results/nested.css +22 -0
  165. data/vendor/plugins/haml/test/sass/results/parent_ref.css +13 -0
  166. data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
  167. data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +1 -0
  168. data/vendor/plugins/haml/test/sass/templates/_partial.sass +2 -0
  169. data/vendor/plugins/haml/test/sass/templates/alt.sass +16 -0
  170. data/vendor/plugins/haml/test/sass/templates/basic.sass +23 -0
  171. data/vendor/plugins/haml/test/sass/templates/bork.sass +2 -0
  172. data/vendor/plugins/haml/test/sass/templates/bork2.sass +2 -0
  173. data/vendor/plugins/haml/test/sass/templates/compact.sass +17 -0
  174. data/vendor/plugins/haml/test/sass/templates/complex.sass +310 -0
  175. data/vendor/plugins/haml/test/sass/templates/compressed.sass +15 -0
  176. data/vendor/plugins/haml/test/sass/templates/constants.sass +97 -0
  177. data/vendor/plugins/haml/test/sass/templates/expanded.sass +17 -0
  178. data/vendor/plugins/haml/test/sass/templates/import.sass +11 -0
  179. data/vendor/plugins/haml/test/sass/templates/importee.sass +14 -0
  180. data/vendor/plugins/haml/test/sass/templates/mixins.sass +76 -0
  181. data/vendor/plugins/haml/test/sass/templates/multiline.sass +20 -0
  182. data/vendor/plugins/haml/test/sass/templates/nested.sass +25 -0
  183. data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +25 -0
  184. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  185. data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +6 -0
  186. metadata +185 -24
  187. data/app/views/admin/extension/index.html.erb +0 -40
  188. data/app/views/admin/layout/edit.html.erb +0 -39
  189. data/app/views/admin/layout/index.html.erb +0 -38
  190. data/app/views/admin/layout/remove.html.erb +0 -17
  191. data/app/views/admin/page/_meta_row.html.erb +0 -4
  192. data/app/views/admin/page/_node.html.erb +0 -28
  193. data/app/views/admin/page/_part.html.erb +0 -13
  194. data/app/views/admin/page/_tag_reference.html.erb +0 -4
  195. data/app/views/admin/page/children.html.erb +0 -4
  196. data/app/views/admin/page/edit.html.erb +0 -140
  197. data/app/views/admin/page/index.html.erb +0 -31
  198. data/app/views/admin/page/remove.html.erb +0 -14
  199. data/app/views/admin/snippet/edit.html.erb +0 -29
  200. data/app/views/admin/snippet/index.html.erb +0 -36
  201. data/app/views/admin/snippet/remove.html.erb +0 -16
  202. data/app/views/admin/user/edit.html.erb +0 -54
  203. data/app/views/admin/user/index.html.erb +0 -43
  204. data/app/views/admin/user/preferences.html.erb +0 -29
  205. data/app/views/admin/user/remove.html.erb +0 -16
  206. data/app/views/admin/welcome/login.html.erb +0 -51
  207. data/app/views/layouts/application.html.erb +0 -83
  208. data/app/views/site/not_found.html.erb +0 -3
@@ -1,40 +0,0 @@
1
- <% content_for(:page_css) do -%>
2
- table.index h4 {
3
- font-size: 110%;
4
- margin-top: .5em;
5
- margin-bottom: .25em;
6
- }
7
- table.index p {
8
- margin-top: .25em;
9
- margin-bottom: .5em;
10
- }
11
- <% end -%>
12
-
13
- <h1>Extensions</h1>
14
-
15
- <table id="extensions" class="index" cellpadding="0" cellspacing="0" border="0">
16
- <thead>
17
- <tr>
18
- <th class="extension">Extension</th>
19
- <th class="website">Website</th>
20
- <th class="version">Version</th>
21
- </tr>
22
- </thead>
23
- <tbody>
24
- <% for extension in @extensions -%>
25
- <tr class="node level-1">
26
- <td class="extension">
27
- <h4><%=h extension.extension_name %></h4>
28
- <p><%=h extension.description %></p>
29
- </td>
30
- <td class="website"><%= link_to "Website", extension.url, :target => "_blank" unless extension.url.blank? %></td>
31
- <td class="version"><%=h extension.version %></td>
32
- </tr>
33
- <% end -%>
34
- </tbody>
35
- </table>
36
- <script type="text/javascript">
37
- // <![CDATA[
38
- new RuledTable('extensions');
39
- // ]]>
40
- </script>
@@ -1,39 +0,0 @@
1
- <% if @layout.new_record? -%>
2
- <h1>New Layout</h1>
3
- <% else -%>
4
- <h1>Edit Layout</h1>
5
- <% end -%>
6
-
7
- <form method="post" action="">
8
- <%= hidden_field "layout", "lock_version" %>
9
- <div class="form-area">
10
- <p class="title">
11
- <label for="layout_name">Name</label>
12
- <%= text_field "layout", "name", :class => 'textbox', :maxlength => 100 %>
13
- </p>
14
- <div id="extended-metadata" class="row"<%= meta_visible(:meta) %>>
15
- <table class="fieldset" cellpadding="0" cellspacing="0" border="0">
16
- <tr>
17
- <th class="label"><label for="layout_content_type">Content&#8209;Type</label></th>
18
- <td class="field"><%= text_field "layout", "content_type", :class => 'textbox', :maxlength => 40 %></td>
19
- </tr>
20
- </table>
21
- </div>
22
- <p>
23
- <small>
24
- <a id="more-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %>>More</a>
25
- <a id="less-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %>>Less</a>
26
- </small>
27
- </p>
28
- <p class="content">
29
- <label for="layout_content">Body</label>
30
- <%= text_area "layout", "content", :class => "textarea", :style => "width: 100%" %>
31
- </p>
32
- <%= updated_stamp @layout %>
33
- </div>
34
- <p class="buttons">
35
- <%= save_model_button(@layout) %> <%= save_model_and_continue_editing_button(@layout) %> or <%= link_to "Cancel", layout_index_url %>
36
- </p>
37
- </form>
38
-
39
- <%= focus 'layout_name' %>
@@ -1,38 +0,0 @@
1
- <h1>Layouts</h1>
2
-
3
- <p>Use layouts to apply a visual look to a Web page. Layouts can contain special tags to include
4
- page content and other elements such as the header or footer. Click on a layout name below to
5
- edit it or click <code>Remove</code> to delete it.</p>
6
-
7
- <table id="layouts" class="index" cellpadding="0" cellspacing="0" border="0">
8
- <thead>
9
- <tr>
10
- <th class="layout">Layout</th>
11
- <th class="modify">Modify</th>
12
- </tr>
13
- </thead>
14
- <tbody>
15
- <% unless @layouts.empty? -%>
16
- <% for layout in @layouts -%>
17
- <tr class="node level-1">
18
- <td class="layout">
19
- <%= image 'layout', :alt => 'layout-icon', :title => '' %>
20
- <%= link_to layout.name, layout_edit_url(:id => layout) %>
21
- </td>
22
- <td class="remove"><%= link_to image('remove', :alt => 'Remove Layout'), layout_remove_url(:id => layout) %></td>
23
- </tr>
24
- <% end -%>
25
- <% else -%>
26
- <tr>
27
- <td colspan="2" class="note">No Layouts</td>
28
- </tr>
29
- <% end -%>
30
- </tbody>
31
- </table>
32
- <script type="text/javascript">
33
- // <![CDATA[
34
- new RuledTable('layouts');
35
- // ]]>
36
- </script>
37
-
38
- <p><%= link_to image('new-layout', :alt => 'New Layout'), layout_new_url %></p>
@@ -1,17 +0,0 @@
1
- <h1>Remove Layout</h1>
2
- <p>Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?</p>
3
-
4
- <table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0">
5
- <tbody>
6
- <tr class="node level-1" onmouseover="Element.addClassName(this, 'highlight');" onmouseout="Element.removeClassName(this, 'highlight');">
7
- <td class="layout">
8
- <%= image 'layout', :alt => 'layout-icon', :title => '' %>
9
- <%= @layout.name %>
10
- </td>
11
- </tr>
12
- </tbody>
13
- </table>
14
-
15
- <form method="post" action="">
16
- <p class="buttons"><%= submit_tag "Delete Layout", :class => 'button' %> or <%= link_to 'Cancel', layout_index_url %></p>
17
- </form>
@@ -1,4 +0,0 @@
1
- <tr>
2
- <th class="label"><label for="page_<%= meta_row[:field] %>"><%= meta_row[:label] || meta_row[:field].humanize %></label></th>
3
- <td class="field"><%= send(meta_row[:type], "page", meta_row[:field], *meta_row[:args])%></td>
4
- </tr>
@@ -1,28 +0,0 @@
1
- <tr id="page-<%= page.id %>" class="node level-<%= level %><%= children_class %><%= virtual_class %>">
2
- <td class="page" style="padding-left: <%= padding_left(level) %>px">
3
- <span class="w1">
4
- <% if simple -%>
5
- <%= icon %>
6
- <%= node_title %>
7
- <% else -%>
8
- <%= expander %><a href="<%= page_edit_url(:id => page) %>" title="<%= page.url %>"><%= icon %> <%= node_title %></a>
9
- <%= page_type %>
10
- <%= spinner %>
11
- <% end -%>
12
- </span>
13
- </td>
14
- <% unless simple -%>
15
- <td class="status <%= page.status.name.downcase %>-status"><%= page.status.name %></td>
16
- <td class="add-child"><%= link_to image('add-child', :alt => 'add child'), page_new_url(:parent_id => page) %></td>
17
- <td class="remove"><%= link_to image('remove', :alt => 'remove page'), page_remove_url(:id => page) %></td>
18
- <% end -%>
19
- </tr>
20
- <%
21
- if expanded
22
- page.children.each do |child|
23
- -%>
24
- <%= render_node child, :level => level + 1, :simple => simple -%>
25
- <%
26
- end
27
- end
28
- -%>
@@ -1,13 +0,0 @@
1
- <% @index ||= 0 -%>
2
- <div class="page" id="page-<%= @index + 1 %>">
3
- <div class="part" id="part-<%= @index + 1 %>">
4
- <%= hidden_field_tag "part[#{@index}][name]", part.name, :id => "part_#{@index}_name" %>
5
- <p>
6
- <label for="part_<%= @index %>_filter_id">Filter</label>
7
- <%= select_tag "part[#{@index}][filter_id]", options_for_select([['<none>', '']] + TextFilter.descendants.map { |s| s.filter_name }.sort, part.filter_id), :id => "part_#{@index}_filter_id" %>
8
- <span id="reference-links">Reference: <span id="filter-reference-link-<%= @index %>"><%= link_to_function "Filter", "load_filter_reference(#{@index})" %></span> <span id="tag-reference-link-<%= @index %>"><%= link_to_function 'Available Tags', "load_tag_reference(#{@index});" %></span></span>
9
- </p>
10
- <div><%= text_area_tag "part[#{@index}][content]", h(part.content), :class => "textarea", :style => "width: 100%", :id => "part_#{@index}_content" %></div>
11
- </div>
12
- </div>
13
- <% @index += 1 -%>
@@ -1,4 +0,0 @@
1
- <div class="tag-description">
2
- <h4>&lt;r:<%= tag_name %> /&gt;</h4>
3
- <div><%= description %></div>
4
- </div>
@@ -1,4 +0,0 @@
1
- <% level = @level + 1 -%>
2
- <% @parent.children.each do |child| -%>
3
- <%= render_node child, :expand => 1, :level => level %>
4
- <% end -%>
@@ -1,140 +0,0 @@
1
- <% content_for('page_scripts') do -%>
2
- var last_type = "<%= @page.class_name %>";
3
- function load_tag_reference(part) {
4
- page_type = $F('page_class_name');
5
- popup = $('tag-reference-popup');
6
- if(last_type != page_type) {
7
- url = "<%= tag_reference_url %>";
8
- params = "class_name=" + page_type;
9
- new Effect.Highlight('tag-reference-link-'+ part);
10
- req = new Ajax.Request(url, { method: 'get', parameters: params, evalScripts: true });
11
- } else {
12
- center(popup);
13
- Element.toggle(popup);
14
- }
15
- return false;
16
- }
17
- var last_filter = "<%= default_filter_name %>";
18
- function load_filter_reference(part) {
19
- filter_type = $F("part_" + part + "_filter_id");
20
- popup = $('filter-reference-popup');
21
- if(last_filter != filter_type) {
22
- url = "<%= filter_reference_url %>";
23
- params = "filter_name=" + filter_type;
24
- new Effect.Highlight('filter-reference-link-'+ part);
25
- req = new Ajax.Request(url, { method: 'get', parameters: params, evalScripts: true });
26
- } else {
27
- center(popup);
28
- Element.toggle(popup);
29
- }
30
- return false;
31
- }
32
- <% end -%>
33
-
34
- <% content_for :page_css do %>
35
- #content #extended-metadata .fieldset {
36
- margin-left: 0;
37
- margin-right: 0;
38
- margin-bottom: .5em;
39
- padding: 0;
40
- }
41
- #content #extended-metadata .fieldset td.label {
42
- text-align: left;
43
- width: 15%;
44
- }
45
- #content #extended-metadata .fieldset td.field .textbox {
46
- width: 90%;
47
- }
48
- <% end %>
49
-
50
- <% if @page.new_record? -%>
51
- <h1 id="new_page">New Page</h1>
52
- <% else -%>
53
- <h1 id="edit_page">Edit Page</h1>
54
- <% end -%>
55
-
56
- <form method="post" action="" enctype="multipart/form-data">
57
- <%= hidden_field "page", "lock_version" %>
58
- <div class="form-area">
59
- <p class="title">
60
- <label for="page_title">Page Title</label>
61
- <%= text_field "page", "title", :class => 'textbox', :maxlength => 255 %>
62
- </p>
63
- <div id="extended-metadata" class="row"<%= meta_visible(:meta) %>>
64
- <table class="fieldset">
65
- <% for meta in @meta %>
66
- <%= render :partial => "meta_row", :object => meta %>
67
- <% end %>
68
- </table>
69
- </div>
70
- <p class="more-or-less">
71
- <small>
72
- <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %> return false"<%= meta_visible(:meta_more) %> id="more-extended-metadata">More</a>
73
- <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %> return false"<%= meta_visible(:meta_less) %> id="less-extended-metadata">Less</a>
74
- </small>
75
- </p>
76
- <div id="tab-control">
77
- <div id="tabs" class="tabs">
78
- <div id="tab-toolbar">
79
- <%= link_to_function image('plus'), 'toggle_add_part_popup()', :title => 'Add Tab' %>
80
- <%= link_to_function image('minus'), 'if(confirm(\'Delete the current tab?\')) { tabControl.removeTab(tabControl.selected) }', :title => 'Remove Tab' %>
81
- </div>
82
- </div>
83
- <div id="pages" class="pages">
84
- <%= render :partial => 'part', :collection => @page.parts %>
85
- </div>
86
- </div>
87
-
88
- <div class="row">
89
- <p><label for="page_layout_id">Layout</label>
90
- <%= select "page", "layout_id", [['<inherit>', '']] + Layout.find(:all).map { |s| [s.name, s.id] } %></p>
91
- <p><label for="page_class_name">Page Type</label>
92
- <%= select "page", "class_name", [['<normal>', 'Page']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } %></p>
93
- <p><label for="page_status_id">Status</label>
94
- <%= select "page", "status_id", Status.find_all.map { |s| [s.name, s.id] }, {} %></p>
95
- <p id="publication-date" style="display: none;"><label for="page_published_at">Published At</label>
96
- <%= datetime_select "page", "published_at", :disabled => true %></p>
97
- </div>
98
- <span class="clear">&nbsp;</span>
99
- <%= updated_stamp @page %>
100
- </div>
101
- <% @buttons_partials.each do |partial| %>
102
- <%= render :partial => partial %>
103
- <% end %>
104
- <p class="buttons">
105
- <%= save_model_button(@page) %> <%= save_model_and_continue_editing_button(@page) %> or <%= link_to "Cancel", page_index_url %>
106
- </p>
107
- </form>
108
-
109
- <% content_for :popups do -%>
110
- <div class="popup" id="add-part-popup" style="display: none">
111
- <div id="busy" class="busy" style="display: none"><%= image 'spinner.gif' %></div>
112
- <h3>Add Part</h3>
113
- <% form_remote_tag(
114
- :url => page_add_part_url,
115
- :update => "pages",
116
- :position => :bottom,
117
- :loading => 'part_loading()',
118
- :complete => 'part_added()',
119
- :condition => 'valid_part_name()'
120
- ) do %>
121
- <div>
122
- <%= hidden_field_tag 'index', @index, :id => 'part-index-field' %>
123
- <%= text_field_tag "part[name]", "", :id => 'part-name-field', :maxlength => 100 %>
124
- <%= submit_tag "Add Part", :id => 'add-part-button' %>
125
- </div>
126
- <p><%= link_to_function 'Close', "$(this).up('.popup').hide()", :class => 'close-link' %></p>
127
- <% end %>
128
- </div>
129
- <div class="popup" id="tag-reference-popup" style="display:none;">
130
- <div style="float:right">Search Tags: <input type="text" id="search-tag-reference" /></div>
131
- <h3>Available Tags for <span id="page-type"><%= @page.class.display_name %></span></h3>
132
- <div id="tag-reference"><%= tag_reference(@page.class.name) %></div>
133
- <p><%= link_to 'Close', '#', :class => 'close' %></p>
134
- </div>
135
- <div class="popup" id="filter-reference-popup" style="display:none;">
136
- <h3><span id="filter-type"><%= default_filter_name %></span> Reference</h3>
137
- <div id="filter-reference"><%= filter_reference(default_filter_name) %></div>
138
- <p><%= link_to_function 'Close', "Element.hide('filter-reference-popup')", :class => 'close-link' %></p>
139
- </div>
140
- <% end -%>
@@ -1,31 +0,0 @@
1
- <% include_javascript 'admin/sitemap' -%>
2
-
3
- <h1>Pages</h1>
4
-
5
- <table id="site-map" class="index" summary="Page hierarchy of the current site">
6
- <thead>
7
- <tr>
8
- <th class="page">Page</th>
9
- <th class="status">Status</th>
10
- <th class="modify" colspan="2">Modify</th>
11
- </tr>
12
- </thead>
13
- <tbody>
14
- <% if @homepage -%>
15
- <%= render_node @homepage -%>
16
- <% else -%>
17
- <tr>
18
- <td colspan="4" class="note">No Pages</td>
19
- </tr>
20
- <% end -%>
21
- </tbody>
22
- </table>
23
-
24
- <form action="<%= clear_cache_url %>" method="post">
25
- <p>
26
- <% unless @homepage -%>
27
- <%= link_to image('new-homepage', :alt => 'New Homepage'), homepage_new_url %>
28
- <% end -%>
29
- <%= image_submit 'clear-page-cache' %>
30
- </p>
31
- </form>
@@ -1,14 +0,0 @@
1
- <% pages = pluralize(@page.children.count + 1, 'Page') -%>
2
-
3
- <h1 id="remove_article">Remove <%= pages %></h1>
4
- <p>Are you sure you want to <strong class="warning">permanently remove</strong> the following <%= pages.downcase %>?</p>
5
-
6
- <table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0">
7
- <tbody>
8
- <%= render_node @page, :simple => true -%>
9
- </tbody>
10
- </table>
11
-
12
- <form method="post" action="">
13
- <p class="buttons"><%= submit_tag "Delete #{pages}", :class => 'button' %> or <%= link_to 'Cancel', page_index_url %></p>
14
- </form>
@@ -1,29 +0,0 @@
1
- <% if @snippet.new_record? -%>
2
- <h1>New Snippet</h1>
3
- <% else -%>
4
- <h1>Edit Snippet</h1>
5
- <% end -%>
6
-
7
- <form method="post" action="">
8
- <%= hidden_field "snippet", "lock_version" %>
9
- <div class="form-area">
10
- <p class="title">
11
- <label for="snippet_name">Name</label>
12
- <%= text_field "snippet", "name", :class => 'textbox', :maxlength => 100 %>
13
- </p>
14
-
15
- <p class="content">
16
- <label for="snippet_content">Body</label>
17
- <%= text_area "snippet", "content", :class => "textarea", :style => "width: 100%" %></p>
18
- <p>
19
- <label for="snippet_filter">Filter</label>
20
- <%= select_tag "snippet[filter_id]", options_for_select([['none', '']] + TextFilter.descendants.map { |f| f.filter_name }.sort, @snippet.filter_id), :id => 'snippet_filter' %>
21
- </p>
22
- <%= updated_stamp @snippet %>
23
- </div>
24
- <p class="buttons">
25
- <%= save_model_button(@snippet) %> <%= save_model_and_continue_editing_button(@snippet) %> or <%= link_to "Cancel", snippet_index_url %>
26
- </p>
27
- </form>
28
-
29
- <%= focus 'snippet_name' %>
@@ -1,36 +0,0 @@
1
- <h1>Snippets</h1>
2
-
3
- <p>Snippets are generally small pieces of content which are included in other pages or layouts.</p>
4
-
5
- <table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0">
6
- <thead>
7
- <tr>
8
- <th class="snippet">Snippet</th>
9
- <th class="modify">Modify</th>
10
- </tr>
11
- </thead>
12
- <tbody>
13
- <% unless @snippets.empty? -%>
14
- <% for snippet in @snippets -%>
15
- <tr class="node level-1">
16
- <td class="snippet">
17
- <%= image "snippet", :class => "icon", :alt => 'snippet-icon', :title => '' %>
18
- <span><%= link_to snippet.name, snippet_edit_url(:id => snippet) %></span>
19
- </td>
20
- <td class="remove"><%= link_to image('remove', :alt => 'Remove Snippet'), snippet_remove_url(:id => snippet) %></td>
21
- </tr>
22
- <% end -%>
23
- <% else -%>
24
- <tr>
25
- <td colspan="2" class="note">No Snippets</td>
26
- </tr>
27
- <% end -%>
28
- </tbody>
29
- </table>
30
- <script type="text/javascript">
31
- // <![CDATA[
32
- new RuledTable('snippets');
33
- // ]]>
34
- </script>
35
-
36
- <p><%= link_to image('new-snippet', :alt => 'New Snippet'), snippet_new_url %></p>