dm_forum 4.2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +23 -0
- data/README.md +33 -0
- data/Rakefile +30 -0
- data/app/assets/javascripts/dm_forum/admin.js +20 -0
- data/app/assets/javascripts/dm_forum/application.js +16 -0
- data/app/assets/javascripts/dm_forum/dm_forum.js +3 -0
- data/app/assets/stylesheets/dm_forum/admin.css +2 -0
- data/app/assets/stylesheets/dm_forum/application.css +12 -0
- data/app/controllers/dm_forum/admin/admin_controller.rb +13 -0
- data/app/controllers/dm_forum/admin/dashboard_controller.rb +12 -0
- data/app/controllers/dm_forum/admin/forum_categories_controller.rb +80 -0
- data/app/controllers/dm_forum/admin/forum_sites_controller.rb +40 -0
- data/app/controllers/dm_forum/admin/forums_controller.rb +113 -0
- data/app/controllers/dm_forum/application_controller.rb +25 -0
- data/app/controllers/dm_forum/forum_comments_controller.rb +88 -0
- data/app/controllers/dm_forum/forum_topics_controller.rb +93 -0
- data/app/controllers/dm_forum/forums_controller.rb +45 -0
- data/app/datatables/forum_user_datatable.rb +79 -0
- data/app/helpers/dm_forum/application_helper.rb +5 -0
- data/app/helpers/dm_forum/forum_helper.rb +109 -0
- data/app/mailers/forum_notification_mailer.rb +27 -0
- data/app/models/dm_forum/concerns/ability.rb +50 -0
- data/app/models/dm_forum/concerns/user.rb +37 -0
- data/app/models/dm_forum/permitted_params.rb +38 -0
- data/app/models/forum.rb +74 -0
- data/app/models/forum_category.rb +14 -0
- data/app/models/forum_comment.rb +93 -0
- data/app/models/forum_site.rb +27 -0
- data/app/models/forum_topic.rb +146 -0
- data/app/presenters/forum_comment_presenter.rb +8 -0
- data/app/presenters/forum_common_presenter.rb +31 -0
- data/app/presenters/forum_presenter.rb +14 -0
- data/app/views/dm_forum/admin/dashboard/_widget_forum_comments.html.erb +38 -0
- data/app/views/dm_forum/admin/dashboard/widget_forum_comments.js.erb +1 -0
- data/app/views/dm_forum/admin/forum_categories/_content_toolbar.html.erb +5 -0
- data/app/views/dm_forum/admin/forum_categories/_form.html.erb +18 -0
- data/app/views/dm_forum/admin/forum_categories/edit.html.erb +3 -0
- data/app/views/dm_forum/admin/forum_categories/index.html.erb +25 -0
- data/app/views/dm_forum/admin/forum_categories/new.html.erb +3 -0
- data/app/views/dm_forum/admin/forum_categories/show.html.erb +41 -0
- data/app/views/dm_forum/admin/forum_sites/_form.html.erb +18 -0
- data/app/views/dm_forum/admin/forum_sites/edit.html.erb +2 -0
- data/app/views/dm_forum/admin/forum_sites/show.html.erb +12 -0
- data/app/views/dm_forum/admin/forums/_content_toolbar.html.erb +5 -0
- data/app/views/dm_forum/admin/forums/_form.html.erb +24 -0
- data/app/views/dm_forum/admin/forums/edit.html.erb +2 -0
- data/app/views/dm_forum/admin/forums/new.html.erb +2 -0
- data/app/views/dm_forum/admin/forums/show.html.erb +68 -0
- data/app/views/dm_forum/forum_comments/_formatting.html.erb +12 -0
- data/app/views/dm_forum/forum_comments/edit.html.erb +15 -0
- data/app/views/dm_forum/forum_topics/_comment_item.html.erb +26 -0
- data/app/views/dm_forum/forum_topics/_comments_list.html.erb +63 -0
- data/app/views/dm_forum/forum_topics/_follow_button.html.erb +3 -0
- data/app/views/dm_forum/forum_topics/_form.html.erb +24 -0
- data/app/views/dm_forum/forum_topics/edit.html.erb +13 -0
- data/app/views/dm_forum/forum_topics/new.html.erb +13 -0
- data/app/views/dm_forum/forum_topics/show.html.erb +49 -0
- data/app/views/dm_forum/forum_topics/toggle_follow.js.coffee +5 -0
- data/app/views/dm_forum/forums/_category_side_list.html.erb +28 -0
- data/app/views/dm_forum/forums/_forum_header.html.erb +14 -0
- data/app/views/dm_forum/forums/_no_forums.html.erb +1 -0
- data/app/views/dm_forum/forums/_topics_list.html.erb +86 -0
- data/app/views/dm_forum/forums/categories.html.erb +32 -0
- data/app/views/dm_forum/forums/list.html.erb +10 -0
- data/app/views/dm_forum/forums/show.html.erb +39 -0
- data/app/views/layouts/email_templates/forum_notification.html.erb +15 -0
- data/app/views/layouts/email_templates/forum_notification.text.erb +16 -0
- data/config/initializers/dm_forum.rb +0 -0
- data/config/locales/fms.cs.yml +104 -0
- data/config/locales/fms.de.yml +104 -0
- data/config/locales/fms.en.yml +104 -0
- data/config/locales/fms.fi.yml +104 -0
- data/config/locales/fms.ja.yml +104 -0
- data/config/routes.rb +43 -0
- data/db/migrate/20130103151149_create_forums.rb +72 -0
- data/db/migrate/20130424125513_add_public_forum.rb +13 -0
- data/db/migrate/20130430084925_add_forum_category.rb +7 -0
- data/db/migrate/20140201112134_delete_monitorships.rb +17 -0
- data/db/migrate/20140303121325_add_requires_subscription_forum.rb +5 -0
- data/db/migrate/20140423113420_add_forum_owner.rb +6 -0
- data/db/migrate/20160821150125_index_foreign_keys_in_fms_forum_sites.rb +5 -0
- data/db/migrate/20160821150126_index_foreign_keys_in_fms_forum_topics.rb +9 -0
- data/db/migrate/20160821150127_index_foreign_keys_in_fms_forums.rb +7 -0
- data/lib/dm_forum/engine.rb +9 -0
- data/lib/dm_forum/version.rb +3 -0
- data/lib/dm_forum.rb +4 -0
- data/lib/tasks/dm_forum_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/ability.rb +12 -0
- data/spec/dummy/app/models/user.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +82 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +17 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141114170927_add_globalize_countries.dm_core.rb +50 -0
- data/spec/dummy/db/migrate/20141114170928_devise_create_users.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170929_add_user_fields.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170930_rolify_create_roles.dm_core.rb +20 -0
- data/spec/dummy/db/migrate/20141114170931_add_last_access.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170932_create_versions.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170933_add_object_changes_column_to_versions.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170934_create_dm_core_accounts.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170935_add_account_to_users.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170936_create_preferences.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170937_create_comments.dm_core.rb +22 -0
- data/spec/dummy/db/migrate/20141114170938_add_activity.dm_core.rb +21 -0
- data/spec/dummy/db/migrate/20141114170939_add_type_to_comments.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170940_add_category.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170941_create_email_table.dm_core.rb +26 -0
- data/spec/dummy/db/migrate/20141114170942_add_user_profile.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170943_add_profile_email.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170944_create_payment_history.dm_core.rb +37 -0
- data/spec/dummy/db/migrate/20141114170945_change_anchor_field.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170946_create_user_site_profile.dm_core.rb +27 -0
- data/spec/dummy/db/migrate/20141114170947_add_avatar.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170948_add_notify_to_payment_history.dm_core.rb +8 -0
- data/spec/dummy/db/migrate/20141114170949_acts_as_votable_migration.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170950_add_user_site_profile_uuid.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170951_add_invoice_id.dm_core.rb +7 -0
- data/spec/dummy/db/migrate/20141114170952_acts_as_follower_migration.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170953_rename_invoice_id.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170954_add_core_addresses.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170955_papertrail_increase_column.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170956_acts_as_taggable_on_migration.dm_core.rb +32 -0
- data/spec/dummy/db/migrate/20141114170957_add_missing_unique_indices.dm_core.rb +23 -0
- data/spec/dummy/db/migrate/20141114170958_add_taggings_counter_cache_to_tags.dm_core.rb +16 -0
- data/spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb +40 -0
- data/spec/dummy/db/migrate/20141114170960_add_missing_taggable_index.dm_core.rb +11 -0
- data/spec/dummy/db/migrate/20141119112030_create_cms.dm_cms.rb +92 -0
- data/spec/dummy/db/migrate/20141119112031_add_account_to_cms.dm_cms.rb +11 -0
- data/spec/dummy/db/migrate/20141119112032_create_blog.dm_cms.rb +62 -0
- data/spec/dummy/db/migrate/20141119112033_add_notification_sent.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119112034_add_blog_comment.dm_cms.rb +8 -0
- data/spec/dummy/db/migrate/20141119112035_add_blog_image.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119112036_rename_snippet_slug.dm_cms.rb +14 -0
- data/spec/dummy/db/migrate/20141119112037_add_requires_subscription_blog.dm_cms.rb +8 -0
- data/spec/dummy/db/migrate/20141119112038_add_pages_ranked_model.dm_cms.rb +23 -0
- data/spec/dummy/db/migrate/20141119112039_add_blog_owner.dm_cms.rb +7 -0
- data/spec/dummy/db/migrate/20141119112040_create_media_files.dm_cms.rb +30 -0
- data/spec/dummy/db/migrate/20141119112041_add_cmspage_summary.dm_cms.rb +7 -0
- data/spec/dummy/db/migrate/20141119112042_add_blog_image_email_header.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119112043_add_header_image.dm_cms.rb +10 -0
- data/spec/dummy/db/migrate/20160128144312_add_favored_locale.dm_core.rb +17 -0
- data/spec/dummy/db/migrate/20160128144313_update_papertrail_v4.dm_core.rb +41 -0
- data/spec/dummy/db/schema.rb +628 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/accounts.rb +9 -0
- data/spec/factories/user_profiles.rb +10 -0
- data/spec/factories/users.rb +19 -0
- data/spec/models/forum_spec.rb +9 -0
- data/spec/rails_helper.rb +70 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/accounts.rb +17 -0
- data/spec/support/devise.rb +44 -0
- data/spec/support/fix_locale.rb +57 -0
- metadata +337 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
<%= simple_form_for [@forum, @forum_topic], wrapper: simple_form_theme_wrapper do |f| %>
|
2
|
+
|
3
|
+
<%= f.error_notification :message => "Please review the problems below" %>
|
4
|
+
<%= f.input :title, :label => I18n.t('fms.views_topics.topic') %>
|
5
|
+
|
6
|
+
<% if @forum_topic.new_record? %>
|
7
|
+
<%= f.input :body, :as => :text, :label => I18n.t('fms.views_topics.body'), :input_html => {:rows => 10} %>
|
8
|
+
<% elsif is_admin? %>
|
9
|
+
<%= f.input :forum_id, collection: ForumSite.site.all_forums, label_method: :name, value_method: :id %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% if can? :moderate, @forum %>
|
13
|
+
<div class="clearfix">
|
14
|
+
<%= f.input :sticky, :label => "<i class='fa fa-thumb-tack'></i> #{I18n.t('fms.sticky')}".html_safe %>
|
15
|
+
</div>
|
16
|
+
<div class="clearfix">
|
17
|
+
<%= f.input :locked, :label => "<i class='fa fa-lock'></i> #{I18n.t('fms.views_topics.lock_topic')}".html_safe %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= f.submit I18n.t('fms.post_topic'), class: 'btn btn-primary' %>
|
22
|
+
<%#= submit_or_cancel :save => I18n.t('fms.post_topic'), :cancel => I18n.t('fms.views_topics.cancel'),
|
23
|
+
:cancel_url => (@forum_topic.new_record? ? [@forum] : [@forum, @forum_topic]) %>
|
24
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :page_title, @forum.forum_category.name %>
|
2
|
+
<% content_for :sidebar do %>
|
3
|
+
<%= render :partial => "dm_forum/forum_comments/formatting" %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% content_for :crumbs, forum_crumbs(@forum_topic.forum) %>
|
7
|
+
|
8
|
+
<%= render(:partial => 'dm_forum/forums/forum_header', :object => @forum, :as => :forum) %>
|
9
|
+
|
10
|
+
<h1 id="new_topic"><%= I18n.t 'fms.edit_topic' %></h1>
|
11
|
+
<p class="subtitle"><%= I18n.t 'fms.by_user', :user => current_user.display_name %></p>
|
12
|
+
|
13
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :page_title, @forum.forum_category.name %>
|
2
|
+
<% content_for :sidebar do %>
|
3
|
+
<%= render :partial => "dm_forum/forum_comments/formatting" %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% content_for :crumbs, forum_crumbs(@forum_topic.forum) %>
|
7
|
+
|
8
|
+
<%= render(:partial => 'dm_forum/forums/forum_header', :object => @forum, :as => :forum) %>
|
9
|
+
|
10
|
+
<h1 id="new_topic"><%= I18n.t 'fms.new_topic' %></h1>
|
11
|
+
<p class="subtitle"><%= I18n.t 'fms.by_user', :user => current_user.display_name %></p>
|
12
|
+
|
13
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<% content_for :page_title, @forum_topic.title %>
|
2
|
+
|
3
|
+
<% content_for :sidebar do %>
|
4
|
+
|
5
|
+
<%= render(partial: 'dm_forum/forum_topics/follow_button', locals: {following: @following} ) if current_user %>
|
6
|
+
<div class="clear"></div>
|
7
|
+
<div class="forum_sidebar_voices">
|
8
|
+
<h5><%= I18n.t 'fms.voices' %></h5>
|
9
|
+
<ul>
|
10
|
+
<% @forum_topic.voices.each do |user| %>
|
11
|
+
<li><%= user.display_name %></li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% content_for :crumbs, forum_crumbs(@forum_topic.forum) %>
|
18
|
+
|
19
|
+
<div class="comment_section" id="comment_section">
|
20
|
+
|
21
|
+
<%= render(partial: 'dm_forum/forums/forum_header', object: @forum_topic.forum, as: :forum) %>
|
22
|
+
|
23
|
+
<h1 id="topic_title">
|
24
|
+
<%= @forum_topic.title %>
|
25
|
+
<% if @forum_topic.locked? %>
|
26
|
+
<span>(<%= I18n.t 'fms.topic' %> <%= I18n.t 'fms.locked' %>)</span>
|
27
|
+
<% end %>
|
28
|
+
<% if user_signed_in? %>
|
29
|
+
<% if can? :edit, @forum_topic %>
|
30
|
+
<span id="topic_mod">
|
31
|
+
<%= link_to(I18n.t('fms.edit'), edit_forum_forum_topic_path(@forum, @forum_topic), class: "utility") %>
|
32
|
+
<% if is_admin? %>
|
33
|
+
| <%= link_to(I18n.t('fms.delete'), forum_forum_topic_path(@forum, @forum_topic), class: "utility", method: :delete, data: {confirm: I18n.t('fms.views_topics.delete_sure')}) %>
|
34
|
+
<% end %>
|
35
|
+
</span>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
38
|
+
</h1>
|
39
|
+
|
40
|
+
<p class="subtitle">
|
41
|
+
<%= I18n.t 'fms.count_comments', count: @forum_topic.forum_comments.size - 1,
|
42
|
+
num: number_with_delimiter(@forum_topic.forum_comments.size - 1) %>,
|
43
|
+
<%= I18n.t 'fms.count_voices', count: @forum_topic.voices.size,
|
44
|
+
num: number_with_delimiter(@forum_topic.voices.size) %>
|
45
|
+
</p>
|
46
|
+
|
47
|
+
<%= render(partial: 'comments_list') unless @forum_comments.empty?%>
|
48
|
+
|
49
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% content_for :sidebar do %>
|
2
|
+
|
3
|
+
<div id="forum_sidebar_categories">
|
4
|
+
<ul>
|
5
|
+
<% ForumCategory.ordered.each do |forum_category| %>
|
6
|
+
<% if forum_category.any_readable_forums?(current_user) %>
|
7
|
+
<li>
|
8
|
+
<span class="category_name"><%= forum_category.name.to_s_default %></span>
|
9
|
+
<% unless forum_category.forums.empty? %>
|
10
|
+
<ul>
|
11
|
+
<% forum_category.forums.each do |forum| %>
|
12
|
+
<% if can?(:read, forum) %>
|
13
|
+
<li>
|
14
|
+
<%= link_to forum_show_path(forum) do %>
|
15
|
+
<%= truncate(forum.name, :length => 30) %>
|
16
|
+
<span class="num_of_comments"><%= number_with_delimiter(forum.comments_count) %></span>
|
17
|
+
<% end %>
|
18
|
+
</li>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
<% end %>
|
23
|
+
</li>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<header class="forum_header">
|
2
|
+
<h1><%= link_to forum.name, forum_show_path(forum) %></h1>
|
3
|
+
<p class="forum_info">
|
4
|
+
<%= I18n.t 'fms.count_topics', :count => forum.forum_topics.size,
|
5
|
+
:num => number_with_delimiter(forum.forum_topics.size) %>
|
6
|
+
/
|
7
|
+
<%= I18n.t 'fms.count_comments', :count => forum.comments_count,
|
8
|
+
:num => number_with_delimiter(forum.comments_count) %>
|
9
|
+
<% if can? :reply, forum %>
|
10
|
+
<span class="new_topic" style="display:none"> <%= link_to I18n.t('fms.new_topic'), new_forum_forum_topic_path(forum) %></span>
|
11
|
+
<% end %>
|
12
|
+
<span class="read_forum" style="display:none"><%= link_to "Read Forum", forum_show_path(forum) %></span>
|
13
|
+
</p>
|
14
|
+
</header>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="no_items"><%= I18n.t "fms.no_forums" %></div>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<% if forum_topics.total_entries %>
|
2
|
+
<%= will_paginate forum_topics %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% if user_signed_in? %>
|
6
|
+
<span class="follow_filter">
|
7
|
+
<% if @followed %>
|
8
|
+
<span class='filter'>
|
9
|
+
<i class="icon-th"></i>
|
10
|
+
<%= link_to((I18n.t 'fms.all'), forum_show_path(@forum), :id => 'filter_link') %>
|
11
|
+
</span>
|
12
|
+
<i class="icon-th-large"></i>
|
13
|
+
<%= I18n.t 'fms.followed' %>
|
14
|
+
<% else %>
|
15
|
+
<i class="icon-th"></i>
|
16
|
+
<%= I18n.t 'fms.all' %>
|
17
|
+
|
18
|
+
<span class='filter'>
|
19
|
+
<i class="icon-th-large"></i>
|
20
|
+
<%= link_to((I18n.t 'fms.followed'), forum_show_path(@forum)+"?followed=true", :id => 'filter_link') %>
|
21
|
+
</span>
|
22
|
+
<% end %>
|
23
|
+
</span>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% unless forum_topics.empty? %>
|
27
|
+
<ul class="topic_list">
|
28
|
+
<% for forum_topic in forum_topics %>
|
29
|
+
<% recent_comment_dom_id = (forum_topic.recent_comment ? dom_id(forum_topic.recent_comment) : '') %>
|
30
|
+
<li class="clearfix <%= 'sticky' if forum_topic.sticky %>">
|
31
|
+
<span class="topic">
|
32
|
+
<%= forum_topic_icon(forum_topic) %>
|
33
|
+
<%= topic_title_link forum_topic, :rel => "bookmark" %>
|
34
|
+
</span>
|
35
|
+
<span class="num_comments" title="Number of replies">
|
36
|
+
<%= link_to(forum_forum_topic_path(@forum, forum_topic, :page => forum_topic.last_page, :anchor => recent_comment_dom_id)) do %>
|
37
|
+
<%= number_with_delimiter(forum_topic.num_replies) %>
|
38
|
+
<span><%= I18n.t 'fms.replies' %></span>
|
39
|
+
<% end %>
|
40
|
+
</span>
|
41
|
+
<span class="num_views" title="Number of views">
|
42
|
+
<%= link_to(forum_forum_topic_path(@forum, forum_topic, :page => forum_topic.last_page, :anchor => recent_comment_dom_id)) do %>
|
43
|
+
<%= number_with_delimiter(forum_topic.hits) %>
|
44
|
+
<span><%= I18n.t 'fms.views' %></span>
|
45
|
+
<% end %>
|
46
|
+
</span>
|
47
|
+
<div class="topic_info">
|
48
|
+
<span class="started_by"><%= I18n.t 'fms.started' %>:
|
49
|
+
<span class="author"><%= forum_topic.user.display_name %></span>
|
50
|
+
</span>
|
51
|
+
<% if forum_topic.recent_comment %>
|
52
|
+
<span class="when">
|
53
|
+
<%= link_to(forum_forum_topic_path(@forum, forum_topic, :page => forum_topic.last_page, :anchor => recent_comment_dom_id)) do %>
|
54
|
+
<i class="icon-comment-alt"></i>
|
55
|
+
<%= I18n.t 'fms.last_post_on', :user => h(forum_topic.recent_comment.user.display_name), :date => format_date(forum_topic.recent_comment.created_at) %>
|
56
|
+
<% end %>
|
57
|
+
</span>
|
58
|
+
<% end %>
|
59
|
+
</div>
|
60
|
+
</span></li>
|
61
|
+
<% end %>
|
62
|
+
</ul>
|
63
|
+
<% else %>
|
64
|
+
<% if @followed %>
|
65
|
+
<div class="no_items"><%= I18n.t "fms.no_followed_topics" %></div>
|
66
|
+
<% else %>
|
67
|
+
<div class="no_items"><%= I18n.t "fms.no_topics" %></div>
|
68
|
+
<% end %>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
<%= will_paginate forum_topics %>
|
72
|
+
|
73
|
+
<script type='text/javascript'><!--//--><![CDATA[//><!--
|
74
|
+
if (history && history.replaceState) {
|
75
|
+
if ($('filter_link')) $('filter_link').writeAttribute('data-remote');
|
76
|
+
if ($$('.pagination')) {
|
77
|
+
$$('.pagination a').invoke('writeAttribute','data-remote');
|
78
|
+
$$('.pagination a').invoke('observe', 'click', function(){
|
79
|
+
<%= p = Hash.new
|
80
|
+
p.update('page' => params[:page].to_i) if params[:page]
|
81
|
+
p.update('followed' => 'true') if @followed
|
82
|
+
modify_history('pushState', @forum.name, "#{@forum.slug}.html", p) %>
|
83
|
+
});
|
84
|
+
}
|
85
|
+
};
|
86
|
+
//--><!]]></script>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% content_for :page_title, I18n.t('fms.forums') %>
|
2
|
+
<%= render :partial => 'category_side_list' %>
|
3
|
+
|
4
|
+
<% forum_displayed = false %>
|
5
|
+
<ul class="forum_category_list">
|
6
|
+
<% @forum_categories.each do |forum_category| %>
|
7
|
+
<% if forum_category.any_readable_forums?(current_user) %>
|
8
|
+
<% forum_displayed = true %>
|
9
|
+
<li>
|
10
|
+
<span class="name"><%= forum_category.name %></span>
|
11
|
+
<ul class="forum_list clearfix">
|
12
|
+
<% forum_category.forums.each do |forum| %>
|
13
|
+
<% if can?(:read, forum) %>
|
14
|
+
<li>
|
15
|
+
<%= render(:partial => 'forum_header', :object => forum, :as => :forum) %>
|
16
|
+
<% if forum.description.present? %>
|
17
|
+
<p class="forum_description"><%= forum.description %></p>
|
18
|
+
<% end %>
|
19
|
+
</li>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
22
|
+
</ul>
|
23
|
+
</li>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
</ul>
|
27
|
+
|
28
|
+
<% if forum_displayed == false %>
|
29
|
+
<div id="topics_list">
|
30
|
+
<%= render :partial => 'dm_forum/forums/no_forums' %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<ul class="forum_list">
|
2
|
+
<% @forums.each do |forum| %>
|
3
|
+
<li>
|
4
|
+
<%= render :partial => 'forum_header', :object => forum, :as => :forum %>
|
5
|
+
|
6
|
+
<p class="forum_description"><%= forum.description %></p>
|
7
|
+
</li>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
<div class="no_items"><%= I18n.t "fms.no_followed_topics" %></div>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<% content_for :page_title, @forum.forum_category.name %>
|
2
|
+
<% content_for :sidebar do %>
|
3
|
+
|
4
|
+
<% unless @forum.description.blank? %>
|
5
|
+
<div class="sidebar_forum_description">
|
6
|
+
<%= @forum.description %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if false %>
|
11
|
+
<h5 style="margin-bottom:1.0em;"><%= I18n.t 'fms.moderator', :count => @forum.moderators.size %></h5>
|
12
|
+
|
13
|
+
<% unless @forum.moderators.empty? %>
|
14
|
+
<ul class="flat" style="margin-top:1em;">
|
15
|
+
<% @forum.moderators.each do |user| %>
|
16
|
+
<li><%= link_to user.display_name || user.login, user %></li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
<% else %>
|
20
|
+
<p><%= I18n.t 'fms.views_forums.unmoderated_html'.html_safe %></p>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<%= render :partial => 'category_side_list' %>
|
27
|
+
|
28
|
+
|
29
|
+
<% content_for :crumbs, forum_crumbs %>
|
30
|
+
|
31
|
+
<div id="topics_list">
|
32
|
+
<%= render(:partial => 'forum_header', :object => @forum, :as => :forum) %>
|
33
|
+
<%= if @followed
|
34
|
+
render(:partial => 'topics_list', :object => @followed_topics, :as => :forum_topics)
|
35
|
+
else
|
36
|
+
render(:partial => 'topics_list', :object => @forum_topics, :as => :forum_topics)
|
37
|
+
end
|
38
|
+
%>
|
39
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<h1><%= link_to @topic.title, @topic_link %>
|
2
|
+
<br><small><%= link_to @topic.forum.name, @forum_link %></small>
|
3
|
+
</h1>
|
4
|
+
|
5
|
+
<% @comment_list.each do |comment| %>
|
6
|
+
<div class="comment" style="padding-bottom: 20px;margin-bottom:20px;border-bottom:1px solid #ddd;">
|
7
|
+
<div class="comment_author_date" style="color:#999;font-size:80%">
|
8
|
+
<em><%= comment.created_at.to_formatted_s(:long) %>: <%= comment.user.display_name %></em>
|
9
|
+
</div>
|
10
|
+
<%= markdown(comment.body, safe: true) %>
|
11
|
+
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<p style="magin-bottom: 40px;"><%= link_to I18n.t('cms.read_more'), @topic_link %></p>
|
15
|
+
<p style="border-top: 1px solid #eee;font-size: 11px;"><%= I18n.t('cms.comment_notify.disclaimer') %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= @topic.title %>
|
2
|
+
<%= I18n.t('fms.in_forum', @topic.forum.name) %>
|
3
|
+
|
4
|
+
---
|
5
|
+
<% @comment_list.each do |comment| %>
|
6
|
+
<%= comment.created_at.to_formatted_s(:long) %>: <%= comment.user.display_name %>
|
7
|
+
|
8
|
+
<%= markdown(comment.body, safe: true) %>
|
9
|
+
|
10
|
+
---
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= I18n.t('cms.read_more') %>
|
14
|
+
<%= @topic_link %>
|
15
|
+
|
16
|
+
<%= I18n.t('cms.comment_notify.disclaimer') %>
|
File without changes
|
@@ -0,0 +1,104 @@
|
|
1
|
+
cs:
|
2
|
+
fms:
|
3
|
+
count_forums:
|
4
|
+
zero: "žádná fóra"
|
5
|
+
one: "1 fórum"
|
6
|
+
other: "%{num} fór"
|
7
|
+
count_users:
|
8
|
+
zero: "žádní uživatelé"
|
9
|
+
one: "1 uživatel"
|
10
|
+
other: "%{num} uživatelů"
|
11
|
+
count_users_active:
|
12
|
+
zero: "žádní aktivní uživatelé"
|
13
|
+
one: "1 aktivní uživatel"
|
14
|
+
other: "%{num} aktivních uživatelů"
|
15
|
+
count_users_lurking:
|
16
|
+
zero: "žádní skrytí uživatelé"
|
17
|
+
one: "1 skrytý uživatel"
|
18
|
+
other: "%{num} skrytých uživatelů"
|
19
|
+
count_voices:
|
20
|
+
zero: "žádný hlas"
|
21
|
+
one: "1 hlas"
|
22
|
+
other: "%{num} hlasů"
|
23
|
+
count_topics:
|
24
|
+
zero: "žádné téma"
|
25
|
+
one: "1 téma"
|
26
|
+
other: "%{num} témat"
|
27
|
+
count_comments:
|
28
|
+
zero: "žádný komentář"
|
29
|
+
one: "1 komentář"
|
30
|
+
other: "%{num} komentářů"
|
31
|
+
count_comments_found:
|
32
|
+
zero: "žádný komentář nenalezen"
|
33
|
+
one: "nalezen 1 komentář"
|
34
|
+
other: "%{count} komentářů nalezeno"
|
35
|
+
comment_age: "komentováno před %{when}"
|
36
|
+
user_is_administrator: Administrátor
|
37
|
+
user_is_moderator: Moderátor
|
38
|
+
suspended_user_comment: Tento komentář byl odstraněn
|
39
|
+
post_edited: 'upraveno před %{when}'
|
40
|
+
forums: Fóra
|
41
|
+
page_nr: 'strana %{nr}'
|
42
|
+
views_forums:
|
43
|
+
recent_activity: Nedávná aktivita
|
44
|
+
no_recent_activity: Žádná nedávná aktivita
|
45
|
+
comma_locked_topic: "Toto téma je uzamčeno."
|
46
|
+
unmoderated_html: 'Toto fórum momentálně není moderováno.<br />Prosím, buďte vždy zdvořilí.'
|
47
|
+
recent_posts: Nedávné příspěvky
|
48
|
+
searching_for: Hledat
|
49
|
+
by_user: 'od %{user}'
|
50
|
+
in_forum: 've %{forum}'
|
51
|
+
views_posts:
|
52
|
+
formatting_help: Pomoc s formátováním
|
53
|
+
formatting_desc: užívá se pro formátování textu.
|
54
|
+
formatting_bold: '**bold**'
|
55
|
+
formatting_italics: '*italics*, _italics_'
|
56
|
+
formatting_blockquote: '> <span>(quotes)</span>'
|
57
|
+
formatting_icode: '`code`'
|
58
|
+
formatting_horizontal_rule: '*** <span>(horizontal rule)</span>'
|
59
|
+
formatting_list: '* <span>or</span> 1. <span>(lists)</span>'
|
60
|
+
save: 'Uložit příspěvek'
|
61
|
+
topic: Téma
|
62
|
+
locked: Uzamčeno
|
63
|
+
or: nebo
|
64
|
+
cancel: Zrušit
|
65
|
+
reply: Odpovědět
|
66
|
+
admin:
|
67
|
+
edit_post: Upravit příspěvek
|
68
|
+
suspended_user_post: Tento příspěvek byl odstraněn
|
69
|
+
reply_to_topic: Odpovědet na téma
|
70
|
+
views_topics:
|
71
|
+
topic: Název
|
72
|
+
body: Text příspěvku
|
73
|
+
delete_sure: 'Navždy odstranit toto téma?'
|
74
|
+
locked_topic: 'Toto téma je uzamčeno.'
|
75
|
+
save_reply: Uložit odpověď
|
76
|
+
cancel: Zrušit
|
77
|
+
lock_topic: Uzamčeno
|
78
|
+
sticky: Permanentní
|
79
|
+
edit_topic: Upravit téma
|
80
|
+
post_topic: Zveřejnit téma
|
81
|
+
new_topic: Nové téma
|
82
|
+
voices: Hlasy
|
83
|
+
edit: upravit
|
84
|
+
delete: smazat
|
85
|
+
all: všechna témata
|
86
|
+
followed: jen sledovaná témata
|
87
|
+
started: Započato
|
88
|
+
comment_age: "před %{when}"
|
89
|
+
by_user_html: "od %{user}"
|
90
|
+
moderator: Moderátor
|
91
|
+
replies: odpovědi
|
92
|
+
views: zobrazení
|
93
|
+
last_post_on: "Poslední příspěvek od %{user} :: %{date}"
|
94
|
+
comments_header: Komentáře
|
95
|
+
no_topics: 'Buďte první, kdo vytvoří téma'
|
96
|
+
no_followed_topics: V dané chvíli nejsou monitorována žádná témata
|
97
|
+
no_forums: Sekce Fóra bude brzy k dispozici
|
98
|
+
comment_notification_inform: Budete automaticky dostávat oznámení jakýchkoli budoucích komentářů
|
99
|
+
follow: Sledovat
|
100
|
+
follow_stop: Přestaňte Po
|
101
|
+
topic_follow_section:
|
102
|
+
title: Sledovat téma e-mailem
|
103
|
+
description: Sledovat toto téma a dostávat e-mailem upozornění o nových komentářích
|
104
|
+
|
@@ -0,0 +1,104 @@
|
|
1
|
+
de:
|
2
|
+
fms:
|
3
|
+
count_forums:
|
4
|
+
zero: "kein Forum"
|
5
|
+
one: "1 Forum"
|
6
|
+
other: "%{num} Foren"
|
7
|
+
count_users:
|
8
|
+
zero: "kein Benutzer"
|
9
|
+
one: "1 Benutzer"
|
10
|
+
other: "%{num} Benutzer"
|
11
|
+
count_users_active:
|
12
|
+
zero: "kein aktiver Benutzer"
|
13
|
+
one: "1 aktiver Benutzer"
|
14
|
+
other: "%{num} aktive Benutzer"
|
15
|
+
count_users_lurking:
|
16
|
+
zero: "kein nur-lesender Benutzer"
|
17
|
+
one: "1 nur-lesender Benutzer"
|
18
|
+
other: "%{num} nur-lesende Benutzer"
|
19
|
+
count_voices:
|
20
|
+
zero: "kein Teilnehmer"
|
21
|
+
one: "1 Teilnehmer"
|
22
|
+
other: "%{num} Teilnehmer"
|
23
|
+
count_topics:
|
24
|
+
zero: "kein Thema"
|
25
|
+
one: "1 Thema"
|
26
|
+
other: "%{num} Themen"
|
27
|
+
count_comments:
|
28
|
+
zero: "kein Kommentar"
|
29
|
+
one: "1 Kommentar"
|
30
|
+
other: "%{num} Kommentare"
|
31
|
+
count_comments_found:
|
32
|
+
zero: "kein Kommentar gefunden"
|
33
|
+
one: "1 Kommentar gefunden"
|
34
|
+
other: "%{count} Kommentare gefunden"
|
35
|
+
comment_age: "vor %{when}"
|
36
|
+
user_is_administrator: Administrator
|
37
|
+
user_is_moderator: Moderator
|
38
|
+
suspended_user_comment: Dieser Kommentar wurde entfernt
|
39
|
+
post_edited: 'edited %{when} ago'
|
40
|
+
forums: Forums
|
41
|
+
page_nr: 'page %{nr}'
|
42
|
+
views_forums:
|
43
|
+
recent_activity: Neueste Aktivität
|
44
|
+
no_recent_activity: Keine neuen Aktivitäten
|
45
|
+
comma_locked_topic: "Dieses Thema ist gesperrt."
|
46
|
+
unmoderated_html: 'Dieses Forum ist derzeit nicht moderiert.<br />Bitte immer höflich sein.'
|
47
|
+
recent_posts: Aktuelle Beiträge
|
48
|
+
searching_for: Auf der Suche nach
|
49
|
+
by_user: 'von %{user}'
|
50
|
+
in_forum: 'in %{forum}'
|
51
|
+
views_posts:
|
52
|
+
formatting_help: Formatieren Hilfe
|
53
|
+
formatting_desc: wird zum Formatieren von Text verwendet.
|
54
|
+
formatting_bold: '**bold**'
|
55
|
+
formatting_italics: '*italics*, _italics_'
|
56
|
+
formatting_blockquote: '> <span>(quotes)</span>'
|
57
|
+
formatting_icode: '`code`'
|
58
|
+
formatting_horizontal_rule: '*** <span>(horizontal rule)</span>'
|
59
|
+
formatting_list: '* <span>or</span> 1. <span>(lists)</span>'
|
60
|
+
save: 'Save post'
|
61
|
+
topic: Topic
|
62
|
+
locked: Verschlossen
|
63
|
+
or: oder
|
64
|
+
cancel: stornieren
|
65
|
+
reply: Antworten
|
66
|
+
admin:
|
67
|
+
edit_post: Beitrag editieren
|
68
|
+
suspended_user_post: Dieser Beitrag wurde bereits entfernt
|
69
|
+
reply_to_topic: Dein Kommentar
|
70
|
+
views_topics:
|
71
|
+
topic: Titel
|
72
|
+
body: Inhalt
|
73
|
+
delete_sure: 'Lösche dieses Thema immer?'
|
74
|
+
locked_topic: 'Dieses Thema ist gesperrt.'
|
75
|
+
save_reply: Antworten
|
76
|
+
cancel: Abbrechen
|
77
|
+
lock_topic: Thema schließen
|
78
|
+
sticky: Sticky
|
79
|
+
edit_topic: Thema bearbeiten
|
80
|
+
post_topic: Thema veröffentlichen
|
81
|
+
new_topic: Neues Thema
|
82
|
+
voices: Voices
|
83
|
+
edit: bearbeiten
|
84
|
+
delete: löschen
|
85
|
+
all: Alle Themen
|
86
|
+
followed: Bereits besuchte Themen
|
87
|
+
started: Begonnen von
|
88
|
+
comment_age: "%{when} vor"
|
89
|
+
by_user_html: "von %{user}"
|
90
|
+
moderator: Moderator
|
91
|
+
replies: Beiträge
|
92
|
+
views: Aufrufe
|
93
|
+
last_post_on: "Letzter Eintrag von %{user} :: %{date}"
|
94
|
+
comments_header: Kommentare
|
95
|
+
no_topics: 'Sei der Erste, der ein Thema erstellt'
|
96
|
+
no_followed_topics: 'Es liegen noch keine Themen zu überwachenden'
|
97
|
+
no_forums: Das Forum Abschnitt wird in Kürze verfügbar
|
98
|
+
comment_notification_inform: "Du wirst automatisch benachrichtigt, wenn ein neuer Kommentar gepostet wurde."
|
99
|
+
follow: Abonnieren
|
100
|
+
follow_stop: Nicht mehr folgen
|
101
|
+
topic_follow_section:
|
102
|
+
title: Folge diesem Thema
|
103
|
+
description: Folge diesem Thema und erhalte neue Kommentare per Email Benachrichtigung
|
104
|
+
|