adva 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/adva.gemspec +3 -0
  3. data/app/assets/config/manifest.js +6 -0
  4. data/app/assets/javascripts/adva_cms/ckeditor.js.erb +12 -0
  5. data/app/assets/javascripts/adva_cms/concat_main_menus.js +13 -0
  6. data/app/assets/javascripts/adva_cms/jquery.table_tree.js +704 -0
  7. data/app/assets/javascripts/adva_cms.js +7 -0
  8. data/app/assets/javascripts/ckeditor/config.js.erb +94 -0
  9. data/app/assets/stylesheets/adva_cms/admin/common.scss +15 -1
  10. data/app/assets/stylesheets/adva_cms/admin/projection.scss +2 -5
  11. data/app/assets/stylesheets/adva_cms/admin/sidebar.scss +30 -9
  12. data/app/assets/stylesheets/adva_cms/admin.scss +1 -1
  13. data/app/controllers/admin/base_controller.rb +10 -24
  14. data/app/controllers/admin/page/articles_controller.rb +8 -27
  15. data/app/controllers/admin/page/categories_controller.rb +6 -9
  16. data/app/controllers/admin/page/links_controller.rb +6 -9
  17. data/app/controllers/admin/sections_controller.rb +7 -9
  18. data/app/controllers/admin/sites_controller.rb +9 -12
  19. data/app/controllers/admin/users_controller.rb +6 -9
  20. data/app/controllers/articles_controller.rb +30 -52
  21. data/app/controllers/base_controller.rb +8 -8
  22. data/app/controllers/password_controller.rb +3 -5
  23. data/app/controllers/session_controller.rb +3 -5
  24. data/app/helpers/activities_helper.rb +9 -20
  25. data/app/helpers/admin/base_helper.rb +4 -22
  26. data/app/helpers/base_helper.rb +1 -1
  27. data/app/helpers/content_helper.rb +7 -5
  28. data/app/helpers/resource_helper.rb +4 -5
  29. data/app/helpers/users_helper.rb +1 -1
  30. data/app/models/activity.rb +3 -0
  31. data/app/models/article.rb +0 -11
  32. data/app/models/category.rb +3 -3
  33. data/app/models/content.rb +10 -39
  34. data/app/models/link.rb +0 -1
  35. data/app/models/password_mailer.rb +6 -9
  36. data/app/models/section.rb +6 -7
  37. data/app/models/site.rb +0 -2
  38. data/app/models/user.rb +1 -2
  39. data/app/views/activity_notifier/new_content_notification.html.erb +5 -5
  40. data/app/views/admin/activities/_activities.html.erb +4 -4
  41. data/app/views/admin/activities/_comment.html.erb +21 -21
  42. data/app/views/admin/activities/_content.html.erb +4 -3
  43. data/app/views/admin/activities/_topic.html.erb +5 -5
  44. data/app/views/admin/install/confirmation.html.erb +3 -3
  45. data/app/views/admin/install/index.html.erb +14 -14
  46. data/app/views/admin/page/articles/_form.html.erb +28 -25
  47. data/app/views/admin/page/articles/_options.html.erb +3 -4
  48. data/app/views/admin/page/articles/edit.html.erb +3 -3
  49. data/app/views/admin/page/articles/new.html.erb +4 -4
  50. data/app/views/admin/page/categories/edit.html.erb +9 -9
  51. data/app/views/admin/page/categories/index.html.erb +16 -16
  52. data/app/views/admin/page/categories/new.html.erb +5 -3
  53. data/app/views/admin/page/contents/index.html.erb +3 -18
  54. data/app/views/admin/page/links/_form.html.erb +17 -17
  55. data/app/views/admin/page/links/_options.html.erb +16 -19
  56. data/app/views/admin/page/links/edit.html.erb +3 -3
  57. data/app/views/admin/page/links/new.html.erb +3 -3
  58. data/app/views/admin/sections/_form.html.haml +5 -5
  59. data/app/views/admin/sections/edit.html.haml +2 -2
  60. data/app/views/admin/sections/index.html.erb +18 -18
  61. data/app/views/admin/sections/new.html.erb +15 -13
  62. data/app/views/admin/sections/settings/_page.html.haml +4 -6
  63. data/app/views/admin/shared/_header.html.erb +5 -4
  64. data/app/views/admin/shared/_section_tree.html.erb +2 -2
  65. data/app/views/admin/sites/_email_notifications.html.erb +6 -7
  66. data/app/views/admin/sites/_form.html.erb +7 -7
  67. data/app/views/admin/sites/_recent_users.html.erb +4 -2
  68. data/app/views/admin/sites/_unapproved_comments.html.erb +1 -1
  69. data/app/views/admin/sites/index.html.erb +1 -1
  70. data/app/views/admin/sites/new.html.erb +2 -2
  71. data/app/views/admin/sites/show.html.erb +7 -8
  72. data/app/views/admin/users/edit.html.erb +1 -1
  73. data/app/views/admin/users/index.html.erb +10 -10
  74. data/app/views/admin/users/new.html.erb +1 -1
  75. data/app/views/admin/users/show.html.erb +7 -7
  76. data/app/views/layouts/admin.html.haml +3 -5
  77. data/app/views/layouts/login.html.erb +1 -1
  78. data/app/views/password/edit.html.erb +12 -5
  79. data/app/views/password/new.html.erb +7 -7
  80. data/app/views/password_mailer/reset_password_email.html.erb +21 -1
  81. data/app/views/password_mailer/updated_password_email.html.erb +3 -1
  82. data/app/views/session/new.html.erb +9 -9
  83. data/app/views/shared/_flash.html.erb +2 -2
  84. data/app/views/shared/_sidebar.html.erb +2 -2
  85. data/config/initializers/ckeditor.rb +61 -0
  86. data/config/initializers/time_format.rb +2 -0
  87. data/lib/adva/authenticate_user.rb +193 -0
  88. data/lib/{active_record → adva}/belongs_to_author.rb +4 -4
  89. data/lib/adva/event.rb +34 -0
  90. data/lib/adva/extensible_forms.rb +285 -0
  91. data/lib/{has_options.rb → adva/has_options.rb} +5 -7
  92. data/lib/adva/has_permalink.rb +36 -0
  93. data/lib/adva/version.rb +1 -1
  94. data/lib/adva.rb +10 -36
  95. data/lib/rails_ext/action_controller/event_helper.rb +1 -1
  96. data/lib/rails_ext.rb +0 -9
  97. data/vendor/gems/cacheable_flash/.gitignore +8 -0
  98. data/vendor/gems/cacheable_flash/Gemfile +8 -0
  99. data/vendor/gems/cacheable_flash/README.md +35 -0
  100. data/vendor/gems/cacheable_flash/Rakefile +4 -0
  101. data/vendor/gems/cacheable_flash/bin/console +15 -0
  102. data/vendor/gems/cacheable_flash/bin/setup +8 -0
  103. data/vendor/gems/cacheable_flash/cacheable_flash.gemspec +38 -0
  104. data/vendor/gems/cacheable_flash/lib/cacheable_flash/controller.rb +29 -0
  105. data/vendor/gems/cacheable_flash/lib/cacheable_flash/javascript.js +19 -0
  106. data/vendor/gems/cacheable_flash/lib/cacheable_flash/middleware.rb +30 -0
  107. data/vendor/gems/cacheable_flash/lib/cacheable_flash/version.rb +5 -0
  108. data/vendor/gems/cacheable_flash/lib/cacheable_flash.rb +12 -0
  109. data/vendor/gems/simple_taggable/lib/tag_list.rb +1 -1
  110. data/vendor/gems/tags/lib/menu.rb +1 -1
  111. data/vendor/gems/tags/lib/tags/tag.rb +1 -1
  112. metadata +71 -144
  113. data/app/assets/javascripts/adva_cms/admin/jquery.admin.js +0 -23
  114. data/app/assets/javascripts/adva_cms/admin/jquery.article.js +0 -22
  115. data/app/assets/javascripts/adva_cms/admin/jquery.cached_pages.js +0 -14
  116. data/app/assets/javascripts/adva_cms/admin/jquery.table_tree.js +0 -7
  117. data/app/assets/javascripts/adva_cms/application.js +0 -13
  118. data/app/assets/javascripts/adva_cms/base.js +0 -4
  119. data/app/assets/javascripts/adva_cms/cookie.js +0 -49
  120. data/app/assets/javascripts/adva_cms/jquery/jquery-lowpro.js +0 -224
  121. data/app/assets/javascripts/adva_cms/jquery/jquery.qtip.js +0 -2085
  122. data/app/assets/javascripts/adva_cms/jquery/jquery.table_tree.js +0 -307
  123. data/app/assets/javascripts/adva_cms/jquery/jquery.tablednd_0_5.js +0 -386
  124. data/app/assets/javascripts/adva_cms/jquery.common.js +0 -41
  125. data/app/assets/javascripts/adva_cms/jquery.dates.js +0 -51
  126. data/app/assets/javascripts/adva_cms/jquery.flash.js +0 -59
  127. data/app/assets/javascripts/adva_cms/jquery.roles.js +0 -25
  128. data/app/assets/javascripts/adva_cms/json.js +0 -139
  129. data/app/controllers/admin/base_account_controller.rb +0 -13
  130. data/app/controllers/admin/install_controller.rb +0 -61
  131. data/app/controllers/admin/plugins_controller.rb +0 -38
  132. data/app/helpers/meta_tags_helper.rb +0 -30
  133. data/app/models/account.rb +0 -7
  134. data/app/models/event.rb +0 -34
  135. data/app/views/admin/articles/_meta_tags.html.erb +0 -7
  136. data/app/views/admin/cached_pages/_filter.html.erb +0 -8
  137. data/app/views/admin/cached_pages/destroy.js.erb +0 -18
  138. data/app/views/admin/cached_pages/index.html.erb +0 -26
  139. data/app/views/admin/plugins/_form.html.erb +0 -11
  140. data/app/views/admin/plugins/index.html.erb +0 -16
  141. data/app/views/admin/plugins/show.html.erb +0 -43
  142. data/app/views/admin/shared/_language_select.html.erb +0 -6
  143. data/app/views/admin/shared/_section_summary.html.erb +0 -23
  144. data/app/views/admin/sites/_meta_tags.html.erb +0 -15
  145. data/app/views/layouts/default.html.erb +0 -38
  146. data/app/views/layouts/simple.html.erb +0 -22
  147. data/app/views/shared/_footer.html.erb +0 -4
  148. data/app/views/shared/messages/insufficient_permissions.html.erb +0 -4
  149. data/config/initializers/article.rb +0 -8
  150. data/config/initializers/has_options.rb +0 -2
  151. data/config/initializers/has_permalink.rb +0 -2
  152. data/config/initializers/site.rb +0 -8
  153. data/config/locales/en.yml +0 -1319
  154. data/lib/action_controller/authenticate_anonymous.rb +0 -69
  155. data/lib/action_controller/authenticate_user.rb +0 -203
  156. data/lib/core_ext.rb +0 -7
  157. data/lib/extensible_forms.rb +0 -284
  158. data/lib/has_permalink.rb +0 -33
  159. data/lib/login/helper_integration.rb +0 -11
  160. data/lib/login/mail_config.rb +0 -39
  161. data/lib/rails_ext/action_controller/cacheable_flash.rb +0 -30
  162. data/lib/rails_ext/action_controller/content_for_assignments.rb +0 -106
  163. data/lib/rails_ext/action_controller/page_caching.rb +0 -23
  164. data/lib/rails_ext/action_controller/responds_to_parent.rb +0 -46
  165. data/lib/rails_ext/active_record/exists.rb +0 -5
  166. data/lib/rails_ext/active_record/sti_instantiation.rb +0 -35
  167. data/lib/rails_ext/active_record/sticky_changes.rb +0 -30
  168. data/lib/rails_ext/railties/plugin.rb +0 -58
  169. data/lib/rails_ext/railties/plugin_configuration.rb +0 -72
  170. data/lib/registry.rb +0 -49
  171. data/lib/tasks/translation.rake +0 -69
  172. data/lib/time_hacks.rb +0 -57
  173. data/lib/webrat_patch.rb +0 -11
  174. data/test/meta_tags_test.rb +0 -42
  175. data/vendor/gems/has_counter/.gitignore +0 -17
  176. data/vendor/gems/has_counter/Gemfile +0 -4
  177. data/vendor/gems/has_counter/LICENSE +0 -22
  178. data/vendor/gems/has_counter/MIT-LICENSE +0 -20
  179. data/vendor/gems/has_counter/README.markdown +0 -64
  180. data/vendor/gems/has_counter/README.md +0 -29
  181. data/vendor/gems/has_counter/Rakefile +0 -2
  182. data/vendor/gems/has_counter/db/migrate/20080601194338_create_counters_table.rb.rb +0 -13
  183. data/vendor/gems/has_counter/has_counter.gemspec +0 -17
  184. data/vendor/gems/has_counter/lib/active_record/has_counter.rb +0 -67
  185. data/vendor/gems/has_counter/lib/counter.rb +0 -23
  186. data/vendor/gems/has_counter/lib/has_counter/version.rb +0 -3
  187. data/vendor/gems/has_counter/lib/has_counter.rb +0 -4
  188. data/vendor/gems/has_counter/spec/has_counter.sqlite3.db +0 -0
  189. data/vendor/gems/has_counter/spec/has_counter_spec.rb +0 -55
  190. data/vendor/gems/has_counter/spec/spec_helper.rb +0 -117
  191. data/vendor/gems/has_filter/.gitignore +0 -17
  192. data/vendor/gems/has_filter/Gemfile +0 -4
  193. data/vendor/gems/has_filter/LICENSE +0 -22
  194. data/vendor/gems/has_filter/README.md +0 -29
  195. data/vendor/gems/has_filter/Rakefile +0 -2
  196. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_add.png +0 -0
  197. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_button_left.png +0 -0
  198. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_button_right.png +0 -0
  199. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_remove.png +0 -0
  200. data/vendor/gems/has_filter/app/assets/javascripts/has_filter/filter.js +0 -35
  201. data/vendor/gems/has_filter/app/assets/javascripts/has_filter/jquery.filter.js +0 -23
  202. data/vendor/gems/has_filter/app/assets/stylesheets/has_filter/alternate/filter.scss +0 -102
  203. data/vendor/gems/has_filter/app/assets/stylesheets/has_filter/filter.scss +0 -100
  204. data/vendor/gems/has_filter/app/helpers/filter_helper.rb +0 -3
  205. data/vendor/gems/has_filter/has_filter.gemspec +0 -17
  206. data/vendor/gems/has_filter/init.rb +0 -3
  207. data/vendor/gems/has_filter/lib/has_filter/active_record/act_macro.rb +0 -102
  208. data/vendor/gems/has_filter/lib/has_filter/filter/base.rb +0 -67
  209. data/vendor/gems/has_filter/lib/has_filter/filter/categorized.rb +0 -24
  210. data/vendor/gems/has_filter/lib/has_filter/filter/chain.rb +0 -45
  211. data/vendor/gems/has_filter/lib/has_filter/filter/set.rb +0 -80
  212. data/vendor/gems/has_filter/lib/has_filter/filter/state.rb +0 -25
  213. data/vendor/gems/has_filter/lib/has_filter/filter/tagged.rb +0 -22
  214. data/vendor/gems/has_filter/lib/has_filter/filter/text.rb +0 -55
  215. data/vendor/gems/has_filter/lib/has_filter/filter.rb +0 -17
  216. data/vendor/gems/has_filter/lib/has_filter/version.rb +0 -3
  217. data/vendor/gems/has_filter/lib/has_filter.rb +0 -22
  218. data/vendor/gems/has_filter/test/db/setup.rb +0 -45
  219. data/vendor/gems/has_filter/test/db/test.sqlite3.db +0 -0
  220. data/vendor/gems/has_filter/test/fixtures.rb +0 -15
  221. data/vendor/gems/has_filter/test/has_filter/filter_chain_test.rb +0 -41
  222. data/vendor/gems/has_filter/test/has_filter/filter_scopes_test.rb +0 -102
  223. data/vendor/gems/has_filter/test/has_filter/filter_tags_test.rb +0 -113
  224. data/vendor/gems/has_filter/test/has_filter/integration.rb +0 -15
  225. data/vendor/gems/has_filter/test/has_filter/scopes_test.rb +0 -48
  226. data/vendor/gems/has_filter/test/log/test.log +0 -34346
  227. data/vendor/gems/has_filter/test/models.rb +0 -23
  228. data/vendor/gems/has_filter/test/templates/has_filter/test/index.html.erb +0 -5
  229. data/vendor/gems/has_filter/test/test_helper.rb +0 -66
  230. data/vendor/gems/xss_terminate/.gitignore +0 -17
  231. data/vendor/gems/xss_terminate/Gemfile +0 -4
  232. data/vendor/gems/xss_terminate/LICENSE +0 -22
  233. data/vendor/gems/xss_terminate/MIT-LICENSE +0 -20
  234. data/vendor/gems/xss_terminate/README +0 -94
  235. data/vendor/gems/xss_terminate/README.md +0 -29
  236. data/vendor/gems/xss_terminate/Rakefile +0 -23
  237. data/vendor/gems/xss_terminate/lib/html5lib_sanitize.rb +0 -2453
  238. data/vendor/gems/xss_terminate/lib/rails_sanitize.rb +0 -8
  239. data/vendor/gems/xss_terminate/lib/xss_terminate/version.rb +0 -3
  240. data/vendor/gems/xss_terminate/lib/xss_terminate.rb +0 -141
  241. data/vendor/gems/xss_terminate/tasks/xss_terminate_tasks.rake +0 -7
  242. data/vendor/gems/xss_terminate/test/models/comment.rb +0 -5
  243. data/vendor/gems/xss_terminate/test/models/entry.rb +0 -7
  244. data/vendor/gems/xss_terminate/test/models/message.rb +0 -3
  245. data/vendor/gems/xss_terminate/test/models/person.rb +0 -5
  246. data/vendor/gems/xss_terminate/test/models/review.rb +0 -5
  247. data/vendor/gems/xss_terminate/test/schema.rb +0 -34
  248. data/vendor/gems/xss_terminate/test/setup_test.rb +0 -16
  249. data/vendor/gems/xss_terminate/test/xss_terminate_test.rb +0 -50
  250. data/vendor/gems/xss_terminate/xss_terminate.gemspec +0 -17
  251. /data/lib/tasks/{adva_cms.rake → adva.rake} +0 -0
@@ -1,10 +1,10 @@
1
1
  <div class="activities">
2
- <h3><%= t(:'adva.activity.titles.today', :date => l(Date.current, :format => :short)) %></h3>
2
+ <h3>Today <%= Date.current.to_fs(:short) %></h3>
3
3
  <%= render_activities activities[0], true %>
4
4
 
5
- <h3><%= t(:'adva.activity.titles.yesterday', :date => l(Date.current.yesterday, :format => :short)) %></h3>
5
+ <h3>Yesterday <%= Date.current.yesterday.to_fs(:short) %></h3>
6
6
  <%= render_activities activities[1], true %>
7
7
 
8
- <h3><%= t(:'adva.activity.titles.past', :date => l(Date.current.yesterday, :format => :short)) %></h3>
8
+ <h3>Before <%= Date.current.yesterday.to_fs(:short) %></h3>
9
9
  <%= render_activities activities[2] %>
10
- </div>
10
+ </div>
@@ -6,30 +6,30 @@
6
6
  </p>
7
7
 
8
8
  <p>
9
- <%= t(:'adva.activity.comment', :actions => activity.all_actions.collect { |a| t(:"adva.activity.action_names.#{a.downcase}" }.to_sentence) %>
10
- </p>
11
-
12
- <p>
13
- <%= truncate strip_tags(activity.body), 100 %>
14
- </p>
9
+ Comment <%= activity.all_actions.to_sentence) %>
10
+ </p>
11
+
12
+ <p>
13
+ <%= truncate strip_tags(activity.body), 100 %>
14
+ </p>
15
15
 
16
16
  <% if activity.object -%>
17
17
  <ul>
18
- <% unless activity.object.commentable_type == 'Topic' %>
19
- <% unless activity.object.approved? -%>
20
- <li>
21
- <%= link_to t(:'adva.common.approve'), admin_comment_path(activity.object, "comment[approved]" => 1, :return => true), :method => :put %>
22
- </li>
23
- <% else -%>
24
- <li>
25
- <%= link_to t(:'adva.common.unapprove'), admin_comment_path(activity.object, "comment[approved]" => 0, :return => true), :method => :put %>
26
- </li>
27
- <% end -%>
28
- <% end -%>
29
- <li>
30
- <%= link_to_edit(activity.object, :url => edit_admin_comment_path(activity.object, :return => true)) %>
31
- <%= link_to_delete(activity.object, :url => admin_comment_path(activity.object, :return => true)) %>
32
- </li>
18
+ <% unless activity.object.commentable_type == 'Topic' %>
19
+ <% unless activity.object.approved? -%>
20
+ <li>
21
+ <%= link_to "Approve", admin_comment_path(activity.object, "comment[approved]" => 1, :return => true), :method => :put %>
22
+ </li>
23
+ <% else -%>
24
+ <li>
25
+ <%= link_to "Unapprove", admin_comment_path(activity.object, "comment[approved]" => 0, :return => true), :method => :put %>
26
+ </li>
27
+ <% end -%>
28
+ <% end -%>
29
+ <li>
30
+ <%= link_to_edit(activity.object, :url => edit_admin_comment_path(activity.object, :return => true)) %>
31
+ <%= link_to_delete(activity.object, :url => admin_comment_path(activity.object, :return => true)) %>
32
+ </li>
33
33
  </ul>
34
34
  <% end -%>
35
35
  </li>
@@ -7,9 +7,10 @@
7
7
  </p>
8
8
 
9
9
  <p>
10
- <%= t(:'adva.activity.actions', :type => t(:"adva.activity.types.#{activity.object_attributes['type'].tableize.singularize}"),
11
- :actions => activity.all_actions.collect { |a| t(:"adva.activity.action_names.#{a.downcase}") }.to_sentence,
12
- :activity => (activity.section ? link_to(activity.section.title, [:admin, activity.section, :contents]) : "Deleted Section")).html_safe %>
10
+ <% type = activity.object_attributes['type'].tableize.singularize.titleize %>
11
+ <% actions = activity.all_actions.to_sentence %>
12
+ <% name = (activity.section ? link_to(activity.section.title, [:admin, activity.section, :contents]) : "Deleted Section").html_safe %>
13
+ <%= "#{type} #{actions} in #{name}." %>
13
14
  </p>
14
15
  <%= link_to_if activity.section, activity.title, [:edit, :admin, activity.section, activity.object] %>
15
16
  </li>
@@ -4,13 +4,13 @@
4
4
  <%= link_to_activity_user(activity) %>
5
5
  <%= link_to_content(activity.object) if activity.object %>
6
6
  </p>
7
- <p><%= t(:'adva.activity.topic', :actions => activity.all_actions.collect { |a| t(:"adva.activity.action_names.#{a.downcase}" }.to_sentence) %></p>
7
+ <p>Topic <%= activity.all_actions.to_sentence %></p>
8
8
  <p><%= truncate strip_tags(activity.title), 100 %></p>
9
-
10
- <% if activity.object -%>
9
+
10
+ <% if activity.object -%>
11
11
  <ul>
12
- <li><%= link_to_edit(activity.object) %></li>
13
- <li><%= link_to_delete(activity.object) %></li>
12
+ <li><%= link_to_edit(activity.object) %></li>
13
+ <li><%= link_to_delete(activity.object) %></li>
14
14
  </ul>
15
15
  <% end -%>
16
16
  </li>
@@ -1,10 +1,10 @@
1
- <h2><%= t(:'adva.titles.success') %></h2>
1
+ <h2>Success!</h2>
2
2
 
3
3
  <p>
4
- <%= t(:'adva.sites.install.success_fully_created') %>
4
+ You have successfully created your site. Enjoy!
5
5
  </p>
6
6
 
7
7
  <p>
8
- <%= link_to t(:'adva.sites.links.manage_new'), admin_site_path %>
8
+ <%= link_to "Manage your new site &raquo;", admin_site_path %>
9
9
  </p>
10
10
 
@@ -1,38 +1,38 @@
1
- <h2><%= t(:'adva.titles.install') %></h2>
1
+ <h2>Install Site</h2>
2
2
 
3
- <p><%= t(:'adva.sites.install.welcome_to_installation') %></p>
4
- <p><%= t(:'adva.sites.install.can_always_change_settings') %></p>
3
+ <p>Welcome to adva-cms' less-than-one-minute installation process. Just fill in the information below and you're done.</p>
4
+ <p>Don't worry. You can always change these settings later.</p>
5
5
 
6
6
  <%= form_for Site.new, url: admin_install_path do |f| %>
7
- <h3><%= t(:'adva.titles.website') %></h3>
7
+ <h3>Website</h3>
8
8
  <% f.field_set :site do %>
9
9
  <%= fields_for @site do |site| %>
10
10
  <%= site.text_field :name, label: true %>
11
11
  <% end %>
12
12
  <% end %>
13
13
 
14
- <h3><%= t(:'adva.titles.home_section') %></h3>
15
- <% f.field_set :home_section do %>
14
+ <h3>Home Section</h3>
15
+ <% f.field_set :home_section do %>
16
16
  <%= fields_for :section, @section do |section| %>
17
17
  <p>
18
- <%= section.text_field :title, label: true %>
18
+ <%= section.text_field :title, label: true %>
19
19
  </p>
20
20
  <% end %>
21
21
  <% end %>
22
-
23
- <h3><%= t(:'adva.titles.admin_account') %></h3>
24
- <% f.field_set :admin_account do %>
22
+
23
+ <h3>Admin Account</h3>
24
+ <% f.field_set :admin_account do %>
25
25
  <%= fields_for @user do |user| %>
26
26
  <p>
27
- <%= user.email_field :email, label: true %>
27
+ <%= user.email_field :email, label: true %>
28
28
  </p>
29
29
  <p>
30
- <%= user.password_field :password, label: true %>
30
+ <%= user.password_field :password, label: true %>
31
31
  </p>
32
32
  <% end %>
33
33
  <% end %>
34
-
34
+
35
35
  <% f.buttons do %>
36
- <%= submit_tag t(:'adva.sites.links.create_site_and_account') %>
36
+ <%= submit_tag "Create site and account" %>
37
37
  <% end %>
38
38
  <% end %>
@@ -1,40 +1,43 @@
1
1
  <!-- HACK: empty line must be here for split_form_for to work properly -->
2
2
  <fieldset>
3
3
  <div class="col">
4
- <%= hidden_field_tag 'cl', Article.locale %>
5
-
6
- <p>
7
- <%= f.text_field :title, :class => 'big', :label => "Title", style: "float: none" %>
8
- </p>
4
+ <%= hidden_field_tag 'cl', Article.locale %>
5
+
6
+ <p><%= f.text_field :title, class: 'big', label: "Title", style: "float: none" %></p>
9
7
 
10
- <p id="article_excerpt_wrapper" style="<%= @article.has_excerpt? ? "" : "display:none" %>">
11
- <label for="article_excerpt">
12
- <%= t(:'adva.articles.attributes.excerpt') %>
13
- <span class="inline" id="hide_excerpt_hint">(<%= link_to t(:'adva.common.hide'), '#', :id => 'hide_excerpt' %>)</span>
14
- </label>
15
- <%= f.text_area :excerpt, :class => 'wysiwyg' %>
16
- </p>
8
+ <input id="toggle_excerpt" type="checkbox" <%= "checked" if @article.has_excerpt? %>>
9
+
10
+ <p class="show-if-previous-checked">
11
+ <label for="article_excerpt">
12
+ Excerpt
13
+ <span>(<%= link_to "Hide", '#', onclick: 'document.getElementById("toggle_excerpt").checked = false; return false' %>)</span>
14
+ </label>
15
+ <%= f.text_area :excerpt, class: 'wysiwyg' %>
16
+ </p>
17
17
 
18
- <p>
18
+ <p class="show-if-previous-unchecked">
19
+ <label for="article_body" style="display: inline">Body</label>
20
+ <span>(<%= link_to "Add an excerpt", '#', onclick: 'document.getElementById("toggle_excerpt").checked = true; return false' %>)</span>
21
+ </p>
22
+ <p class="show-if-previous-checked">
19
23
  <label for="article_body" style="display: inline">Body</label>
20
- <span id="add_excerpt_hint">(<%= link_to t(:'adva.articles.excerpt_add'), '#', :id => 'add_excerpt' %>)</span>
21
24
  </p>
22
25
 
23
- <%= f.text_area :body, :class => editor_class_for(@article) %>
26
+ <%= f.text_area :body, class: editor_class_for(@article) %>
24
27
  </div>
25
28
  </fieldset>
26
29
 
27
- <%= render :partial => 'options', :locals => { :f => f } %>
30
+ <%= render 'options', f: f %>
28
31
 
29
32
  <%= content_for :sidebar do %>
30
- <%= f.label :draft, t(:'adva.articles.question_save_as_draft') %>
31
- <%= f.check_box :draft?, :id => 'toggle_draft', :label => :'adva.articles.confirm_save_as_draft' %>
32
-
33
- <p id="publish_date_wrapper" style="<%= @article.draft? ? "display:none" : "" %>">
34
- <%= f.label :published_at, t(:'adva.articles.publish_on_date') %>
35
- <%= f.datetime_select :published_at,
36
- :start_year => (@article.published_at || Time.zone.now).year-1,
37
- :end_year => (Time.zone.now.year + 5),
38
- :order => [:month, :day, :year] %>
33
+ <%= f.label :draft, "Save as Draft?" %>
34
+ <%= f.check_box :draft?, label: "Yes, save this article as a draft" %>
35
+
36
+ <p class=".show-if-previous-unchecked">
37
+ <%= f.label :published_at, "Publish on this date" %>
38
+ <%= f.datetime_select :published_at,
39
+ start_year: (@article.published_at || Time.zone.now).year-1,
40
+ end_year: (Time.zone.now.year + 5),
41
+ order: [:month, :day, :year] %>
39
42
  </p>
40
43
  <% end %>
@@ -3,17 +3,16 @@
3
3
  f.tabs do
4
4
  f.tab :options do
5
5
  html = (@section.try(:single_link_mode) ? '' : f.text_field(:permalink, :label => true)).html_safe
6
- html << f.text_field(:tag_list, :label => true, :hint => :'adva.hints.tags')
6
+ html << f.text_field(:tag_list, label: true, hint: "Enter one or more tags separated by a space. You may include spaces by enclosing a tag with quotes. (For example, <em>\"Web Dev\" Tutorials</em>).")
7
7
 
8
8
  if @categories.present?
9
9
  if !(@section.try(:single_link_mode) ? @section.single_link_mode : false)
10
- html << %(<label>#{t(:'adva.titles.publish_in_categories')}</label>).html_safe +
10
+ html << %(<label>Publish in Categories</label>).html_safe +
11
11
  render(:partial => 'categories/checkboxes', :locals => { :categories => @categories, :content => @article })
12
12
  end
13
13
  end
14
14
 
15
- html << f.select(:filter, filter_options, {}, :class => 'columnsFilter', :label => :'adva.titles.filter', :hint => :'adva.hints.filter') +
16
- f.select(:author_id, author_options(@site.users), { :selected => author_selected(@article) }, :label => true)
15
+ html << f.select(:author_id, author_options(@site.users), { :selected => author_selected(@article) }, :label => true)
17
16
  end
18
17
  end
19
18
  end
@@ -1,4 +1,4 @@
1
- <h2><%= t(:'adva.articles.titles.edit') %></h2>
1
+ <h2>Edit Article</h2>
2
2
 
3
3
  <%= split_form_for @article, :url => [:admin, @section, @article], :html => {:multipart => true, :method => :put} do |f| -%>
4
4
  <%= f.hidden_field :updated_at, :value => @article.updated_at %>
@@ -7,8 +7,8 @@
7
7
  <%= content_for :sidebar do %>
8
8
  <div id="save">
9
9
  <p class="buttons">
10
- <%= submit_tag t(:'adva.common.save'), :name => 'save_revision' %>
11
- <%= link_to t(:'adva.common.cancel'), [:admin, @section, :articles] %>
10
+ <%= submit_tag "Save", name: "save_revision" %>
11
+ <%= link_to "Cancel", [:admin, @section, :articles] %>
12
12
  </p>
13
13
  </div>
14
14
  <% end %>
@@ -1,12 +1,12 @@
1
- <h2><%= t(:'adva.articles.titles.new', :content_locale => Article.locale) %></h2>
1
+ <h2>New article</h2>
2
2
 
3
- <%= split_form_for @article, :as => :article, :url => [:admin, @section, :articles], :html => {:multipart => true, :id => 'content_form'} do |f| -%>
3
+ <%= split_form_for @article, as: :article, url: [:admin, @section, :articles], html: { multipart: true, id: 'content_form' } do |f| -%>
4
4
  <%= render :partial => 'form', :locals => {:f => f} %>
5
5
 
6
6
  <%= content_for :sidebar do %>
7
7
  <div id="save">
8
- <%= submit_tag t(:'adva.common.save'), :name => 'save_revision' %>
9
- <%= link_to t(:'adva.common.cancel'), [:admin, @section, :articles] %>
8
+ <%= submit_tag "Save", :name => 'save_revision' %>
9
+ <%= link_to "Cancel", [:admin, @section, :articles] %>
10
10
  </div>
11
11
  <% end %>
12
12
  <% end %>
@@ -1,20 +1,20 @@
1
1
  <%= content_for :sidebar do %>
2
- <p class="hint text_only large padded">
3
- <%= t :'adva.categories.hints.parent_setting_for_edit' %>
4
- </p>
2
+ <p class="hint text_only large padded">
3
+ You can use the reorder button on the index page of categories to nest and reorder your categories, you can find further instructions for this on the index page help hints.
4
+ </p>
5
5
  <% end %>
6
6
 
7
- <h2><%= t(:'adva.categories.titles.edit') %></h2>
7
+ <h2>Edit Category</h2>
8
8
 
9
9
  <%= form_for [:admin, @section, @category] do |f| %>
10
- <% f.field_set do %>
10
+ <% f.field_set do %>
11
11
  <div class="col">
12
- <%= f.text_field :title, :label => true, :hint => :'adva.hints.categories' %>
13
- </col>
12
+ <%= f.text_field :title, label: true, hint: "Avoid names countaining only 4 or 2 digits!" %>
13
+ </div>
14
14
 
15
15
  <div class="col">
16
- <%= f.text_field :permalink, :label => true, :hint => :'adva.categories.hints.permalink' %>
17
- </col>
16
+ <%= f.text_field :permalink, label: true, hint: "You can use normal letters and special letters like scandinavian letters but avoid special characters like $%&!" %>
17
+ </div>
18
18
  <% end %>
19
19
 
20
20
  <% save_or_cancel_links f, cancel_url: [:admin, @section, :categories] %>
@@ -1,23 +1,23 @@
1
1
  <%= content_for :sidebar do %>
2
- <p class="hint text_only large padded">
3
- <%= t(:'adva.categories.hints.reorder')%>
4
- </p>
2
+ <p class="hint text_only large padded">
3
+ You can use the reorder option to reorder your categories. If you want to nest your categories you can drag the category to the right and its gets set as a child of the upper category. Finish the reordering by clicking the reorder button. Please note that this option is only available when you have 2 or more categories.
4
+ </p>
5
5
  <% end %>
6
6
 
7
7
  <%=
8
- table_for @section.categories, :class => 'categories list tree' do |t|
9
- t.column :category, :actions
8
+ table_for @section.categories, :class => 'categories list tree' do |t|
9
+ t.column :category, :actions
10
10
 
11
- t.row do |r, category|
12
- r.add_class "level_#{category.level}"
13
- r.cell link_to(category.title, [:edit, :admin, @section, category], class: 'category')
14
- r.cell link_to("Edit category", [:edit, :admin, @section, category], class: 'edit') + "\n" +
15
- link_to("Delete category", [:admin, @section, category], method: :delete, class: "delete", data: { confirm: "Are you sure you want to delete this category?" })
16
- end
11
+ t.row do |r, category|
12
+ r.add_class "level_#{category.level}"
13
+ r.cell link_to(category.title, [:edit, :admin, @section, category], class: 'category')
14
+ r.cell link_to("Edit category", [:edit, :admin, @section, category], class: 'edit') + "\n" +
15
+ link_to("Delete category", [:admin, @section, category], method: :delete, class: "delete", data: { confirm: "Are you sure you want to delete this category?" })
16
+ end
17
17
 
18
- t.empty :p, :class => 'empty' do
19
- t(:'adva.categories.no_categories_in_section', :section => @section.title) + "\n" +
20
- link_to(t(:'adva.categories.links.create_now'), [:new, :admin, @section, :category])
21
- end
22
- end
18
+ t.empty :p, :class => 'empty' do
19
+ "There are no categories in #{@section.title}\n" +
20
+ link_to("Create one now &raquo;", [:new, :admin, @section, :category])
21
+ end
22
+ end
23
23
  %>
@@ -1,15 +1,17 @@
1
- <h2><%= t(:'adva.categories.titles.new') %></h2>
1
+ <h2>New Category</h2>
2
2
 
3
3
  <%= form_for [:admin, @section, @category] do |f| %>
4
4
  <fieldset>
5
5
  <div class="col">
6
- <%= f.text_field :title, :label => true, :hint => :'adva.hints.categories' %>
6
+ <%= f.text_field :title, label: true, hint: "Avoid names countaining only 4 or 2 digits!" %>
7
7
  </div>
8
8
 
9
9
  <% unless @section.categories.size < 2 %>
10
10
  <div class="col">
11
11
  <%= f.select :parent_id, @section.categories.collect {|p| [p.title, p.id] unless p == @category }.compact, { :include_blank => true, :label => true } %>
12
- <span class="hint" for="category_parent_id"><%= t :'adva.categories.hints.parent_setting' %></span>
12
+ <span class="hint" for="category_parent_id">
13
+ Choosing a parent for your section will nest this section under the chosen parent. Leave empty if you want to create this section as a root section.
14
+ </span>
13
15
  </div>
14
16
  <% end %>
15
17
  </fieldset>
@@ -11,30 +11,15 @@
11
11
  r.add_class "level_#{content.level}"
12
12
  r.cell content_status(content) + " " + link_to(content.title, [:edit, :admin, @section, content], :class => content.state)
13
13
  r.cell content.category_titles.join(", ") if @section.categories.any?
14
- r.cell content.accept_comments? && content.comments.present? ? link_to(content.comments.size, admin_comments_path) : t(:"adva.common.none") if defined?(Comment)
14
+ r.cell content.accept_comments? && content.comments.present? ? link_to(content.comments.size, admin_comments_path) : "None" if defined?(Comment)
15
15
  r.cell published_at_formatted(content)
16
16
  r.cell link_to("Edit", [:edit, :admin, @section, content], :class => "edit content") +
17
17
  link_to("Delete", [:admin, @section, content], method: :delete, class: "delete content", data: { confirm: "Are you sure you want to delete this content?" })
18
18
  end
19
19
 
20
20
  t.empty :p, :class => 'empty' do
21
- raw params[:filters] ?
22
- t(:'adva.content.no_filtered_contents') :
23
- t(:'adva.contents.no_contents', :section => @section.title) + "\n" +
24
- link_to(t(:'adva.contents.links.create_now'), [:new, :admin, @section, :content])
21
+ raw "There are no contents in #{@section.title}. " +
22
+ link_to("Create one now", [:new, :admin, @section, :content])
25
23
  end
26
24
  end
27
25
  %>
28
-
29
- <%= content_for :sidebar do -%>
30
- <!--
31
- <div class="tabs">
32
- <ul>
33
- <li class="active"><a href="#filters" onclick="return false;">Filters</a></li>
34
- </ul>
35
- <div class="tab active" id="tab_filters">
36
- <%= filter_for(Article, :categories => @section.categories) %>
37
- </div>
38
- </div>
39
- -->
40
- <% end -%>
@@ -1,26 +1,26 @@
1
1
  <!-- HACK: empty line must be here for split_form_for to work properly -->
2
2
  <fieldset>
3
3
  <div class="col">
4
- <%= hidden_field_tag 'cl', Article.locale %>
5
-
6
- <%= f.text_field :title, :class => 'big', :label => true %>
4
+ <%= hidden_field_tag 'cl', Article.locale %>
7
5
 
8
- <label for="link_body">
9
- <%= t(:'adva.links.write_link') %>
10
- </label>
11
- <%= f.text_field :body, :class => 'big' %>
6
+ <%= f.text_field :title, class: 'big', label: true %>
12
7
 
13
- <%= f.label :draft, t(:'adva.links.question_save_as_draft') %>
14
- <%= f.check_box :draft?, :id => 'toggle_draft', :label => :'adva.links.confirm_save_as_draft' %>
8
+
9
+ <label for="link_body">Enter the link address</label>
10
+ <%= f.text_field :body, class: 'big' %>
15
11
 
16
- <p id="publish_date_wrapper" style="<%= @link.draft? ? "display:none" : "" %>">
17
- <%= f.label :published_at, t(:'adva.links.publish_on_date') %>
18
- <%= f.datetime_select :published_at,
19
- :start_year => (@link.published_at || Time.zone.now).year-1,
20
- :end_year => (Time.zone.now.year + 5),
21
- :order => [:month, :day, :year] %>
22
- </p>
12
+ <%= f.label :draft, "Save as Draft?" %>
13
+ <%= f.check_box :draft?, id: 'toggle_draft', label: "Yes, save this link as a draft" %>
14
+
15
+ <p class="show-if-previous-unchecked">
16
+ <%= f.label :published_at, "Publish on this date" %>
17
+ <%= f.datetime_select :published_at,
18
+ start_year: (@link.published_at || Time.zone.now).year-1,
19
+ end_year: (Time.zone.now.year + 5),
20
+ order: [:month, :day, :year] %>
21
+ </p>
23
22
  </div>
24
23
  </fieldset>
25
24
 
26
- <%= render :partial => 'options', :locals => { :f => f } %>
25
+ <%= render 'options', f: f %>
26
+
@@ -1,23 +1,20 @@
1
1
  <%=
2
- content_for :sidebar do
3
- f.tabs do
4
- f.tab :options do
5
- # html = label_tag(:content_locale, t(:'adva.common.locale')) +
6
- # %(<select id="content_locale" name="cl">#{options_for_select I18n.available_locales, Article.locale}</select>) +
7
- html = (@section.try(:single_link_mode) ? '' : f.text_field(:permalink, :label => true)) +
8
- %(<p class="hint" for="content_locale">#{t(:'adva.hints.locale')}</p>).html_safe +
9
- f.text_field(:tag_list, :label => true, :hint => :'adva.hints.tags')
2
+ content_for :sidebar do
3
+ f.tabs do
4
+ f.tab :options do
5
+ html = (@section.try(:single_link_mode) ? '' : f.text_field(:permalink, label: true)) +
6
+ f.text_field(:tag_list, label: true, hint: "Enter one or more tags separated by a space. You may include spaces by enclosing a tag with quotes. (For example, <em>\"Web Dev\" Tutorials</em>).")
10
7
 
11
- if @categories.present?
12
- if !(@section.try(:single_link_mode) ? @section.single_link_mode : false)
13
- html << %(<label>#{t(:'adva.titles.publish_in_categories')}</label>) +
14
- render(:partial => 'categories/checkboxes', :locals => { :categories => @categories, :content => @link })
15
- end
16
- end
8
+ if @categories.present?
9
+ if !(@section.try(:single_link_mode) ? @section.single_link_mode : false)
10
+
11
+ html << %(<label>Publish in these categories</label>) +
12
+ render(:partial => 'categories/checkboxes', :locals => { :categories => @categories, :content => @link })
13
+ end
14
+ end
17
15
 
18
- html << f.select(:filter, filter_options, {}, :class => 'columnsFilter', :label => :'adva.titles.filter', :hint => :'adva.hints.filter') +
19
- f.select(:author_id, author_options(@site.users), { :selected => author_selected(@link) }, :label => true)
20
- end
21
- end
22
- end
16
+ html << f.select(:author_id, author_options(@site.users), { :selected => author_selected(@link) }, :label => true)
17
+ end
18
+ end
19
+ end
23
20
  %>
@@ -1,12 +1,12 @@
1
- <h2><%= t(:'adva.links.titles.edit') %></h2>
1
+ <h2>Edit Link</h2>
2
2
 
3
3
  <%= split_form_for @link, :as => :link, :url => [:admin, @section, @link] do |f| %>
4
4
  <%= render :partial => 'form', :locals => {:f => f} %>
5
5
 
6
6
  <%= content_for :sidebar do %>
7
7
  <div id="save">
8
- <%= submit_tag t(:'adva.common.save'), :name => 'save_revision' %>
9
- <%= link_to t(:'adva.common.cancel'), [:admin, @section, :contents] %>
8
+ <%= submit_tag "Save", name: 'save_revision' %>
9
+ <%= link_to "Cancel", [:admin, @section, :contents] %>
10
10
  </div>
11
11
  <% end %>
12
12
  <% end -%>
@@ -1,12 +1,12 @@
1
- <h2><%= t(:'adva.links.titles.new', :content_locale => Article.locale) %></h2>
1
+ <h2>New Link</h2>
2
2
 
3
3
  <%= split_form_for @link, :as => :link, :url => [:admin, @section, :links] do |f| %>
4
4
  <%= render :partial => 'form', :locals => {:f => f} %>
5
5
 
6
6
  <%= content_for :sidebar do %>
7
7
  <div id="save">
8
- <%= submit_tag t(:'adva.common.save'), :name => 'save_revision' %>
9
- <%= link_to t(:'adva.common.cancel'), [:admin, @section, :contents] %>
8
+ <%= submit_tag "Save", :name => 'save_revision' %>
9
+ <%= link_to "Cancel", [:admin, @section, :contents] %>
10
10
  </div>
11
11
  <% end %>
12
12
  <% end %>
@@ -1,19 +1,19 @@
1
1
  = content_for :sidebar do
2
2
  %p.hint.text_only.large.padded
3
- = t :'adva.sections.hints.parent_setting_for_edit'
3
+ You can use the reorder button on the index page of sections to nest and reorder your sections, you can find further instructions for this on the index page help hints.
4
4
 
5
- %h2= t(:'adva.titles.general_settings')
5
+ %h2 General Settings
6
6
 
7
7
  %fieldset
8
8
  .col
9
9
  = f.text_area :title, :label => "Title"
10
10
  %p
11
- %label{:for => "published"}= t(:'adva.sections.titles.publish')
12
- %span.hint{:for => "published"}= t :'adva.sections.hints.publish'
11
+ %label(for="published") Publish option
12
+ %span.hint(for="published") Uncheck this if you don't want this section published.
13
13
  = f.check_box :published, :label => true
14
14
  %p= f.check_box :hidden_on_global_nav, :label => true
15
15
 
16
16
  .col
17
- = f.text_field :permalink, :label => true, :hint => :'adva.sections.hints.permalink'
17
+ = f.text_field :permalink, label: true, hint: "You can use normal letters and special letters like scandinavian letters but avoid special characters like $%&!"
18
18
 
19
19
  = render :partial => "admin/sections/settings/#{@section.type.underscore}", :locals => { :f => f }
@@ -2,5 +2,5 @@
2
2
  = render :partial => 'form', :locals => {:f => f}
3
3
 
4
4
  %p.buttons
5
- = submit_tag t(:'adva.common.save'), :name => 'save_revision'
6
- = link_to t(:'adva.common.cancel'), [:admin, :sections]
5
+ = submit_tag "Save", :name => 'save_revision'
6
+ = link_to "Cancel", [:admin, :sections]