my_forum 0.0.1.beta60 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -12
- data/Rakefile +3 -4
- data/app/assets/javascripts/my_forum/application.js +0 -6
- data/{spec/dummy/app/assets/stylesheets → app/assets/stylesheets/my_forum}/application.css +1 -1
- data/app/controllers/my_forum/application_controller.rb +0 -81
- data/app/helpers/my_forum/application_helper.rb +0 -43
- data/app/views/layouts/my_forum/application.html.erb +14 -0
- data/config/routes.rb +0 -48
- data/lib/my_forum/engine.rb +0 -31
- data/lib/my_forum/version.rb +1 -1
- data/lib/tasks/my_forum_tasks.rake +4 -155
- data/{spec → test}/dummy/README.rdoc +0 -0
- data/{spec → test}/dummy/Rakefile +0 -0
- data/{spec → test}/dummy/app/assets/javascripts/application.js +1 -1
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/{spec → test}/dummy/app/controllers/application_controller.rb +0 -0
- data/{spec → test}/dummy/app/helpers/application_helper.rb +0 -0
- data/{spec → test}/dummy/app/views/layouts/application.html.erb +0 -0
- data/{spec → test}/dummy/bin/bundle +0 -0
- data/{spec → test}/dummy/bin/rails +0 -0
- data/{spec → test}/dummy/bin/rake +0 -0
- data/{spec → test}/dummy/config/application.rb +0 -0
- data/{spec → test}/dummy/config/boot.rb +0 -0
- data/{spec → test}/dummy/config/database.yml +0 -0
- data/{spec → test}/dummy/config/environment.rb +0 -0
- data/{spec → test}/dummy/config/environments/development.rb +0 -0
- data/{spec → test}/dummy/config/environments/production.rb +1 -1
- data/{spec → test}/dummy/config/environments/test.rb +1 -1
- data/{spec → test}/dummy/config/initializers/assets.rb +0 -0
- data/{spec → test}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/{spec → test}/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/{spec → test}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/{spec → test}/dummy/config/initializers/inflections.rb +0 -0
- data/{spec → test}/dummy/config/initializers/mime_types.rb +0 -0
- data/{spec → test}/dummy/config/initializers/session_store.rb +0 -0
- data/{spec → test}/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/{spec → test}/dummy/config/locales/en.yml +0 -0
- data/{spec → test}/dummy/config/routes.rb +0 -0
- data/{spec → test}/dummy/config/secrets.yml +0 -0
- data/{spec → test}/dummy/config.ru +0 -0
- data/{spec → test}/dummy/public/404.html +0 -0
- data/{spec → test}/dummy/public/422.html +0 -0
- data/{spec → test}/dummy/public/500.html +0 -0
- data/{spec → test}/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/my_forum_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +84 -355
- data/app/assets/javascripts/my_forum/admin/categories.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/admin/dashboard.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/admin/forums.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/admin/roles.js +0 -2
- data/app/assets/javascripts/my_forum/admin/users.js +0 -2
- data/app/assets/javascripts/my_forum/forums.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/jquery.scrollTo.min.js +0 -7
- data/app/assets/javascripts/my_forum/jquery.selection.js +0 -354
- data/app/assets/javascripts/my_forum/my_forum.js.coffee +0 -118
- data/app/assets/javascripts/my_forum/posts.js.coffee +0 -20
- data/app/assets/javascripts/my_forum/topics.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/users.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/welcome.js.coffee +0 -0
- data/app/assets/stylesheets/my_forum/admin/categories.css.scss +0 -0
- data/app/assets/stylesheets/my_forum/admin/dashboard.css.scss +0 -3
- data/app/assets/stylesheets/my_forum/admin/forums.css.scss +0 -7
- data/app/assets/stylesheets/my_forum/admin/roles.css +0 -4
- data/app/assets/stylesheets/my_forum/admin/users.css +0 -4
- data/app/assets/stylesheets/my_forum/application.css.scss +0 -80
- data/app/assets/stylesheets/my_forum/forums.css.scss +0 -31
- data/app/assets/stylesheets/my_forum/posts.css.scss +0 -138
- data/app/assets/stylesheets/my_forum/private_messages.css.scss +0 -11
- data/app/assets/stylesheets/my_forum/topics.css.scss +0 -16
- data/app/assets/stylesheets/my_forum/users.css.scss +0 -3
- data/app/assets/stylesheets/my_forum/welcome.css.scss +0 -73
- data/app/controllers/my_forum/admin/categories_controller.rb +0 -36
- data/app/controllers/my_forum/admin/dashboard_controller.rb +0 -13
- data/app/controllers/my_forum/admin/emoticons_controller.rb +0 -65
- data/app/controllers/my_forum/admin/forums_controller.rb +0 -35
- data/app/controllers/my_forum/admin/mail_controller.rb +0 -31
- data/app/controllers/my_forum/admin/roles_controller.rb +0 -38
- data/app/controllers/my_forum/admin/users_controller.rb +0 -14
- data/app/controllers/my_forum/attachments_controller.rb +0 -30
- data/app/controllers/my_forum/forums_controller.rb +0 -39
- data/app/controllers/my_forum/images_controller.rb +0 -7
- data/app/controllers/my_forum/posts_controller.rb +0 -81
- data/app/controllers/my_forum/private_messages_controller.rb +0 -73
- data/app/controllers/my_forum/topics_controller.rb +0 -96
- data/app/controllers/my_forum/users_controller.rb +0 -145
- data/app/controllers/my_forum/welcome_controller.rb +0 -30
- data/app/helpers/my_forum/admin/dashboard_helper.rb +0 -4
- data/app/helpers/my_forum/admin/forums_helper.rb +0 -4
- data/app/helpers/my_forum/admin/roles_helper.rb +0 -4
- data/app/helpers/my_forum/admin/users_helper.rb +0 -4
- data/app/helpers/my_forum/emoticons_helper.rb +0 -7
- data/app/helpers/my_forum/forums_helper.rb +0 -44
- data/app/helpers/my_forum/posts_helper.rb +0 -72
- data/app/helpers/my_forum/private_messages_helper.rb +0 -25
- data/app/helpers/my_forum/topics_helper.rb +0 -18
- data/app/helpers/my_forum/users_helper.rb +0 -33
- data/app/helpers/my_forum/welcome_helper.rb +0 -4
- data/app/mailers/application_mailer.rb +0 -4
- data/app/mailers/my_forum/user_mailer.rb +0 -24
- data/app/models/my_forum/attachment.rb +0 -12
- data/app/models/my_forum/avatar.rb +0 -11
- data/app/models/my_forum/category.rb +0 -7
- data/app/models/my_forum/category_permission.rb +0 -6
- data/app/models/my_forum/emoticon.rb +0 -6
- data/app/models/my_forum/forum.rb +0 -50
- data/app/models/my_forum/image.rb +0 -5
- data/app/models/my_forum/log_read_mark.rb +0 -4
- data/app/models/my_forum/post.rb +0 -26
- data/app/models/my_forum/private_message.rb +0 -8
- data/app/models/my_forum/role.rb +0 -6
- data/app/models/my_forum/topic.rb +0 -41
- data/app/models/my_forum/user.rb +0 -71
- data/app/models/my_forum/user_group.rb +0 -13
- data/app/models/my_forum/user_group_link.rb +0 -6
- data/app/models/my_forum/user_roles.rb +0 -6
- data/app/views/layouts/mailer.html.erb +0 -5
- data/app/views/layouts/mailer.text.erb +0 -1
- data/app/views/layouts/my_forum/_guest_navbar.html.haml +0 -4
- data/app/views/layouts/my_forum/_user_navbar.html.haml +0 -19
- data/app/views/layouts/my_forum/admin_application.haml +0 -29
- data/app/views/layouts/my_forum/application.haml +0 -23
- data/app/views/my_forum/admin/categories/edit.haml +0 -9
- data/app/views/my_forum/admin/categories/new.haml +0 -5
- data/app/views/my_forum/admin/dashboard/index.haml +0 -0
- data/app/views/my_forum/admin/emoticons/edit.haml +0 -4
- data/app/views/my_forum/admin/emoticons/index.haml +0 -15
- data/app/views/my_forum/admin/emoticons/new.haml +0 -5
- data/app/views/my_forum/admin/forums/index.haml +0 -47
- data/app/views/my_forum/admin/forums/new.haml +0 -6
- data/app/views/my_forum/admin/mail/index.haml +0 -9
- data/app/views/my_forum/admin/roles/index.haml +0 -12
- data/app/views/my_forum/admin/roles/new.haml +0 -22
- data/app/views/my_forum/admin/users/index.haml +0 -10
- data/app/views/my_forum/forums/_topic_subject.html.haml +0 -16
- data/app/views/my_forum/forums/show.haml +0 -29
- data/app/views/my_forum/posts/edit.html.haml +0 -31
- data/app/views/my_forum/private_messages/_sidebar.haml +0 -10
- data/app/views/my_forum/private_messages/inbox.haml +0 -26
- data/app/views/my_forum/private_messages/new.haml +0 -21
- data/app/views/my_forum/private_messages/show.haml +0 -10
- data/app/views/my_forum/shared/_post_preview.haml +0 -15
- data/app/views/my_forum/shared/_upload_photo.haml +0 -45
- data/app/views/my_forum/shared/post_preview.js.coffee +0 -4
- data/app/views/my_forum/topics/_post.haml +0 -29
- data/app/views/my_forum/topics/_profile_popover.haml +0 -47
- data/app/views/my_forum/topics/_quick_answer.haml +0 -34
- data/app/views/my_forum/topics/_topic_header.haml +0 -4
- data/app/views/my_forum/topics/_user_info.haml +0 -9
- data/app/views/my_forum/topics/new.haml +0 -38
- data/app/views/my_forum/topics/show.haml +0 -60
- data/app/views/my_forum/user_mailer/custom_email.text.erb +0 -1
- data/app/views/my_forum/user_mailer/pm_notification.text.erb +0 -6
- data/app/views/my_forum/user_mailer/reset_password_email.haml +0 -1
- data/app/views/my_forum/user_mailer/reset_password_email.text.erb +0 -1
- data/app/views/my_forum/users/edit.haml +0 -36
- data/app/views/my_forum/users/forgot_password.haml +0 -10
- data/app/views/my_forum/users/new.haml +0 -14
- data/app/views/my_forum/users/signin.haml +0 -14
- data/app/views/my_forum/users/signout.haml +0 -0
- data/app/views/my_forum/welcome/index.haml +0 -37
- data/config/initializers/will_paginate.rb +0 -24
- data/config/locales/en.yml +0 -68
- data/config/locales/ru.yml +0 -196
- data/db/migrate/20141117122725_create_my_forum_forums.rb +0 -12
- data/db/migrate/20141117122742_create_my_forum_topics.rb +0 -17
- data/db/migrate/20141117122751_create_my_forum_posts.rb +0 -11
- data/db/migrate/20141118081021_create_my_forum_categories.rb +0 -8
- data/db/migrate/20141118131215_create_my_forum_users.rb +0 -34
- data/db/migrate/20141222094522_create_my_forum_roles.rb +0 -10
- data/db/migrate/20141222094538_create_my_forum_user_roles.rb +0 -9
- data/db/migrate/20150202115250_create_my_forum_log_read_marks.rb +0 -10
- data/db/migrate/20150215200453_create_my_forum_user_groups.rb +0 -15
- data/db/migrate/20150215204852_create_my_forum_user_group_links.rb +0 -9
- data/db/migrate/20150215212443_create_my_forum_category_permissions.rb +0 -9
- data/db/migrate/20150227210814_create_my_forum_private_messages.rb +0 -16
- data/db/migrate/20151012095554_create_my_forum_images.rb +0 -12
- data/db/migrate/20151218135729_add_is_deleted.rb +0 -6
- data/db/migrate/20151220121140_create_my_forum_emoticons.rb +0 -10
- data/db/migrate/20151221203243_my_forum_rename_user_avatar.rb +0 -5
- data/db/migrate/20151221205045_my_forum_change_user_avatar.rb +0 -5
- data/db/migrate/20160122202142_add_latest_post_info_for_topic.rb +0 -24
- data/db/migrate/20160210130805_add_indexes_for_topics.rb +0 -7
- data/db/migrate/20160214085201_add_edited_by_for_post.rb +0 -5
- data/spec/controllers/my_forum/admin/emoticons_controller_spec.rb +0 -7
- data/spec/controllers/my_forum/admin/mail_controller_spec.rb +0 -7
- data/spec/controllers/my_forum/private_messages_controller_spec.rb +0 -7
- data/spec/controllers/my_forum/users_controller_spec.rb +0 -76
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +0 -159
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -12
- data/spec/helpers/my_forum/posts_helper_spec.rb +0 -24
- data/spec/helpers/my_forum/private_messages_helper_spec.rb +0 -17
- data/spec/models/my_forum/emoticon_spec.rb +0 -7
- data/spec/models/my_forum/private_message_spec.rb +0 -7
- data/spec/models/my_forum/user_spec.rb +0 -13
- data/spec/rails_helper.rb +0 -52
- data/spec/spec_helper.rb +0 -87
@@ -1,15 +0,0 @@
|
|
1
|
-
#modal_post_preview.modal.fade
|
2
|
-
.modal-dialog
|
3
|
-
.modal-content
|
4
|
-
.modal-header
|
5
|
-
%button.close{ type: 'button', aria_label: 'Close', data: { dismiss: 'modal' } }
|
6
|
-
%span{ aria_hidden: "true" }
|
7
|
-
×
|
8
|
-
%h4.modal-title
|
9
|
-
= t('.preview')
|
10
|
-
.modal-body
|
11
|
-
|
12
|
-
|
13
|
-
.modal-footer
|
14
|
-
%button.btn.btn-default{ type: 'button', aria_label: 'Close', data: { dismiss: 'modal' } }
|
15
|
-
Close
|
@@ -1,45 +0,0 @@
|
|
1
|
-
#add_photo.modal.fade
|
2
|
-
.modal-dialog
|
3
|
-
.modal-content
|
4
|
-
.modal-header
|
5
|
-
%button.close{ type: 'button', aria_label: 'Close', data: { dismiss: 'modal' } }
|
6
|
-
%span{ aria_hidden: "true" }
|
7
|
-
×
|
8
|
-
%h4.modal-title
|
9
|
-
= t('.add_new_photo')
|
10
|
-
.modal-body
|
11
|
-
%p= t('my_forum.attachments.allowed_extensions', ext: upload_allowed_extensions.join(', '))
|
12
|
-
= form_for MyForum::Attachment.new, url: attachments_path, multipart: true, remote: true do |f|
|
13
|
-
= f.file_field 'file[]', multiple: true, id: 'attachment_files'
|
14
|
-
|
15
|
-
#loaded-content
|
16
|
-
|
17
|
-
.modal-footer
|
18
|
-
%button.btn.btn-default{ type: 'button', aria_label: 'Close', data: { dismiss: 'modal' } }
|
19
|
-
Close
|
20
|
-
|
21
|
-
:coffee
|
22
|
-
$('#attachment_files').change ->
|
23
|
-
form_data = new FormData()
|
24
|
-
|
25
|
-
files_count = $('#attachment_files').prop('files').length
|
26
|
-
form_data.append('files[]', $('#attachment_files').prop('files')[c]) for c in [0...files_count]
|
27
|
-
|
28
|
-
$.ajax({
|
29
|
-
url: "#{attachments_path}"
|
30
|
-
dataType: 'html'
|
31
|
-
cache: false
|
32
|
-
contentType: false
|
33
|
-
processData: false
|
34
|
-
data: form_data
|
35
|
-
type: 'post',
|
36
|
-
success: (data, textStatus, jqXHR) ->
|
37
|
-
response = $.parseJSON(data)
|
38
|
-
bbcode_attachments = ''
|
39
|
-
bbcode_attachments += ('[attachment=' + id + '] \n') for id in response.attachments
|
40
|
-
text = $('##{textarea}').val()
|
41
|
-
$('##{textarea}').val(text + '\n' + bbcode_attachments + '\n')
|
42
|
-
$('#loaded-content').html('#{t('my_forum.successfull_aploaded')}')
|
43
|
-
$('#add_photo').modal('hide')
|
44
|
-
$('#attachment_files').val('')
|
45
|
-
})
|
@@ -1,29 +0,0 @@
|
|
1
|
-
- post_counter += 1
|
2
|
-
|
3
|
-
.row.post-header{ id: "post_number_#{post_counter}"}
|
4
|
-
.col-md-9
|
5
|
-
%span.post_from_user_login
|
6
|
-
- user_login = post.user.try(:login)
|
7
|
-
%span.user_profile_popover{ title: user_login, data: { toggle: 'popover', content: (render partial: 'profile_popover', locals: { user: post.user })}}
|
8
|
-
= online_user_marker(user_login)
|
9
|
-
%span.login= user_login
|
10
|
-
.col-md-3.post_number.text-right
|
11
|
-
- # TODO optimize condition!
|
12
|
-
- if current_user and current_user.is_admin?
|
13
|
-
=link_to t('.edit'), edit_forum_topic_post_path(@forum, post.topic, post, page: params[:page]), class: 'btn btn-xs btn-info', data: { confirm: "Are you sure?" }
|
14
|
-
- if post.topic.posts.first != post
|
15
|
-
=link_to t('.delete'), forum_topic_post_path(@forum, post.topic, post), class: 'btn btn-xs btn-danger', method: :delete, data: { confirm: "Are you sure?" }
|
16
|
-
%button.btn.btn-xs.btn-warning.quote-post{ data: { post_id: post.id } }
|
17
|
-
=t('.quote')
|
18
|
-
=link_to t('.number', post_number: post_counter), forum_topic_path(@forum, post.topic, show_post: post_counter)
|
19
|
-
.row
|
20
|
-
.col-md-2
|
21
|
-
= render 'user_info', post: post
|
22
|
-
.col-md-10
|
23
|
-
.created_at= t('.sent', datetime: time(post.created_at))
|
24
|
-
#post_container{ id: post.id }
|
25
|
-
= sanitize format_post_text(post)
|
26
|
-
|
27
|
-
-if post.edited_by
|
28
|
-
.row
|
29
|
-
.edited_by.text-right= t('.edited_by', login: post.edited_by, date: time(post.updated_at))
|
@@ -1,47 +0,0 @@
|
|
1
|
-
.profile-popover
|
2
|
-
.row.col-md-12
|
3
|
-
- unless current_user
|
4
|
-
%p.text-center=t('my_forum.profile_popover.only_for_registereg_users')
|
5
|
-
- else
|
6
|
-
.row.col-md-6
|
7
|
-
.row
|
8
|
-
.col-sm-6
|
9
|
-
%strong= t('my_forum.profile_popover.posts_count')
|
10
|
-
.col-sm-6
|
11
|
-
= user.posts_count
|
12
|
-
.row
|
13
|
-
.col-sm-6
|
14
|
-
%strong= t('my_forum.profile_popover.registered_at')
|
15
|
-
.col-sm-6
|
16
|
-
= time(user.created_at)
|
17
|
-
.row
|
18
|
-
.col-sm-6
|
19
|
-
%strong= t('my_forum.profile_popover.status')
|
20
|
-
.col-sm-6
|
21
|
-
- is_online = is_online_user?(user.login)
|
22
|
-
= is_online ? t('my_forum.profile_popover.online') : t('my_forum.profile_popover.offline')
|
23
|
-
- unless is_online
|
24
|
-
.row
|
25
|
-
.col-sm-6
|
26
|
-
%strong= t('my_forum.profile_popover.last_online')
|
27
|
-
.col-sm-6
|
28
|
-
= time(user.updated_at)
|
29
|
-
.row.pm
|
30
|
-
.col-sm-12= link_to t('my_forum.profile_popover.write_pm'), new_private_message_path(to: user.login), class: 'btn btn-xs btn-warning'
|
31
|
-
|
32
|
-
.row.col-md-6.second_row
|
33
|
-
.row
|
34
|
-
.col-sm-5
|
35
|
-
%strong= t('my_forum.profile_popover.user_name')
|
36
|
-
.col-sm-7
|
37
|
-
= user.real_name || '-'
|
38
|
-
.row
|
39
|
-
.col-sm-5
|
40
|
-
%strong= t('my_forum.profile_popover.phone')
|
41
|
-
.col-sm-7
|
42
|
-
= user.phone || '-'
|
43
|
-
.row
|
44
|
-
.col-sm-5
|
45
|
-
%strong= t('my_forum.profile_popover.car_info')
|
46
|
-
.col-sm-7
|
47
|
-
= user.car_info || '-'
|
@@ -1,34 +0,0 @@
|
|
1
|
-
.row
|
2
|
-
.col-md-10.col-md-offset-1
|
3
|
-
.text-editor-buttons{ data: { apply_to: 'quick_answer_textarea' } }
|
4
|
-
%div.btn-group
|
5
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
6
|
-
%i{ class: 'fa fa-bold' }
|
7
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
8
|
-
%i{ class: 'fa fa-italic' }
|
9
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
10
|
-
%i{ class: 'fa fa-strikethrough' }
|
11
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
12
|
-
%i{ class: 'fa fa-underline' }
|
13
|
-
|
14
|
-
%div.btn-group
|
15
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
16
|
-
%i{ class: 'fa fa-camera-retro' }
|
17
|
-
|
18
|
-
%div.btn-group.smiles
|
19
|
-
- emoticons_list.each do |code, path|
|
20
|
-
=link_to '#', class: 'btn btn-default btn-sm smile-past' do
|
21
|
-
%img{ src: path, class: 'smile', data: { code: code } }
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
= form_for @new_post, url: forum_topic_posts_path(forum, topic), role: 'form' do |form|
|
27
|
-
.form-group= form.text_area :text, class: 'form-control quick-answer', id: 'quick_answer_textarea'
|
28
|
-
|
29
|
-
.pull-right
|
30
|
-
%button#post_preview{ class: 'btn btn-primary', data: { elm_preview: 'quick_answer_textarea' }}= t('.quick_answer_preview')
|
31
|
-
= form.submit t('.quick_answer'), class: 'btn btn-primary'
|
32
|
-
|
33
|
-
= render partial: 'my_forum/shared/upload_photo', locals: { textarea: 'quick_answer_textarea' }
|
34
|
-
= render partial: 'my_forum/shared/post_preview'
|
@@ -1,9 +0,0 @@
|
|
1
|
-
- user = post.user
|
2
|
-
.row
|
3
|
-
.col-md-12.user-title= user_title(user)
|
4
|
-
.row
|
5
|
-
.col-md-12.user-avatar= user_avatar(user)
|
6
|
-
.row
|
7
|
-
.col-md-12.user-posts-count= t('.user_posts_count', count: user_posts_count(user))
|
8
|
-
.row
|
9
|
-
.col-md-12.user-reg-date= time(user.created_at)
|
@@ -1,38 +0,0 @@
|
|
1
|
-
%h2= t('.create_new_topic_in', topic_name: @forum.name)
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
= form_for @topic, url: forum_topics_path, role: 'form' do |form|
|
6
|
-
.form-group= form.text_field :name, class: 'name form-control', placeholder: t('.name')
|
7
|
-
.form-group= form.text_field :description, class: 'description form-control', placeholder: t('.description')
|
8
|
-
|
9
|
-
%br
|
10
|
-
|
11
|
-
.row
|
12
|
-
.col-md-12
|
13
|
-
.text-editor-buttons{ data: { apply_to: 'post_text' } }
|
14
|
-
%div.btn-group
|
15
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
16
|
-
%i{ class: 'fa fa-bold' }
|
17
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
18
|
-
%i{ class: 'fa fa-italic' }
|
19
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
20
|
-
%i{ class: 'fa fa-strikethrough' }
|
21
|
-
=link_to '#', class: 'btn btn-default btn-sm' do
|
22
|
-
%i{ class: 'fa fa-underline' }
|
23
|
-
|
24
|
-
%div.btn-group
|
25
|
-
=link_to '#', class: 'btn btn-default btn-sm', data: { toggle: 'modal' } do
|
26
|
-
%i{ class: 'fa fa-camera-retro' }
|
27
|
-
|
28
|
-
%div.btn-group.smiles
|
29
|
-
- emoticons_list.each do |code, path|
|
30
|
-
=link_to '#', class: 'btn btn-default btn-sm smile-past' do
|
31
|
-
%img{ src: path, class: 'smile', data: { code: code } }
|
32
|
-
|
33
|
-
= fields_for :post do |post_form|
|
34
|
-
.form-group= post_form.text_area :text, placeholder: t('.post_text'), class: 'form-control', rows: 10
|
35
|
-
|
36
|
-
= form.submit class: 'btn '
|
37
|
-
|
38
|
-
= render partial: 'my_forum/shared/upload_photo', locals: { textarea: 'post_text' }
|
@@ -1,60 +0,0 @@
|
|
1
|
-
.container-fluid
|
2
|
-
.row
|
3
|
-
#topic_header.col-md-8
|
4
|
-
= render 'topic_header', topic: @topic
|
5
|
-
.col-md-4.text-right
|
6
|
-
= will_paginate @topic_posts, inner_window: 1, outer_window: 1
|
7
|
-
.row
|
8
|
-
.col-md-12
|
9
|
-
#posts
|
10
|
-
.row
|
11
|
-
.col-md-12.topic_posts_info
|
12
|
-
=t('.messages_in_topic', count: @topic.posts.count)
|
13
|
-
.row.post-list-container
|
14
|
-
.box
|
15
|
-
= render partial: 'post', collection: @topic_posts
|
16
|
-
|
17
|
-
.row{ id: 'pagination' }
|
18
|
-
= will_paginate @topic_posts
|
19
|
-
|
20
|
-
- if is_admin?
|
21
|
-
.row
|
22
|
-
- options = { method: :patch, data: { confirm: t('.are_you_sure?') } }
|
23
|
-
|
24
|
-
- @topic.pinned? ? options.merge!(class: 'btn btn-sm btn-info') : options.merge!(class: 'btn btn-sm btn-warning')
|
25
|
-
= link_to (@topic.pinned? ? t('.unpin_topic') : t('.pin_topic')), forum_topic_pin_path(@topic.forum, @topic), options
|
26
|
-
|
27
|
-
- @topic.closed? ? options.merge!(class: 'btn btn-sm btn-info') : options.merge!(class: 'btn btn-sm btn-danger')
|
28
|
-
= link_to (@topic.closed? ? t('.unlock_topic') : t('.lock_topic')), forum_topic_close_path(@topic.forum, @topic), options
|
29
|
-
|
30
|
-
- options.merge!(class: 'btn btn-sm btn-danger')
|
31
|
-
= link_to t('.delete_topic'), forum_topic_delete_path(@topic.forum, @topic), options
|
32
|
-
|
33
|
-
- if can_quick_answer?(@topic)
|
34
|
-
#quick_answer
|
35
|
-
- if @topic.closed?
|
36
|
-
.alert.alert-danger=t('.warning_closed_topic')
|
37
|
-
= render 'quick_answer', forum: @forum, topic: @topic
|
38
|
-
|
39
|
-
:coffee
|
40
|
-
$(document).on 'ready page:load', ->
|
41
|
-
|
42
|
-
$('.user_profile_popover').popover(
|
43
|
-
trigger: 'click'
|
44
|
-
html: true
|
45
|
-
delay:
|
46
|
-
'show': 100
|
47
|
-
'hide': 200
|
48
|
-
).on('mouseenter', ->
|
49
|
-
_this = this
|
50
|
-
$(this).popover("show")
|
51
|
-
$(this).siblings(".popover").on('mouseleave', ->
|
52
|
-
$(_this).popover('hide')
|
53
|
-
)
|
54
|
-
)
|
55
|
-
.on('mouseleave', ->
|
56
|
-
_this = this
|
57
|
-
setTimeout (-> $(_this).popover("hide") if !$(".popover:hover").length ), 300
|
58
|
-
)
|
59
|
-
|
60
|
-
$('body').scrollTo('#pagination')
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= @message %>
|
@@ -1 +0,0 @@
|
|
1
|
-
="Your new password is: #{@new_password}"
|
@@ -1 +0,0 @@
|
|
1
|
-
Your new password is: <%= @new_password %>
|
@@ -1,36 +0,0 @@
|
|
1
|
-
%h2= t('.edit_profile')
|
2
|
-
|
3
|
-
.row
|
4
|
-
.col-md-4
|
5
|
-
|
6
|
-
= errors_for(current_user)
|
7
|
-
|
8
|
-
= form_for current_user, url: user_path(current_user), role: 'form' do |form|
|
9
|
-
.form-group= form.text_field :email, class: 'name form-control', placeholder: t('.email')
|
10
|
-
.form-group= form.password_field :password, value: '', class: 'description form-control', placeholder: t('.current_password')
|
11
|
-
.form-group= form.text_field :new_password, value: '', class: 'description form-control', placeholder: t('.new_password')
|
12
|
-
|
13
|
-
= form.submit t('.update'), class: 'btn btn-primary btn-sm'
|
14
|
-
|
15
|
-
.col-md-5.col-md-offset-1
|
16
|
-
.row.col-sm-4
|
17
|
-
.thumbnail
|
18
|
-
= user_avatar(current_user)
|
19
|
-
.row.col-sm-7.col-sm-offset-1
|
20
|
-
.row
|
21
|
-
%strong=t('.avatar')
|
22
|
-
= form_for current_user, url: user_avatar_update_path(current_user), role: 'form', multipart: true do |form|
|
23
|
-
.row
|
24
|
-
%p= t('.avatar_upload_description')
|
25
|
-
.row= form.file_field :avatar
|
26
|
-
.row= form.text_field :avatar_url, placeholder: 'http://...'
|
27
|
-
.row= form.submit t('.update_avatar'), class: 'btn btn-primary btn-sm submit_update_avatar'
|
28
|
-
%br
|
29
|
-
%h2= t('.edit_additional_info')
|
30
|
-
.row
|
31
|
-
.col-md-4
|
32
|
-
= form_for current_user, url: user_path(current_user), role: 'form' do |form|
|
33
|
-
- additional_info_attrs.each do |attr|
|
34
|
-
.form-group= form.text_field attr, value: current_user.send(attr), class: 'name form-control', placeholder: t("my_forum.additional_info.#{attr.to_s}")
|
35
|
-
|
36
|
-
= form.submit t('.update'), class: 'btn btn-primary btn-sm'
|
@@ -1,10 +0,0 @@
|
|
1
|
-
#sign_in.container-fluid
|
2
|
-
.col-md-6.col-md-offset-3.text-center
|
3
|
-
%h2= t('.forgot_password_head')
|
4
|
-
|
5
|
-
=form_for :user, :url => forgot_password_path do |f|
|
6
|
-
=f.label :email, t('.email')
|
7
|
-
=f.text_field :email
|
8
|
-
|
9
|
-
.center
|
10
|
-
=f.submit t('.reset_password'), class: 'btn btn-sm btn-primary'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
.container-fluid
|
2
|
-
.col-md-6.col-md-offset-3.text-center
|
3
|
-
|
4
|
-
%h2= t('.register_new_user')
|
5
|
-
|
6
|
-
= errors_for @user
|
7
|
-
|
8
|
-
= form_for @user, url: users_path, role: 'form' do |form|
|
9
|
-
.form-group= form.text_field :login, class: 'name form-control', placeholder: t('.login')
|
10
|
-
.form-group= form.text_field :email, class: 'description form-control', placeholder: t('.email')
|
11
|
-
.form-group= form.text_field :password, class: 'description form-control', placeholder: t('.password')
|
12
|
-
|
13
|
-
|
14
|
-
= form.submit t('.register'), class: 'btn btn-primary btn-sm'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
#sign_in.container-fluid
|
2
|
-
.col-md-6.col-md-offset-3.text-center
|
3
|
-
%h2= t('.sign_in_head')
|
4
|
-
=form_for :user, :url => signin_path do |f|
|
5
|
-
=f.label :login, t('.login')
|
6
|
-
=f.text_field :login
|
7
|
-
|
8
|
-
=f.label :password, t('.password')
|
9
|
-
=f.password_field :password
|
10
|
-
|
11
|
-
.center
|
12
|
-
=f.submit t('.enter'), class: 'btn btn-sm btn-primary'
|
13
|
-
.center
|
14
|
-
=link_to t('.forgot_password'), forgot_password_path
|
File without changes
|
@@ -1,37 +0,0 @@
|
|
1
|
-
.container-fluid
|
2
|
-
- @forum_categories.each do |category|
|
3
|
-
.row.category-header
|
4
|
-
.col-md-12= category.name
|
5
|
-
|
6
|
-
.row.category-forums
|
7
|
-
.col-md-12.category-forums-container
|
8
|
-
.box
|
9
|
-
- category.forums.each do |forum|
|
10
|
-
.row.forum-row
|
11
|
-
.col-md-1.col-sm-1= forum_status_img(forum)
|
12
|
-
.col-md-6.col-sm-6= forum_name(forum)
|
13
|
-
.col-md-2.col-sm-2.forum-info= forum_stat(forum)
|
14
|
-
.col-md-3.col-sm-3.forum-last-message-info= forum_last_message_info(forum)
|
15
|
-
|
16
|
-
- if @recent_posts
|
17
|
-
#recent_topics
|
18
|
-
%table.table
|
19
|
-
%caption= t('.recent_topics')
|
20
|
-
%thead
|
21
|
-
%tr
|
22
|
-
%th= t('.topic_name')
|
23
|
-
%th= t('.last_message_from')
|
24
|
-
%th= t('.date')
|
25
|
-
%tbody
|
26
|
-
-@recent_posts.each do |post|
|
27
|
-
%tr
|
28
|
-
%td= link_to post.topic_name, forum_topic_path(post.forum, post.topic_id)
|
29
|
-
%td= post.user.login
|
30
|
-
%td= forum_time(post.updated_at)
|
31
|
-
|
32
|
-
#online_users.well
|
33
|
-
= t('.users_online')
|
34
|
-
= online_users
|
35
|
-
%br
|
36
|
-
= t('.today_online')
|
37
|
-
= today_was_users
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module WillPaginate
|
2
|
-
module ActionView
|
3
|
-
def will_paginate(collection = nil, options = {})
|
4
|
-
options[:renderer] ||= BootstrapLinkRenderer
|
5
|
-
super.try :html_safe
|
6
|
-
end
|
7
|
-
|
8
|
-
class BootstrapLinkRenderer < LinkRenderer
|
9
|
-
protected
|
10
|
-
|
11
|
-
def html_container(html)
|
12
|
-
tag :nav, tag(:ul, html, class: 'pagination'), container_attributes
|
13
|
-
end
|
14
|
-
|
15
|
-
def page_number(page)
|
16
|
-
tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page)
|
17
|
-
end
|
18
|
-
|
19
|
-
def previous_or_next_page(page, text, classname)
|
20
|
-
tag :li, link(text, page || '#'), :class => [classname[0..3], classname, ('disabled' unless page)].join(' ')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
data/config/locales/en.yml
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
my_forum:
|
3
|
-
today: "Today '%{hhmm}'"
|
4
|
-
yerstaday: "Yerstaday '%{hhmm}'"
|
5
|
-
|
6
|
-
admin:
|
7
|
-
forums:
|
8
|
-
index:
|
9
|
-
create_category: 'Create New Category'
|
10
|
-
|
11
|
-
|
12
|
-
categories:
|
13
|
-
new:
|
14
|
-
create_new_category: 'Create new Category'
|
15
|
-
category_name: 'Category name'
|
16
|
-
|
17
|
-
|
18
|
-
forums:
|
19
|
-
new:
|
20
|
-
create_new_forum: 'Create new Forum'
|
21
|
-
forum_name: 'Forum name'
|
22
|
-
forum_description: 'Forum description'
|
23
|
-
|
24
|
-
|
25
|
-
welcome:
|
26
|
-
index:
|
27
|
-
topics_count: "%{topics_count} topics"
|
28
|
-
messages_count: "%{messages_count} messages"
|
29
|
-
last_answer_from: 'Last answer from: '
|
30
|
-
in_forum: 'in '
|
31
|
-
|
32
|
-
forums:
|
33
|
-
topic_subject:
|
34
|
-
author: "Author: %{author}"
|
35
|
-
|
36
|
-
topics:
|
37
|
-
new:
|
38
|
-
name: 'Topic name'
|
39
|
-
description: 'Description'
|
40
|
-
post_text: 'Post text'
|
41
|
-
create_new_topic_in: "Create new topic in '%{topic_name}'"
|
42
|
-
show:
|
43
|
-
messages_in_topic: "Messages in topic: %{count}"
|
44
|
-
user_info:
|
45
|
-
user_posts_count: "%{count} messages"
|
46
|
-
quick_answer:
|
47
|
-
quick_answer: 'Quick answer'
|
48
|
-
advanced_answer: 'Advanced answer'
|
49
|
-
|
50
|
-
users:
|
51
|
-
signin:
|
52
|
-
sign_in_head: 'Forum Enter'
|
53
|
-
new:
|
54
|
-
login: 'Login'
|
55
|
-
email: 'E-mail'
|
56
|
-
password: 'Password'
|
57
|
-
|
58
|
-
layouts:
|
59
|
-
my_forum:
|
60
|
-
user_navbar:
|
61
|
-
welcome_to_forum: 'Welcome back'
|
62
|
-
private_messages: 'Private messages'
|
63
|
-
new_forum_messages: 'New Forum messages'
|
64
|
-
user_profile: 'My profile'
|
65
|
-
logout: 'Logout'
|
66
|
-
guest_navbar:
|
67
|
-
login: 'Login'
|
68
|
-
register: 'Register'
|