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,27 +1,27 @@
1
1
  <%= content_for :sidebar do %>
2
- <p class="hint text_only large padded">
3
- <%= t(:'adva.sections.hints.sections') %>
4
- </p>
5
- <p class="hint text_only large padded">
6
- <%= t(:'adva.sections.hints.reorder') %>
7
- </p>
2
+ <p class="hint text_only large padded">
3
+ Listed here are all the sections currently on your site. Whichever section is on top is the default homepage.
4
+ </p>
5
+ <p class="hint text_only large padded">
6
+ You can use the reorder option to set your home root to different section and to reorder your sections. If you want to nest your sections you can drag the section to the right and its gets set as a child of the upper section. Finish the reordering by clicking the reorder button. Please note that this option is only available when you have 2 or more sections.
7
+ </p>
8
8
  <% end %>
9
9
 
10
10
  <%=
11
- table_for @sections, :collection_name => :sections, :class => 'sections list tree' do |t|
12
- t.column :section
13
- t.column :actions, :class => :actions
11
+ table_for @sections, :collection_name => :sections, :class => 'sections list tree' do |t|
12
+ t.column :section
13
+ t.column :actions, :class => :actions
14
14
 
15
- t.row(:class => 'section') do |r, section|
16
- r.add_class "level_#{section.level}"
17
- r.cell content_status(section) + " " + link_to(section.title, [:admin, section, :contents], :class => section.state)
15
+ t.row(:class => 'section') do |r, section|
16
+ r.add_class "level_#{section.level}"
17
+ r.cell content_status(section) + " " + link_to(section.title, [:admin, section, :contents], :class => section.state)
18
18
  r.cell link_to("Edit", [:edit, :admin, section], :class => "edit section") +
19
19
  link_to("Delete", [:admin, section], method: :delete, class: "delete section", data: { confirm: "Are you sure you want to delete this section?" })
20
- end
20
+ end
21
21
 
22
- t.empty :p, :class => 'empty' do
23
- t(:'adva.sections.no_sections_in_site', :section => @section.title) + "\n" +
24
- link_to(:'adva.sections.links.create_now', [:new, :admin, :section])
25
- end
26
- end
22
+ t.empty :p, :class => 'empty' do
23
+ "There are no sections in the site.\n" +
24
+ link_to(:'adva.sections.links.create_now', [:new, :admin, :section])
25
+ end
26
+ end
27
27
  %>
@@ -1,29 +1,31 @@
1
- <h2><%= t(:'adva.sections.titles.create') %></h2>
1
+ <h2>Create a new section</h2>
2
2
 
3
3
  <%= form_for @section, as: :section, url: admin_sections_path do |f| %>
4
4
  <fieldset>
5
5
  <div class="col">
6
- <%= f.text_field :title, label: "Title" %>
6
+ <%= f.text_field :title, label: "Title" %>
7
7
  </div>
8
8
  <div class="col">
9
- <%= f.collection_select :type, Section.types, :to_s, :to_s, {}, label: "Type" %>
9
+ <%= f.collection_select :type, Section.types, :to_s, :to_s, {}, label: "Type" %>
10
10
  </div>
11
11
  </fieldset>
12
12
 
13
- <% unless @site.sections.size < 2 %>
13
+ <% unless @site.sections.size < 2 %>
14
14
  <fieldset>
15
- <h3><%= t(:'adva.titles.parent_settings')%></h3>
16
-
17
- <%= f.select :parent_id, @site.sections.collect {|s| s == @section ? nil : [ s.title, s.id ]}.compact, { include_blank: true, label: true } %>
18
- <span class="hint" for="section_parent_id"><%= t :'adva.sections.hints.parent_setting' %></span>
15
+ <h3>Parent settings</h3>
16
+
17
+ <%= f.select :parent_id, @site.sections.collect {|s| s == @section ? nil : [ s.title, s.id ]}.compact, { include_blank: true, label: true } %>
18
+ <span class="hint" for="section_parent_id">
19
+ 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.
20
+ </span>
19
21
  </fieldset>
20
- <% end %>
22
+ <% end %>
21
23
 
22
24
  <p class="buttons">
23
- <%= submit_tag t(:'adva.common.save'), id: 'commit' %>
24
- <%= submit_tag t(:'adva.sections.links.save_and_create_new'), id: 'save_and_create_new' %>
25
- <%= t(:'adva.common.connector.or') %>
26
- <%= link_to(t(:'adva.common.cancel'), admin_sections_path) %>
25
+ <%= submit_tag "Save", id: 'commit' %>
26
+ <%= submit_tag "Save and create another section", id: 'save_and_create_new' %>
27
+ or
28
+ <%= link_to "Cancel", admin_sections_path %>
27
29
  </p>
28
30
  <% end %>
29
31
 
@@ -1,10 +1,8 @@
1
- %h2= t :'adva.sections.titles.page_settings'
1
+ %h2 Page Settings
2
2
 
3
3
  %fieldset#section_section_settings
4
4
  .col
5
- = f.label t(:"adva.sections.titles.behaviour")
6
- %p= f.radio_button :single_article_mode, true, :label => :"adva.sections.settings.single_article_mode"
7
- %p= f.radio_button :single_article_mode, false, :label => :"adva.sections.settings.multi_article_mode"
5
+ Behaviour
6
+ %p= f.radio_button :single_article_mode, true, label: "Single article per page"
7
+ %p= f.radio_button :single_article_mode, false, label: "Multiple articles per page"
8
8
 
9
- .col
10
- = f.select :content_filter, filter_options, {}, :label => true, :hint => :'adva.sections.hints.content_filter'
@@ -5,15 +5,16 @@
5
5
 
6
6
  <div class="right">
7
7
  <% if current_user.anonymous? %>
8
- You're not logged in <%= link_to t(:'adva.links.login'), :controller => 'session', :action => 'new' %>
8
+ You're not logged in <%= link_to "Log In", [:new, :session] %>
9
9
  <% else %>
10
- <%= t(:'adva.users.info.logged_in_as', :name => link_to_profile(:name => current_user.name)).html_safe %> &middot;
11
- <%= link_to t(:'adva.links.logout').html_safe, logout_path, :method => :delete %>
10
+
11
+ <%= "Logged in as: #{link_to_profile(name: current_user.name)}".html_safe %> &middot;
12
+ <%= link_to "Logout", logout_path, method: :delete %>
12
13
  <% end %>
13
14
 
14
15
  <% if @site %>
15
16
  &middot;
16
- <%= link_to t(:'adva.titles.website') + ' »', "http://#{@site.host}", :id => 'go_to_website' %>
17
+ <%= link_to "Website »", "http://#{@site.host}", id: "go_to_website" %>
17
18
  <% end %>
18
19
  </div>
19
20
  </div>
@@ -1,7 +1,7 @@
1
1
  <h3>
2
- <%= t(:'adva.titles.sections') %>
2
+ Sections
3
3
  <% if @site.sections.size > 1 %>
4
- <%= link_to_function t(:'adva.sections.links.reorder'), "sections_tree.toggle(this, '#{t(:'adva.resources.reordering_done')}');", :id => 'reorder_sections' %>
4
+ <%= link_to_function "Reorder", "sections_tree.toggle(this, 'Done reordering')", id: 'reorder_sections' %>
5
5
  <%= image_tag '/assets/adva_cms/indicator.gif', :id => 'sections_indicator', :style => 'display: none;' %>
6
6
  <% end -%>
7
7
  </h3>
@@ -1,9 +1,8 @@
1
- <h2><%= t(:'adva.titles.email_notifications') %></h2>
1
+ <h2>Email Notifications</h2>
2
2
 
3
3
  <% f.field_set :email_notification do %>
4
- <% column do %>
5
- <p class="hint text_only"><%= t(:'adva.sites.hints.email_notification') %></p>
6
-
7
- <%= f.check_box :email_notification, { :label => :'adva.sites.email_notification_activated' } %>
8
- <% end %>
9
- <% end %>
4
+ <% column do %>
5
+ <p class="hint text_only">If email notifications are activated, an email is sent to administrators every time content is created or updated. No emails are sent if notifications are deactivated.</p>
6
+ <%= f.check_box :email_notification, label: "Activate Email notifcations" %>
7
+ <% end %>
8
+ <% end %>
@@ -1,15 +1,15 @@
1
- <h2><%= t(:'adva.titles.general_settings') %></h2>
1
+ <h2>General Settings</h2>
2
2
 
3
3
  <fieldset>
4
4
  <div class="col">
5
- <%= form.text_field :name, label: :'adva.sites.label.name' %>
6
- <%= form.text_field :title, label: :'adva.sites.label.title' %>
7
- <%= form.email_field :email, label: :'adva.sites.label.admin_email' %>
5
+ <%= form.text_field :name, label: true %>
6
+ <%= form.text_field :title, label: true %>
7
+ <%= form.email_field :email, label: true %>
8
8
  </div>
9
9
 
10
10
  <div class="col">
11
- <%= form.text_field :host, label: :'adva.sites.label.host' %>
12
- <%= form.text_field :subtitle, label: :'adva.sites.label.subtitle' %>
13
- <%= form.time_zone_select :timezone, [ActiveSupport::TimeZone['UTC']], label: :'adva.sites.label.timezone' %>
11
+ <%= form.text_field :host, label: true %>
12
+ <%= form.text_field :subtitle, label: true %>
13
+ <%= form.time_zone_select :timezone, [ActiveSupport::TimeZone['UTC']], label: true %>
14
14
  </div>
15
15
  </fieldset>
@@ -1,10 +1,12 @@
1
1
  <% if users.present? %>
2
- <h3><%= t(:'adva.titles.recently_logged_in') %></h3>
2
+ <h3>Recently logged in</h3>
3
3
  <ul id="users">
4
4
  <% users.each do |user| %>
5
5
  <li>
6
6
  <%= gravatar_img(user) %><%= link_to who(user), :controller => 'users', :action => 'show', :id => user %><br />
7
- <%= t(:'adva.users.info.showed_up', :time_ago => distance_of_time_in_words_to_now(user.updated_at)) %>
7
+ showed up:
8
+ <%= distance_of_time_in_words_to_now user.updated_at %>
9
+ ago
8
10
  </li>
9
11
  <% end %>
10
12
  </ul>
@@ -1,5 +1,5 @@
1
1
  <% if contents.present? -%>
2
- <h3><%= t(:'adva.comments.titles.comments_awaiting_approval') %></h3>
2
+ <h3>Comments awaiting your approval</h3>
3
3
  <ul>
4
4
  <% contents.each do |content, comments| -%>
5
5
  <% if content -%>
@@ -14,7 +14,7 @@
14
14
  end
15
15
 
16
16
  t.empty :p, :class => 'empty' do
17
- "<p>" + t(:'adva.sites.no_sites') + "</p>" +
17
+ "<p>You currently do not have any sites created.</p>" +
18
18
  "<p>" + link_to("Create one now &raquo;", new_admin_site_path) + "</p>"
19
19
  end
20
20
  end
@@ -1,7 +1,7 @@
1
- <h2><%= t(:'adva.sites.title.create') %></h2>
1
+ <h2>New Site</h2>
2
2
 
3
3
  <%= form_for [:admin, Site.new] do |form| %>
4
- <h2><%= t(:'adva.titles.home_section') %></h2>
4
+ <h2>Home Section</h2>
5
5
 
6
6
  <% form.field_set :'home_section' do %>
7
7
  <%= fields_for :section, Section.new(params[:section]) do |s| %>
@@ -1,14 +1,13 @@
1
- <%# FIXME should be translated properly %>
2
- <h2><%= t(:'adva.titles.history') %>: <%= @site.title %></h2>
1
+ <h2>History: <%= @site.title %></h2>
3
2
 
4
3
  <%= render :partial => 'admin/activities/activities', :object => @activities %>
5
4
 
6
5
  <%= content_for :sidebar do %>
7
- <div class="tabs">
8
- <div class="tab active">
9
- <%= render :partial => 'recent_users', :locals => {:users => @users} %>
10
- <%= render :partial => 'unapproved_comments', :locals => {:contents => @contents} %>
11
- </div>
12
- </div>
6
+ <div class="tabs">
7
+ <div class="tab active">
8
+ <%= render :partial => 'recent_users', :locals => {:users => @users} %>
9
+ <%= render :partial => 'unapproved_comments', :locals => {:contents => @contents} %>
10
+ </div>
11
+ </div>
13
12
  <% end %>
14
13
 
@@ -1,4 +1,4 @@
1
- <h2><%= t(:'adva.users.titles.edit') %></h2>
1
+ <h2>Edit User</h2>
2
2
 
3
3
  <%= form_for [:admin, @user] do |f| -%>
4
4
  <%= render :partial => 'form', :locals => {:f => f} %>
@@ -1,13 +1,13 @@
1
1
  <ul id="users">
2
2
  <% @users.each do |user| %>
3
- <li>
4
- <%= gravatar_img(user) %>
5
- <h4><%= link_to user.name, [:admin, user] %></h4>
6
- <p><%= user.email %></p>
7
- <p class="actions">
8
- <%= link_to t(:'adva.links.edit'), [:edit, :admin, user], :class => 'edit' %>
9
- <%= link_to t(:'adva.links.delete'), [:admin, user], :class => 'delete', :data => { :confirm => t(:'adva.users.confirm_delete') }, :method => :delete %>
10
- </p>
11
- </li>
12
- <% end %>
3
+ <li>
4
+ <%= gravatar_img(user) %>
5
+ <h4><%= link_to user.name, [:admin, user] %></h4>
6
+ <p><%= user.email %></p>
7
+ <p class="actions">
8
+ <%= link_to "Edit", [:edit, :admin, user], class: 'edit' %>
9
+ <%= link_to "Delete", [:admin, user], method: :delete, class: 'delete', data: { confirm: "Are you sure you want to delete this user?" } %>
10
+ </p>
11
+ </li>
12
+ <% end %>
13
13
  </ul>
@@ -1,4 +1,4 @@
1
- <h2><%= t(:'adva.users.titles.new') %></h2>
1
+ <h2>New User</h2>
2
2
 
3
3
  <%= form_for [:admin, @user] do |f| -%>
4
4
  <%= render :partial => 'form', :locals => {:f => f} %>
@@ -1,27 +1,27 @@
1
1
  <h2><%= @user.name %></h2>
2
2
 
3
- <h3><%= t(:'adva.common.details') %></h3>
3
+ <h3>Details</h3>
4
4
  <p>
5
- <%= t(:'adva.users.labels.email') %>:
5
+ Email:
6
6
  <%= @user.email %>
7
7
  </p>
8
8
 
9
9
  <% if @user.homepage %>
10
10
  <p>
11
- <%= t(:'adva.users.labels.url') %>:
11
+ Homepage:
12
12
  <%= link_to @user.homepage, @user.homepage %>
13
13
  </p>
14
14
  <% end %>
15
15
 
16
- <h3><%= t(:'adva.common.events') %></h3>
16
+ <h3>Events</h3>
17
17
  <p>
18
- <%= t(:'adva.users.labels.created_at') %>:
18
+ Created at:
19
19
  <%= @user.created_at %>
20
20
  </p>
21
21
 
22
22
  <p>
23
- <%= t(:'adva.users.labels.updated_at') %>:
23
+ Updated at:
24
24
  <%= @user.updated_at %>
25
25
  </p>
26
26
 
27
- <%= render :partial => 'sidebar' %>
27
+ <%= render :partial => 'sidebar' %>
@@ -8,7 +8,6 @@
8
8
  = controller.controller_name
9
9
 
10
10
  = stylesheet_link_tag "adva_cms/admin"
11
- = stylesheet_link_tag "adva_cms/admin/activities.css"
12
11
 
13
12
  -# FIXME extract to subprojects
14
13
  = stylesheet_link_tag "adva_comments/admin/comments.css" if defined?(Comment)
@@ -19,12 +18,11 @@
19
18
 
20
19
  = yield :before_javascript_include
21
20
 
22
- = javascript_include_tag "adva_cms/application"
21
+ = javascript_include_tag "adva_cms"
23
22
  = javascript_include_tag "admin"
24
23
 
25
- -# FIXME extract to subprojects
26
- - unless Rails.env.test? # fckeditor screws up tests
27
- = javascript_include_tag "adva_fckeditor/setup_fckeditor.js"
24
+ - unless Rails.env.test? # ckeditor screws up tests
25
+ = javascript_include_tag Ckeditor.cdn_url unless Rails.env.test?
28
26
 
29
27
  = javascript_tag "window._auth_token = #{form_authenticity_token.inspect}"
30
28
  = csrf_meta_tags
@@ -8,7 +8,7 @@
8
8
  <%= stylesheet_link_tag "adva_cms/admin" %>
9
9
  <%= stylesheet_link_tag "admin" %> <!-- super project can put override styles here -->
10
10
 
11
- <%= javascript_include_tag "adva_cms/application" %>
11
+ <%= javascript_include_tag "adva_cms" %>
12
12
  <%= yield :head %>
13
13
  </head>
14
14
  <body>
@@ -1,17 +1,24 @@
1
- <h2><%= t(:'adva.passwords.titles.edit') %></h2>
1
+ <h2>Edit Password</h2>
2
2
 
3
- <p><%= params[:token].blank? ? t(:'adva.passwords.info.please_enter_new_password_and_token') : t(:'adva.passwords.info.please_enter_new_password') %></p>
3
+ <p>
4
+ <% if params[:token].blank? %>
5
+ Please enter the confirmation code you received via email and your new password.
6
+ <% else %>
7
+ Please enter your new password.
8
+ <% end %>
9
+ </p>
10
+
4
11
 
5
12
  <%= form_for 'user', :url => password_path, :html => { :method => :put } do |f| %>
6
13
  <% f.field_set do %>
7
14
  <% if current_user.anonymous? %>
8
- <%= label_tag t(:'adva.passwords.attributes.token') %>
15
+ <%= label_tag "Token" %>
9
16
  <%= text_field_tag :token %>
10
17
  <% end %>
11
- <%= f.password_field :password, :label => :"adva.users.attributes.new_password" %>
18
+ <%= f.password_field :password, label: "New password" %>
12
19
  <% end %>
13
20
 
14
21
  <% f.buttons do %>
15
- <%= submit_tag t(:'adva.common.save') %>
22
+ <%= submit_tag "Save" %>
16
23
  <% end %>
17
24
  <% end %>
@@ -1,13 +1,13 @@
1
- <h2><%= t(:'adva.passwords.titles.new') %></h2>
1
+ <h2>New Password</h2>
2
2
 
3
3
  <%= form_tag password_path do %>
4
4
  <fieldset>
5
- <p><%= t(:'adva.passwords.info.please_enter_email_to_reset_password') %></p>
6
- <%= label_tag 'user[email]', t(:"adva.users.attributes.email") %>
7
- <%= text_field_tag 'user[email]' %>
8
- </fieldset>
9
-
5
+ <p>Please enter your email address. An email will be sent to you which will include a link to reset your password.</p>
6
+ <%= label_tag 'user[email]', "Email" %>
7
+ <%= text_field_tag 'user[email]' %>
8
+ </fieldset>
9
+
10
10
  <%= buttons do %>
11
- <%= submit_tag t(:'adva.passwords.links.reset') %>
11
+ <%= submit_tag "Reset password" %>
12
12
  <% end %>
13
13
  <% end %>
@@ -1,3 +1,23 @@
1
- <%= t(:'adva.passwords.notifications.reset_password.body', :name => @user.name, :link => @reset_link, :token => @token) %>
1
+ Dear <%= @user.name %>,
2
+
3
+ Someone (hopefully you) has indicated that you cannot remember your password.
4
+ To let you reset your password we have provided a link below that will allow
5
+ you to reset your password.
6
+
7
+ <%= @reset_link %>
8
+
9
+ Alternatively, if your browser window is still open, you can use the following
10
+ confirmation code together with your new password:
11
+
12
+ <%= @token %>
13
+
14
+ It is suggested you reset your password as soon as possible since this is a
15
+ time-limited link (to protect your account).
16
+
17
+ If you did not request that your password be changed someone must have
18
+ entered your account in the "Forgot password" page on our site. Your account is
19
+ still perfectly safe since you were the only person this message was sent to.
20
+ Simply delete this message and no changes will be made to your account if this
21
+ message was sent in error.
2
22
 
3
23
 
@@ -1 +1,3 @@
1
- <%= t(:'adva.passwords.notifications.password_updated.body', :name => @user.name) %>
1
+ Dear <%= @user.name %>,
2
+
3
+ you have successfully updated your password.
@@ -2,16 +2,16 @@
2
2
  <%= form_for @user, :url => session_path, :html => {:id => 'login'} do |f| %>
3
3
  <%= hidden_field_tag :return_to, params[:return_to] if params[:return_to] %>
4
4
 
5
- <fieldset>
6
- <%= f.email_field :email, :class => 'big', :label => "Email" %>
7
- <%= f.password_field :password, :class => 'big', :label => "Password" %>
8
- <%= check_box_tag 'user[remember_me]', 1, @remember_me, :id => 'user_remember_me' %>
9
- <%= label_tag :user_remember_me, t(:'adva.session.labels.remember_me'), :class => 'inline light' %>
5
+ <fieldset>
6
+ <%= f.email_field :email, :class => 'big', :label => "Email" %>
7
+ <%= f.password_field :password, :class => 'big', :label => "Password" %>
8
+ <%= check_box_tag 'user[remember_me]', 1, @remember_me, :id => 'user_remember_me' %>
9
+ <%= label_tag :user_remember_me, "Remember me?", class: 'inline light' %>
10
10
  </fieldset>
11
-
12
- <fieldset>
13
- <%= submit_tag "Login", :id => 'commit' %> <%= t(:'adva.common.connector.or')%>
14
- <%= link_to t(:'adva.passwords.titles.new'), new_password_path %>
11
+
12
+ <fieldset>
13
+ <%= submit_tag "Login", id: "commit" %> or
14
+ <%= link_to "Reset your password", new_password_path %>
15
15
  </fieldset>
16
16
  <% end %>
17
17
  </div>
@@ -1,3 +1,3 @@
1
- <% [:notice, :error].each do |name| %>
2
- <p id="flash_<%= name %>" class="flash <%= name %>" style="display: none;"></p>
1
+ <% [:notice, :alert, :error].each do |name| %>
2
+ <p id="flash_<%= name %>" class="flash <%= name %>" hidden></p>
3
3
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <div id="sidebar">
2
2
  <% if @section and @section.categories.present? %>
3
- <h4><%= t(:'adva.sidebar.titles.topics') %></h4>
3
+ <h4>Topics</h4>
4
4
  <ul>
5
5
  <% @section.categories.each do |category| %>
6
6
  <li><%= link_to_category @section, category %></li>
@@ -9,7 +9,7 @@
9
9
  <% end %>
10
10
 
11
11
  <% if @section and @section.tag_counts.present? %>
12
- <h4><%= t(:'adva.sidebar.titles.tags') %></h4>
12
+ <h4>Tags</h4>
13
13
  <ul>
14
14
  <% @section.tag_counts.each do |tag| %>
15
15
  <li><%= link_to_tag @section, tag %></li>
@@ -0,0 +1,61 @@
1
+ require "ckeditor"
2
+ require "nacelle"
3
+
4
+ # Use this hook to configure ckeditor
5
+ Ckeditor.setup do |config|
6
+ # ==> ORM configuration
7
+ # Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
8
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
9
+ # available as additional gems.
10
+ require 'ckeditor/orm/active_record'
11
+
12
+ # Allowed image file types for upload.
13
+ # Set to nil or [] (empty array) for all file types
14
+ # By default: %w(jpg jpeg png gif tiff)
15
+ # config.image_file_types = %w(jpg jpeg png gif tiff)
16
+
17
+ # Allowed flash file types for upload.
18
+ # Set to nil or [] (empty array) for all file types
19
+ # By default: %w(jpg jpeg png gif tiff)
20
+ # config.flash_file_types = %w(swf)
21
+
22
+ # Allowed attachment file types for upload.
23
+ # Set to nil or [] (empty array) for all file types
24
+ # By default: %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
25
+ # config.attachment_file_types = %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
26
+
27
+ # Setup authorization to be run as a before filter
28
+ # By default: there is no authorization.
29
+ # config.authorize_with :cancan
30
+
31
+ # Override parent controller CKEditor inherits from
32
+ # By default: 'ApplicationController'
33
+ # config.parent_controller = 'MyController'
34
+
35
+ # Asset model classes
36
+ # config.picture_model { Ckeditor::Picture }
37
+ # config.attachment_file_model { Ckeditor::AttachmentFile }
38
+
39
+ # Paginate assets
40
+ # By default: 24
41
+ # config.default_per_page = 24
42
+
43
+ # Customize ckeditor assets path
44
+ # By default: nil
45
+ # config.asset_path = 'http://www.example.com/assets/ckeditor/'
46
+
47
+ # To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
48
+ # By default: nil (no limit)
49
+ # config.assets_languages = ['en', 'uk']
50
+ # config.assets_plugins = ['image', 'smiley']
51
+
52
+ # CKEditor CDN
53
+ # More info here http://cdn.ckeditor.com/
54
+ # By default: nil (CDN disabled)
55
+ # config.cdn_url = '//cdn.ckeditor.com/4.11.1/standard/ckeditor.js'
56
+
57
+ # JS config url
58
+ # Used when CKEditor CDN enabled
59
+ # By default: "ckeditor/config.js"
60
+ # config.js_config_url = 'ckeditor/config.js'
61
+ end
@@ -0,0 +1,2 @@
1
+ Time::DATE_FORMATS[:time_only] = '%I:%M %p'
2
+