adva 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/adva.gemspec +3 -0
- data/app/assets/config/manifest.js +6 -0
- data/app/assets/javascripts/adva_cms/ckeditor.js.erb +12 -0
- data/app/assets/javascripts/adva_cms/concat_main_menus.js +13 -0
- data/app/assets/javascripts/adva_cms/jquery.table_tree.js +704 -0
- data/app/assets/javascripts/adva_cms.js +7 -0
- data/app/assets/javascripts/ckeditor/config.js.erb +94 -0
- data/app/assets/stylesheets/adva_cms/admin/common.scss +15 -1
- data/app/assets/stylesheets/adva_cms/admin/projection.scss +2 -5
- data/app/assets/stylesheets/adva_cms/admin/sidebar.scss +30 -9
- data/app/assets/stylesheets/adva_cms/admin.scss +1 -1
- data/app/controllers/admin/base_controller.rb +10 -24
- data/app/controllers/admin/page/articles_controller.rb +8 -27
- data/app/controllers/admin/page/categories_controller.rb +6 -9
- data/app/controllers/admin/page/links_controller.rb +6 -9
- data/app/controllers/admin/sections_controller.rb +7 -9
- data/app/controllers/admin/sites_controller.rb +9 -12
- data/app/controllers/admin/users_controller.rb +6 -9
- data/app/controllers/articles_controller.rb +30 -52
- data/app/controllers/base_controller.rb +8 -8
- data/app/controllers/password_controller.rb +3 -5
- data/app/controllers/session_controller.rb +3 -5
- data/app/helpers/activities_helper.rb +9 -20
- data/app/helpers/admin/base_helper.rb +4 -22
- data/app/helpers/base_helper.rb +1 -1
- data/app/helpers/content_helper.rb +7 -5
- data/app/helpers/resource_helper.rb +4 -5
- data/app/helpers/users_helper.rb +1 -1
- data/app/models/activity.rb +3 -0
- data/app/models/article.rb +0 -11
- data/app/models/category.rb +3 -3
- data/app/models/content.rb +10 -39
- data/app/models/link.rb +0 -1
- data/app/models/password_mailer.rb +6 -9
- data/app/models/section.rb +6 -7
- data/app/models/site.rb +0 -2
- data/app/models/user.rb +1 -2
- data/app/views/activity_notifier/new_content_notification.html.erb +5 -5
- data/app/views/admin/activities/_activities.html.erb +4 -4
- data/app/views/admin/activities/_comment.html.erb +21 -21
- data/app/views/admin/activities/_content.html.erb +4 -3
- data/app/views/admin/activities/_topic.html.erb +5 -5
- data/app/views/admin/install/confirmation.html.erb +3 -3
- data/app/views/admin/install/index.html.erb +14 -14
- data/app/views/admin/page/articles/_form.html.erb +28 -25
- data/app/views/admin/page/articles/_options.html.erb +3 -4
- data/app/views/admin/page/articles/edit.html.erb +3 -3
- data/app/views/admin/page/articles/new.html.erb +4 -4
- data/app/views/admin/page/categories/edit.html.erb +9 -9
- data/app/views/admin/page/categories/index.html.erb +16 -16
- data/app/views/admin/page/categories/new.html.erb +5 -3
- data/app/views/admin/page/contents/index.html.erb +3 -18
- data/app/views/admin/page/links/_form.html.erb +17 -17
- data/app/views/admin/page/links/_options.html.erb +16 -19
- data/app/views/admin/page/links/edit.html.erb +3 -3
- data/app/views/admin/page/links/new.html.erb +3 -3
- data/app/views/admin/sections/_form.html.haml +5 -5
- data/app/views/admin/sections/edit.html.haml +2 -2
- data/app/views/admin/sections/index.html.erb +18 -18
- data/app/views/admin/sections/new.html.erb +15 -13
- data/app/views/admin/sections/settings/_page.html.haml +4 -6
- data/app/views/admin/shared/_header.html.erb +5 -4
- data/app/views/admin/shared/_section_tree.html.erb +2 -2
- data/app/views/admin/sites/_email_notifications.html.erb +6 -7
- data/app/views/admin/sites/_form.html.erb +7 -7
- data/app/views/admin/sites/_recent_users.html.erb +4 -2
- data/app/views/admin/sites/_unapproved_comments.html.erb +1 -1
- data/app/views/admin/sites/index.html.erb +1 -1
- data/app/views/admin/sites/new.html.erb +2 -2
- data/app/views/admin/sites/show.html.erb +7 -8
- data/app/views/admin/users/edit.html.erb +1 -1
- data/app/views/admin/users/index.html.erb +10 -10
- data/app/views/admin/users/new.html.erb +1 -1
- data/app/views/admin/users/show.html.erb +7 -7
- data/app/views/layouts/admin.html.haml +3 -5
- data/app/views/layouts/login.html.erb +1 -1
- data/app/views/password/edit.html.erb +12 -5
- data/app/views/password/new.html.erb +7 -7
- data/app/views/password_mailer/reset_password_email.html.erb +21 -1
- data/app/views/password_mailer/updated_password_email.html.erb +3 -1
- data/app/views/session/new.html.erb +9 -9
- data/app/views/shared/_flash.html.erb +2 -2
- data/app/views/shared/_sidebar.html.erb +2 -2
- data/config/initializers/ckeditor.rb +61 -0
- data/config/initializers/time_format.rb +2 -0
- data/lib/adva/authenticate_user.rb +193 -0
- data/lib/{active_record → adva}/belongs_to_author.rb +4 -4
- data/lib/adva/event.rb +34 -0
- data/lib/adva/extensible_forms.rb +285 -0
- data/lib/{has_options.rb → adva/has_options.rb} +5 -7
- data/lib/adva/has_permalink.rb +36 -0
- data/lib/adva/version.rb +1 -1
- data/lib/adva.rb +10 -36
- data/lib/rails_ext/action_controller/event_helper.rb +1 -1
- data/lib/rails_ext.rb +0 -9
- data/vendor/gems/cacheable_flash/.gitignore +8 -0
- data/vendor/gems/cacheable_flash/Gemfile +8 -0
- data/vendor/gems/cacheable_flash/README.md +35 -0
- data/vendor/gems/cacheable_flash/Rakefile +4 -0
- data/vendor/gems/cacheable_flash/bin/console +15 -0
- data/vendor/gems/cacheable_flash/bin/setup +8 -0
- data/vendor/gems/cacheable_flash/cacheable_flash.gemspec +38 -0
- data/vendor/gems/cacheable_flash/lib/cacheable_flash/controller.rb +29 -0
- data/vendor/gems/cacheable_flash/lib/cacheable_flash/javascript.js +19 -0
- data/vendor/gems/cacheable_flash/lib/cacheable_flash/middleware.rb +30 -0
- data/vendor/gems/cacheable_flash/lib/cacheable_flash/version.rb +5 -0
- data/vendor/gems/cacheable_flash/lib/cacheable_flash.rb +12 -0
- data/vendor/gems/simple_taggable/lib/tag_list.rb +1 -1
- data/vendor/gems/tags/lib/menu.rb +1 -1
- data/vendor/gems/tags/lib/tags/tag.rb +1 -1
- metadata +71 -144
- data/app/assets/javascripts/adva_cms/admin/jquery.admin.js +0 -23
- data/app/assets/javascripts/adva_cms/admin/jquery.article.js +0 -22
- data/app/assets/javascripts/adva_cms/admin/jquery.cached_pages.js +0 -14
- data/app/assets/javascripts/adva_cms/admin/jquery.table_tree.js +0 -7
- data/app/assets/javascripts/adva_cms/application.js +0 -13
- data/app/assets/javascripts/adva_cms/base.js +0 -4
- data/app/assets/javascripts/adva_cms/cookie.js +0 -49
- data/app/assets/javascripts/adva_cms/jquery/jquery-lowpro.js +0 -224
- data/app/assets/javascripts/adva_cms/jquery/jquery.qtip.js +0 -2085
- data/app/assets/javascripts/adva_cms/jquery/jquery.table_tree.js +0 -307
- data/app/assets/javascripts/adva_cms/jquery/jquery.tablednd_0_5.js +0 -386
- data/app/assets/javascripts/adva_cms/jquery.common.js +0 -41
- data/app/assets/javascripts/adva_cms/jquery.dates.js +0 -51
- data/app/assets/javascripts/adva_cms/jquery.flash.js +0 -59
- data/app/assets/javascripts/adva_cms/jquery.roles.js +0 -25
- data/app/assets/javascripts/adva_cms/json.js +0 -139
- data/app/controllers/admin/base_account_controller.rb +0 -13
- data/app/controllers/admin/install_controller.rb +0 -61
- data/app/controllers/admin/plugins_controller.rb +0 -38
- data/app/helpers/meta_tags_helper.rb +0 -30
- data/app/models/account.rb +0 -7
- data/app/models/event.rb +0 -34
- data/app/views/admin/articles/_meta_tags.html.erb +0 -7
- data/app/views/admin/cached_pages/_filter.html.erb +0 -8
- data/app/views/admin/cached_pages/destroy.js.erb +0 -18
- data/app/views/admin/cached_pages/index.html.erb +0 -26
- data/app/views/admin/plugins/_form.html.erb +0 -11
- data/app/views/admin/plugins/index.html.erb +0 -16
- data/app/views/admin/plugins/show.html.erb +0 -43
- data/app/views/admin/shared/_language_select.html.erb +0 -6
- data/app/views/admin/shared/_section_summary.html.erb +0 -23
- data/app/views/admin/sites/_meta_tags.html.erb +0 -15
- data/app/views/layouts/default.html.erb +0 -38
- data/app/views/layouts/simple.html.erb +0 -22
- data/app/views/shared/_footer.html.erb +0 -4
- data/app/views/shared/messages/insufficient_permissions.html.erb +0 -4
- data/config/initializers/article.rb +0 -8
- data/config/initializers/has_options.rb +0 -2
- data/config/initializers/has_permalink.rb +0 -2
- data/config/initializers/site.rb +0 -8
- data/config/locales/en.yml +0 -1319
- data/lib/action_controller/authenticate_anonymous.rb +0 -69
- data/lib/action_controller/authenticate_user.rb +0 -203
- data/lib/core_ext.rb +0 -7
- data/lib/extensible_forms.rb +0 -284
- data/lib/has_permalink.rb +0 -33
- data/lib/login/helper_integration.rb +0 -11
- data/lib/login/mail_config.rb +0 -39
- data/lib/rails_ext/action_controller/cacheable_flash.rb +0 -30
- data/lib/rails_ext/action_controller/content_for_assignments.rb +0 -106
- data/lib/rails_ext/action_controller/page_caching.rb +0 -23
- data/lib/rails_ext/action_controller/responds_to_parent.rb +0 -46
- data/lib/rails_ext/active_record/exists.rb +0 -5
- data/lib/rails_ext/active_record/sti_instantiation.rb +0 -35
- data/lib/rails_ext/active_record/sticky_changes.rb +0 -30
- data/lib/rails_ext/railties/plugin.rb +0 -58
- data/lib/rails_ext/railties/plugin_configuration.rb +0 -72
- data/lib/registry.rb +0 -49
- data/lib/tasks/translation.rake +0 -69
- data/lib/time_hacks.rb +0 -57
- data/lib/webrat_patch.rb +0 -11
- data/test/meta_tags_test.rb +0 -42
- data/vendor/gems/has_counter/.gitignore +0 -17
- data/vendor/gems/has_counter/Gemfile +0 -4
- data/vendor/gems/has_counter/LICENSE +0 -22
- data/vendor/gems/has_counter/MIT-LICENSE +0 -20
- data/vendor/gems/has_counter/README.markdown +0 -64
- data/vendor/gems/has_counter/README.md +0 -29
- data/vendor/gems/has_counter/Rakefile +0 -2
- data/vendor/gems/has_counter/db/migrate/20080601194338_create_counters_table.rb.rb +0 -13
- data/vendor/gems/has_counter/has_counter.gemspec +0 -17
- data/vendor/gems/has_counter/lib/active_record/has_counter.rb +0 -67
- data/vendor/gems/has_counter/lib/counter.rb +0 -23
- data/vendor/gems/has_counter/lib/has_counter/version.rb +0 -3
- data/vendor/gems/has_counter/lib/has_counter.rb +0 -4
- data/vendor/gems/has_counter/spec/has_counter.sqlite3.db +0 -0
- data/vendor/gems/has_counter/spec/has_counter_spec.rb +0 -55
- data/vendor/gems/has_counter/spec/spec_helper.rb +0 -117
- data/vendor/gems/has_filter/.gitignore +0 -17
- data/vendor/gems/has_filter/Gemfile +0 -4
- data/vendor/gems/has_filter/LICENSE +0 -22
- data/vendor/gems/has_filter/README.md +0 -29
- data/vendor/gems/has_filter/Rakefile +0 -2
- data/vendor/gems/has_filter/app/assets/images/has_filter/filter_add.png +0 -0
- data/vendor/gems/has_filter/app/assets/images/has_filter/filter_button_left.png +0 -0
- data/vendor/gems/has_filter/app/assets/images/has_filter/filter_button_right.png +0 -0
- data/vendor/gems/has_filter/app/assets/images/has_filter/filter_remove.png +0 -0
- data/vendor/gems/has_filter/app/assets/javascripts/has_filter/filter.js +0 -35
- data/vendor/gems/has_filter/app/assets/javascripts/has_filter/jquery.filter.js +0 -23
- data/vendor/gems/has_filter/app/assets/stylesheets/has_filter/alternate/filter.scss +0 -102
- data/vendor/gems/has_filter/app/assets/stylesheets/has_filter/filter.scss +0 -100
- data/vendor/gems/has_filter/app/helpers/filter_helper.rb +0 -3
- data/vendor/gems/has_filter/has_filter.gemspec +0 -17
- data/vendor/gems/has_filter/init.rb +0 -3
- data/vendor/gems/has_filter/lib/has_filter/active_record/act_macro.rb +0 -102
- data/vendor/gems/has_filter/lib/has_filter/filter/base.rb +0 -67
- data/vendor/gems/has_filter/lib/has_filter/filter/categorized.rb +0 -24
- data/vendor/gems/has_filter/lib/has_filter/filter/chain.rb +0 -45
- data/vendor/gems/has_filter/lib/has_filter/filter/set.rb +0 -80
- data/vendor/gems/has_filter/lib/has_filter/filter/state.rb +0 -25
- data/vendor/gems/has_filter/lib/has_filter/filter/tagged.rb +0 -22
- data/vendor/gems/has_filter/lib/has_filter/filter/text.rb +0 -55
- data/vendor/gems/has_filter/lib/has_filter/filter.rb +0 -17
- data/vendor/gems/has_filter/lib/has_filter/version.rb +0 -3
- data/vendor/gems/has_filter/lib/has_filter.rb +0 -22
- data/vendor/gems/has_filter/test/db/setup.rb +0 -45
- data/vendor/gems/has_filter/test/db/test.sqlite3.db +0 -0
- data/vendor/gems/has_filter/test/fixtures.rb +0 -15
- data/vendor/gems/has_filter/test/has_filter/filter_chain_test.rb +0 -41
- data/vendor/gems/has_filter/test/has_filter/filter_scopes_test.rb +0 -102
- data/vendor/gems/has_filter/test/has_filter/filter_tags_test.rb +0 -113
- data/vendor/gems/has_filter/test/has_filter/integration.rb +0 -15
- data/vendor/gems/has_filter/test/has_filter/scopes_test.rb +0 -48
- data/vendor/gems/has_filter/test/log/test.log +0 -34346
- data/vendor/gems/has_filter/test/models.rb +0 -23
- data/vendor/gems/has_filter/test/templates/has_filter/test/index.html.erb +0 -5
- data/vendor/gems/has_filter/test/test_helper.rb +0 -66
- data/vendor/gems/xss_terminate/.gitignore +0 -17
- data/vendor/gems/xss_terminate/Gemfile +0 -4
- data/vendor/gems/xss_terminate/LICENSE +0 -22
- data/vendor/gems/xss_terminate/MIT-LICENSE +0 -20
- data/vendor/gems/xss_terminate/README +0 -94
- data/vendor/gems/xss_terminate/README.md +0 -29
- data/vendor/gems/xss_terminate/Rakefile +0 -23
- data/vendor/gems/xss_terminate/lib/html5lib_sanitize.rb +0 -2453
- data/vendor/gems/xss_terminate/lib/rails_sanitize.rb +0 -8
- data/vendor/gems/xss_terminate/lib/xss_terminate/version.rb +0 -3
- data/vendor/gems/xss_terminate/lib/xss_terminate.rb +0 -141
- data/vendor/gems/xss_terminate/tasks/xss_terminate_tasks.rake +0 -7
- data/vendor/gems/xss_terminate/test/models/comment.rb +0 -5
- data/vendor/gems/xss_terminate/test/models/entry.rb +0 -7
- data/vendor/gems/xss_terminate/test/models/message.rb +0 -3
- data/vendor/gems/xss_terminate/test/models/person.rb +0 -5
- data/vendor/gems/xss_terminate/test/models/review.rb +0 -5
- data/vendor/gems/xss_terminate/test/schema.rb +0 -34
- data/vendor/gems/xss_terminate/test/setup_test.rb +0 -16
- data/vendor/gems/xss_terminate/test/xss_terminate_test.rb +0 -50
- data/vendor/gems/xss_terminate/xss_terminate.gemspec +0 -17
- /data/lib/tasks/{adva_cms.rake → adva.rake} +0 -0
@@ -1,27 +1,27 @@
|
|
1
1
|
<%= content_for :sidebar do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
20
|
+
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
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
|
-
|
6
|
+
<%= f.text_field :title, label: "Title" %>
|
7
7
|
</div>
|
8
8
|
<div class="col">
|
9
|
-
|
9
|
+
<%= f.collection_select :type, Section.types, :to_s, :to_s, {}, label: "Type" %>
|
10
10
|
</div>
|
11
11
|
</fieldset>
|
12
12
|
|
13
|
-
|
13
|
+
<% unless @site.sections.size < 2 %>
|
14
14
|
<fieldset>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
22
|
+
<% end %>
|
21
23
|
|
22
24
|
<p class="buttons">
|
23
|
-
<%= submit_tag
|
24
|
-
<%= submit_tag
|
25
|
-
|
26
|
-
<%= link_to
|
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
|
1
|
+
%h2 Page Settings
|
2
2
|
|
3
3
|
%fieldset#section_section_settings
|
4
4
|
.col
|
5
|
-
|
6
|
-
%p= f.radio_button :single_article_mode, true, :
|
7
|
-
%p= f.radio_button :single_article_mode, false, :
|
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
|
8
|
+
You're not logged in <%= link_to "Log In", [:new, :session] %>
|
9
9
|
<% else %>
|
10
|
-
|
11
|
-
<%=
|
10
|
+
|
11
|
+
<%= "Logged in as: #{link_to_profile(name: current_user.name)}".html_safe %> ·
|
12
|
+
<%= link_to "Logout", logout_path, method: :delete %>
|
12
13
|
<% end %>
|
13
14
|
|
14
15
|
<% if @site %>
|
15
16
|
·
|
16
|
-
<%= link_to
|
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
|
-
|
2
|
+
Sections
|
3
3
|
<% if @site.sections.size > 1 %>
|
4
|
-
<%= link_to_function
|
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
|
1
|
+
<h2>Email Notifications</h2>
|
2
2
|
|
3
3
|
<% f.field_set :email_notification do %>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
1
|
+
<h2>General Settings</h2>
|
2
2
|
|
3
3
|
<fieldset>
|
4
4
|
<div class="col">
|
5
|
-
<%= form.text_field :name, label:
|
6
|
-
<%= form.text_field :title, label:
|
7
|
-
<%= form.email_field :email, label:
|
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:
|
12
|
-
<%= form.text_field :subtitle, label:
|
13
|
-
<%= form.time_zone_select :timezone, [ActiveSupport::TimeZone['UTC']], label:
|
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
|
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
|
-
|
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,7 +1,7 @@
|
|
1
|
-
<h2
|
1
|
+
<h2>New Site</h2>
|
2
2
|
|
3
3
|
<%= form_for [:admin, Site.new] do |form| %>
|
4
|
-
<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
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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,13 +1,13 @@
|
|
1
1
|
<ul id="users">
|
2
2
|
<% @users.each do |user| %>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= link_to
|
10
|
-
|
11
|
-
|
12
|
-
|
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,27 +1,27 @@
|
|
1
1
|
<h2><%= @user.name %></h2>
|
2
2
|
|
3
|
-
<h3
|
3
|
+
<h3>Details</h3>
|
4
4
|
<p>
|
5
|
-
|
5
|
+
Email:
|
6
6
|
<%= @user.email %>
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<% if @user.homepage %>
|
10
10
|
<p>
|
11
|
-
|
11
|
+
Homepage:
|
12
12
|
<%= link_to @user.homepage, @user.homepage %>
|
13
13
|
</p>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<h3
|
16
|
+
<h3>Events</h3>
|
17
17
|
<p>
|
18
|
-
|
18
|
+
Created at:
|
19
19
|
<%= @user.created_at %>
|
20
20
|
</p>
|
21
21
|
|
22
22
|
<p>
|
23
|
-
|
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
|
21
|
+
= javascript_include_tag "adva_cms"
|
23
22
|
= javascript_include_tag "admin"
|
24
23
|
|
25
|
-
|
26
|
-
|
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
|
11
|
+
<%= javascript_include_tag "adva_cms" %>
|
12
12
|
<%= yield :head %>
|
13
13
|
</head>
|
14
14
|
<body>
|
@@ -1,17 +1,24 @@
|
|
1
|
-
<h2
|
1
|
+
<h2>Edit Password</h2>
|
2
2
|
|
3
|
-
<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
|
15
|
+
<%= label_tag "Token" %>
|
9
16
|
<%= text_field_tag :token %>
|
10
17
|
<% end %>
|
11
|
-
<%= f.password_field :password, :
|
18
|
+
<%= f.password_field :password, label: "New password" %>
|
12
19
|
<% end %>
|
13
20
|
|
14
21
|
<% f.buttons do %>
|
15
|
-
<%= submit_tag
|
22
|
+
<%= submit_tag "Save" %>
|
16
23
|
<% end %>
|
17
24
|
<% end %>
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<h2
|
1
|
+
<h2>New Password</h2>
|
2
2
|
|
3
3
|
<%= form_tag password_path do %>
|
4
4
|
<fieldset>
|
5
|
-
<p
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
11
|
+
<%= submit_tag "Reset password" %>
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
@@ -1,3 +1,23 @@
|
|
1
|
-
<%=
|
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
|
|
@@ -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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
13
|
-
|
14
|
-
|
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 %>"
|
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
|
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
|
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
|