my_forum 0.0.1.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +16 -0
- data/Rakefile +35 -0
- 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 +2 -0
- data/app/assets/javascripts/my_forum/admin/users.js +2 -0
- data/app/assets/javascripts/my_forum/application.js +16 -0
- data/app/assets/javascripts/my_forum/forums.js.coffee +0 -0
- data/app/assets/javascripts/my_forum/posts.js.coffee +0 -0
- 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 +3 -0
- data/app/assets/stylesheets/my_forum/admin/forums.css.scss +7 -0
- data/app/assets/stylesheets/my_forum/admin/roles.css +4 -0
- data/app/assets/stylesheets/my_forum/admin/users.css +4 -0
- data/app/assets/stylesheets/my_forum/application.css.scss +29 -0
- data/app/assets/stylesheets/my_forum/forums.css.scss +31 -0
- data/app/assets/stylesheets/my_forum/posts.css.scss +76 -0
- data/app/assets/stylesheets/my_forum/private_messages.css.scss +7 -0
- data/app/assets/stylesheets/my_forum/topics.css.scss +12 -0
- data/app/assets/stylesheets/my_forum/users.css.scss +0 -0
- data/app/assets/stylesheets/my_forum/welcome.css.scss +66 -0
- data/app/controllers/my_forum/admin/categories_controller.rb +36 -0
- data/app/controllers/my_forum/admin/dashboard_controller.rb +13 -0
- data/app/controllers/my_forum/admin/forums_controller.rb +35 -0
- data/app/controllers/my_forum/admin/roles_controller.rb +38 -0
- data/app/controllers/my_forum/admin/users_controller.rb +14 -0
- data/app/controllers/my_forum/application_controller.rb +56 -0
- data/app/controllers/my_forum/forums_controller.rb +39 -0
- data/app/controllers/my_forum/posts_controller.rb +29 -0
- data/app/controllers/my_forum/private_messages_controller.rb +67 -0
- data/app/controllers/my_forum/topics_controller.rb +47 -0
- data/app/controllers/my_forum/users_controller.rb +89 -0
- data/app/controllers/my_forum/welcome_controller.rb +12 -0
- data/app/helpers/my_forum/admin/dashboard_helper.rb +4 -0
- data/app/helpers/my_forum/admin/forums_helper.rb +4 -0
- data/app/helpers/my_forum/admin/roles_helper.rb +4 -0
- data/app/helpers/my_forum/admin/users_helper.rb +4 -0
- data/app/helpers/my_forum/application_helper.rb +39 -0
- data/app/helpers/my_forum/forums_helper.rb +42 -0
- data/app/helpers/my_forum/posts_helper.rb +29 -0
- data/app/helpers/my_forum/private_messages_helper.rb +18 -0
- data/app/helpers/my_forum/topics_helper.rb +11 -0
- data/app/helpers/my_forum/users_helper.rb +23 -0
- data/app/helpers/my_forum/welcome_helper.rb +4 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/my_forum/user_mailer.rb +14 -0
- data/app/models/my_forum/category.rb +7 -0
- data/app/models/my_forum/category_permission.rb +6 -0
- data/app/models/my_forum/forum.rb +56 -0
- data/app/models/my_forum/log_read_mark.rb +4 -0
- data/app/models/my_forum/post.rb +14 -0
- data/app/models/my_forum/private_message.rb +8 -0
- data/app/models/my_forum/role.rb +6 -0
- data/app/models/my_forum/topic.rb +33 -0
- data/app/models/my_forum/user.rb +45 -0
- data/app/models/my_forum/user_group.rb +13 -0
- data/app/models/my_forum/user_group_link.rb +6 -0
- data/app/models/my_forum/user_roles.rb +6 -0
- data/app/views/layouts/mailer.html.erb +5 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/my_forum/_guest_navbar.html.haml +4 -0
- data/app/views/layouts/my_forum/_user_navbar.html.haml +18 -0
- data/app/views/layouts/my_forum/admin_application.haml +27 -0
- data/app/views/layouts/my_forum/application.haml +21 -0
- data/app/views/my_forum/admin/categories/edit.haml +9 -0
- data/app/views/my_forum/admin/categories/new.haml +8 -0
- data/app/views/my_forum/admin/dashboard/index.haml +0 -0
- data/app/views/my_forum/admin/forums/index.haml +37 -0
- data/app/views/my_forum/admin/forums/new.haml +6 -0
- data/app/views/my_forum/admin/roles/index.haml +12 -0
- data/app/views/my_forum/admin/roles/new.haml +22 -0
- data/app/views/my_forum/admin/users/index.haml +10 -0
- data/app/views/my_forum/forums/_topic_subject.html.haml +15 -0
- data/app/views/my_forum/forums/show.haml +28 -0
- data/app/views/my_forum/private_messages/_sidebar.haml +10 -0
- data/app/views/my_forum/private_messages/inbox.haml +24 -0
- data/app/views/my_forum/private_messages/new.haml +16 -0
- data/app/views/my_forum/private_messages/show.haml +10 -0
- data/app/views/my_forum/topics/_post.haml +12 -0
- data/app/views/my_forum/topics/_quick_answer.haml +8 -0
- data/app/views/my_forum/topics/_topic_header.haml +4 -0
- data/app/views/my_forum/topics/_user_info.haml +9 -0
- data/app/views/my_forum/topics/new.haml +12 -0
- data/app/views/my_forum/topics/show.haml +21 -0
- data/app/views/my_forum/user_mailer/reset_password_email.haml +1 -0
- data/app/views/my_forum/user_mailer/reset_password_email.text.erb +1 -0
- data/app/views/my_forum/users/edit.haml +12 -0
- data/app/views/my_forum/users/forgot_password.haml +10 -0
- data/app/views/my_forum/users/new.haml +14 -0
- data/app/views/my_forum/users/signin.haml +14 -0
- data/app/views/my_forum/users/signout.haml +0 -0
- data/app/views/my_forum/welcome/index.haml +21 -0
- data/config/locales/en.yml +65 -0
- data/config/locales/ru.yml +121 -0
- data/config/routes.rb +31 -0
- data/db/migrate/20141117122725_create_my_forum_forums.rb +12 -0
- data/db/migrate/20141117122742_create_my_forum_topics.rb +17 -0
- data/db/migrate/20141117122751_create_my_forum_posts.rb +11 -0
- data/db/migrate/20141118081021_create_my_forum_categories.rb +8 -0
- data/db/migrate/20141118131215_create_my_forum_users.rb +25 -0
- data/db/migrate/20141222094522_create_my_forum_roles.rb +10 -0
- data/db/migrate/20141222094538_create_my_forum_user_roles.rb +9 -0
- data/db/migrate/20150202115250_create_my_forum_log_read_marks.rb +10 -0
- data/db/migrate/20150215200453_create_my_forum_user_groups.rb +15 -0
- data/db/migrate/20150215204852_create_my_forum_user_group_links.rb +9 -0
- data/db/migrate/20150215212443_create_my_forum_category_permissions.rb +9 -0
- data/db/migrate/20150227210814_create_my_forum_private_messages.rb +14 -0
- data/lib/my_forum/engine.rb +31 -0
- data/lib/my_forum/version.rb +3 -0
- data/lib/my_forum.rb +4 -0
- data/lib/tasks/my_forum_tasks.rake +4 -0
- data/spec/controllers/my_forum/private_messages_controller_spec.rb +7 -0
- data/spec/controllers/my_forum/users_controller_spec.rb +76 -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/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 +23 -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 +78 -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 +4 -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/schema.rb +128 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +97 -0
- data/spec/dummy/log/test.log +4926 -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/helpers/my_forum/private_messages_helper_spec.rb +17 -0
- data/spec/models/my_forum/private_message_spec.rb +7 -0
- data/spec/models/my_forum/user_spec.rb +13 -0
- data/spec/rails_helper.rb +52 -0
- data/spec/spec_helper.rb +87 -0
- metadata +348 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
.col-md-6
|
2
|
+
= "#{t('.welcome_to_forum')}, #{current_user.login}"
|
3
|
+
|
4
|
+
.col-md-6
|
5
|
+
.btn-group.pull-right{ role: 'group' }
|
6
|
+
=link_to private_messages_path, class: 'btn btn-sm btn-default' do
|
7
|
+
=t('.private_messages')
|
8
|
+
= new_private_messages_count_bage
|
9
|
+
%span.glyphicon.glyphicon-envelope
|
10
|
+
=link_to unread_topics_path, class: 'btn btn-sm btn-default' do
|
11
|
+
=t('.new_forum_messages')
|
12
|
+
%span.glyphicon.glyphicon-eye-open
|
13
|
+
=link_to edit_user_path(current_user), class: 'btn btn-sm btn-default' do
|
14
|
+
=t('.user_profile')
|
15
|
+
%span.glyphicon.glyphicon-user
|
16
|
+
= link_to logout_path, class: 'btn btn-sm btn-default' do
|
17
|
+
=t('.logout')
|
18
|
+
%span.glyphicon.glyphicon-log-out
|
@@ -0,0 +1,27 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title Forum
|
5
|
+
= stylesheet_link_tag 'my_forum/application', media: 'all', 'data-turbolinks-track' => true
|
6
|
+
= javascript_include_tag 'my_forum/application', 'data-turbolinks-track' => true
|
7
|
+
= csrf_meta_tag
|
8
|
+
|
9
|
+
%body#admin
|
10
|
+
%nav.navbar.navbar-inverse.navbar-fixed-top{ role: 'navigation'}
|
11
|
+
.container-fluid
|
12
|
+
.navbar-header
|
13
|
+
=link_to 'Admin panel', admin_root_path, class: 'navbar-brand'
|
14
|
+
|
15
|
+
|
16
|
+
#admin-content.container-fluid
|
17
|
+
.row
|
18
|
+
.col-sm-3.col-md-2.sidebar
|
19
|
+
%ul.nav.nav-sidebar
|
20
|
+
%li= link_to t('.manage_forums'), admin_forums_path
|
21
|
+
%li= link_to t('.manage_roles'), admin_roles_path
|
22
|
+
%li= link_to t('.manage_users'), admin_users_path
|
23
|
+
|
24
|
+
.col-sm-9.col-md-10
|
25
|
+
= yield
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title Forum
|
5
|
+
= stylesheet_link_tag 'my_forum/application', media: 'all', 'data-turbolinks-track' => true
|
6
|
+
= javascript_include_tag 'my_forum/application', 'data-turbolinks-track' => true
|
7
|
+
= csrf_meta_tag
|
8
|
+
|
9
|
+
%body.container-fluid
|
10
|
+
|
11
|
+
#forum_header
|
12
|
+
=link_to root_path do
|
13
|
+
= image_tag('lada_head.jpg')
|
14
|
+
#guest_navbar
|
15
|
+
= render current_user ? '/layouts/my_forum/user_navbar' : '/layouts/my_forum/guest_navbar'
|
16
|
+
|
17
|
+
#body
|
18
|
+
.row
|
19
|
+
.col-md-6
|
20
|
+
#forum-navigation= draw_navigation
|
21
|
+
= yield
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
.page-header
|
2
|
+
%h2= t('.forums')
|
3
|
+
|
4
|
+
= link_to t('.create_category'), new_admin_category_path, class: 'btn btn-primary btn-sm'
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
.container-fluid
|
9
|
+
- @categories.each do |category|
|
10
|
+
.row.category_box
|
11
|
+
.col-md-12.category_name
|
12
|
+
=category.name
|
13
|
+
|
14
|
+
.pull-right.btn-group.btn-group-sm{ rel: 'group' }
|
15
|
+
= link_to t('.create_forum'), new_admin_category_forum_path(category), class: 'btn btn-default'
|
16
|
+
.btn-group.btn-group-sm{ rel: 'group' }
|
17
|
+
%button{ class: 'btn btn-default dropdown-toggle', data: { toggle: 'dropdown' } }
|
18
|
+
Options
|
19
|
+
.caret
|
20
|
+
%ul{ class: 'dropdown-menu', role: 'menu' }
|
21
|
+
%li= link_to t('.edit'), edit_admin_category_path(category)
|
22
|
+
%li= link_to t('.delete'), '#'
|
23
|
+
|
24
|
+
|
25
|
+
.row.category_forums
|
26
|
+
.col-md-12
|
27
|
+
= t('.no_forums') if category.forums.blank?
|
28
|
+
-category.forums.each do |forum|
|
29
|
+
.row
|
30
|
+
.col-md-12
|
31
|
+
%strong=forum.name
|
32
|
+
%br
|
33
|
+
=forum.description
|
34
|
+
|
35
|
+
.pull-right
|
36
|
+
=link_to '', '#', class: 'glyphicon glyphicon-edit'
|
37
|
+
=link_to '', '#', class: 'glyphicon glyphicon-trash'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.page-header
|
2
|
+
%h2= t('.new-role')
|
3
|
+
|
4
|
+
= form_for @role, url: admin_roles_path do |f|
|
5
|
+
.row
|
6
|
+
= f.text_field :name, placeholder: t('.role_name')
|
7
|
+
.row
|
8
|
+
= f.text_field :color
|
9
|
+
|
10
|
+
.row
|
11
|
+
admin access
|
12
|
+
.btn-group{ 'data-toggle' => "buttons" }
|
13
|
+
=f.label :admin_access, class: 'btn btn-success btn-sm active' do
|
14
|
+
= f.radio_button :admin_access, true
|
15
|
+
yes
|
16
|
+
=f.label :admin_access, class: 'btn btn-danger btn-sm' do
|
17
|
+
= f.radio_button :admin_access, false
|
18
|
+
no
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
= f.submit
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- forum ||= topic.forum
|
2
|
+
|
3
|
+
.row
|
4
|
+
.col-md-12
|
5
|
+
- if topic.pinned?
|
6
|
+
%span.label.label-warning.pin-sign
|
7
|
+
%span.glyphicon.glyphicon-pushpin
|
8
|
+
- if topic.unread?(current_user, topic.posts.last)
|
9
|
+
.new_topic.label.label-warning= t('.new')
|
10
|
+
|
11
|
+
= link_to topic.name.html_safe, forum_topic_path(forum, topic)
|
12
|
+
.row
|
13
|
+
.col-md-12.topic_description
|
14
|
+
=topic.description.html_safe
|
15
|
+
=# t('.author', author: topic.owner.login)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
= new_topic_button
|
2
|
+
|
3
|
+
= link_to t('.mark_all_as_read'), mark_all_as_read_path
|
4
|
+
|
5
|
+
.container-fluid
|
6
|
+
.row.forum-header
|
7
|
+
.col-md-1
|
8
|
+
.col-md-6=t('.subject')
|
9
|
+
.col-md-1=t('.author')
|
10
|
+
.col-md-1=t('.answers')
|
11
|
+
.col-md-1=t('.views')
|
12
|
+
.col-md-2=t('.last_message')
|
13
|
+
|
14
|
+
.row.topic-list-container
|
15
|
+
.box.topic-list
|
16
|
+
- if @forum_topics.blank?
|
17
|
+
.row.topic-row
|
18
|
+
.col-md-12.col-sm-12.text-center= t('.no-topics')
|
19
|
+
- else
|
20
|
+
- @forum_topics.each do |topic|
|
21
|
+
.row.topic-row
|
22
|
+
.col-md-7.col-sm-7= render 'topic_subject', topic: topic, forum: @forum
|
23
|
+
.col-md-1.col-sm-1= topic.posts.first.user.login
|
24
|
+
.col-md-1.col-sm-1= topic.posts_count
|
25
|
+
.col-md-1.col-sm-1= topic.views.to_i
|
26
|
+
.col-md-2.col-sm-2.info= topic_last_post_info(topic)
|
27
|
+
|
28
|
+
= will_paginate @forum_topics
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.row
|
3
|
+
.col-md-2
|
4
|
+
= render partial: 'sidebar'
|
5
|
+
|
6
|
+
.col-md-10
|
7
|
+
|
8
|
+
= new_pm_button
|
9
|
+
|
10
|
+
.panel.panel-default
|
11
|
+
.panel-heading= t('.private_messages')
|
12
|
+
%table.table
|
13
|
+
%thead
|
14
|
+
%tr
|
15
|
+
%td=t('.date')
|
16
|
+
%td=t('.subject')
|
17
|
+
%td=t('.from')
|
18
|
+
%tbody
|
19
|
+
- @private_messages.each do |message|
|
20
|
+
%tr
|
21
|
+
- html_class = 'unread' if message.unread?
|
22
|
+
%td=link_to message.created_at, private_message_url(message), class: html_class
|
23
|
+
%td=link_to message.subject, private_message_url(message), class: html_class
|
24
|
+
%td=link_to message.body, private_message_url(message), class: html_class
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.row
|
3
|
+
.col-md-2
|
4
|
+
= render partial: 'sidebar'
|
5
|
+
|
6
|
+
.col-md-10
|
7
|
+
%h2= t('.new_private_message')
|
8
|
+
|
9
|
+
= errors_for @pm
|
10
|
+
|
11
|
+
= form_for @pm, url: private_messages_path, role: 'form' do |form|
|
12
|
+
.form-group= form.text_field :recipient, class: 'subject form-control', placeholder: t('.recipient')
|
13
|
+
.form-group= form.text_field :subject, class: 'subject form-control', placeholder: t('.subject')
|
14
|
+
.form-group= form.text_area :body, class: 'body form-control', placeholder: t('.body')
|
15
|
+
|
16
|
+
= form.submit class: 'btn btn-primary btn-sm'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.row.post-header
|
2
|
+
.col-md-12.post_from_user_login
|
3
|
+
- user_login = post.user.try(:login)
|
4
|
+
= online_user_marker(user_login)
|
5
|
+
= user_login
|
6
|
+
.row
|
7
|
+
.col-md-2
|
8
|
+
= render 'user_info', post: post
|
9
|
+
.col-md-10
|
10
|
+
.created_at= t('.sent', datetime: post.created_at)
|
11
|
+
#post_container
|
12
|
+
= format_post_text(post)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-10.col-md-offset-1
|
3
|
+
= form_for @new_post, url: forum_topic_posts_path(forum, topic), role: 'form' do |form|
|
4
|
+
.form-group= form.text_area :text, class: 'form-control'
|
5
|
+
|
6
|
+
.pull-right
|
7
|
+
= form.submit t('.quick_answer'), class: 'btn btn-primary'
|
8
|
+
= link_to t('.advanced_answer'), '#', class: 'btn btn-primary'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%h2= t('.create_new_topic_in', topic_name: @forum.name)
|
2
|
+
|
3
|
+
= form_for @topic, url: forum_topics_path, role: 'form' do |form|
|
4
|
+
.form-group= form.text_field :name, class: 'name form-control', placeholder: t('.name')
|
5
|
+
.form-group= form.text_field :description, class: 'description form-control', placeholder: t('.description')
|
6
|
+
|
7
|
+
%br
|
8
|
+
|
9
|
+
= fields_for :post do |post_form|
|
10
|
+
.form-group= post_form.text_area :text, placeholder: t('.post_text'), class: 'form-control', rows: 10
|
11
|
+
|
12
|
+
= form.submit class: 'btn '
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.row
|
3
|
+
.col-md-12
|
4
|
+
#topic_header
|
5
|
+
= render 'topic_header', topic: @topic
|
6
|
+
.row
|
7
|
+
.col-md-12
|
8
|
+
#posts
|
9
|
+
.row
|
10
|
+
.col-md-12.topic_posts_info
|
11
|
+
=t('.messages_in_topic', count: @topic.posts.count)
|
12
|
+
.row.post-list-container
|
13
|
+
.box
|
14
|
+
- @topic_posts.each do |post|
|
15
|
+
= render 'post', post: post
|
16
|
+
|
17
|
+
= will_paginate @topic_posts
|
18
|
+
|
19
|
+
- if current_user.can_quick_answer?(@topic)
|
20
|
+
#quick_answer
|
21
|
+
= render 'quick_answer', forum: @forum, topic: @topic
|
@@ -0,0 +1 @@
|
|
1
|
+
="Your new password is: #{@new_password}"
|
@@ -0,0 +1 @@
|
|
1
|
+
Your new password is: <%= @new_password %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%h2= t('.edit_profile')
|
2
|
+
|
3
|
+
.row.col-md-4
|
4
|
+
|
5
|
+
= errors_for(current_user)
|
6
|
+
|
7
|
+
= form_for current_user, url: user_path(current_user), role: 'form' do |form|
|
8
|
+
.form-group= form.text_field :email, class: 'name form-control', placeholder: t('.email')
|
9
|
+
.form-group= form.password_field :password, value: '', class: 'description form-control', placeholder: t('.current_password')
|
10
|
+
.form-group= form.text_field :new_password, value: '', class: 'description form-control', placeholder: t('.new_password')
|
11
|
+
|
12
|
+
= form.submit class: 'btn btn-primary btn-sm'
|
@@ -0,0 +1,10 @@
|
|
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'
|
@@ -0,0 +1,14 @@
|
|
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'
|
@@ -0,0 +1,14 @@
|
|
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
|
@@ -0,0 +1,21 @@
|
|
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
|
+
#online_users.well
|
17
|
+
= t('.users_online')
|
18
|
+
= online_users
|
19
|
+
%br
|
20
|
+
= t('.today_online')
|
21
|
+
= today_was_users
|
@@ -0,0 +1,65 @@
|
|
1
|
+
en:
|
2
|
+
my_forum:
|
3
|
+
admin:
|
4
|
+
forums:
|
5
|
+
index:
|
6
|
+
create_category: 'Create New Category'
|
7
|
+
|
8
|
+
|
9
|
+
categories:
|
10
|
+
new:
|
11
|
+
create_new_category: 'Create new Category'
|
12
|
+
category_name: 'Category name'
|
13
|
+
|
14
|
+
|
15
|
+
forums:
|
16
|
+
new:
|
17
|
+
create_new_forum: 'Create new Forum'
|
18
|
+
forum_name: 'Forum name'
|
19
|
+
forum_description: 'Forum description'
|
20
|
+
|
21
|
+
|
22
|
+
welcome:
|
23
|
+
index:
|
24
|
+
topics_count: "%{topics_count} topics"
|
25
|
+
messages_count: "%{messages_count} messages"
|
26
|
+
last_answer_from: 'Last answer from: '
|
27
|
+
in_forum: 'in '
|
28
|
+
|
29
|
+
forums:
|
30
|
+
topic_subject:
|
31
|
+
author: "Author: %{author}"
|
32
|
+
|
33
|
+
topics:
|
34
|
+
new:
|
35
|
+
name: 'Topic name'
|
36
|
+
description: 'Description'
|
37
|
+
post_text: 'Post text'
|
38
|
+
create_new_topic_in: "Create new topic in '%{topic_name}'"
|
39
|
+
show:
|
40
|
+
messages_in_topic: "Messages in topic: %{count}"
|
41
|
+
user_info:
|
42
|
+
user_posts_count: "%{count} messages"
|
43
|
+
quick_answer:
|
44
|
+
quick_answer: 'Quick answer'
|
45
|
+
advanced_answer: 'Advanced answer'
|
46
|
+
|
47
|
+
users:
|
48
|
+
signin:
|
49
|
+
sign_in_head: 'Forum Enter'
|
50
|
+
new:
|
51
|
+
login: 'Login'
|
52
|
+
email: 'E-mail'
|
53
|
+
password: 'Password'
|
54
|
+
|
55
|
+
layouts:
|
56
|
+
my_forum:
|
57
|
+
user_navbar:
|
58
|
+
welcome_to_forum: 'Welcome back'
|
59
|
+
private_messages: 'Private messages'
|
60
|
+
new_forum_messages: 'New Forum messages'
|
61
|
+
user_profile: 'My profile'
|
62
|
+
logout: 'Logout'
|
63
|
+
guest_navbar:
|
64
|
+
login: 'Login'
|
65
|
+
register: 'Register'
|
@@ -0,0 +1,121 @@
|
|
1
|
+
ru:
|
2
|
+
my_forum:
|
3
|
+
create_new_pm: 'Написать личное сообщение'
|
4
|
+
create_new_topic: 'Создать новую тему'
|
5
|
+
|
6
|
+
admin:
|
7
|
+
forums:
|
8
|
+
index:
|
9
|
+
create_category: 'Создать новую категорию'
|
10
|
+
|
11
|
+
roles:
|
12
|
+
new:
|
13
|
+
role_name: 'Название роли'
|
14
|
+
|
15
|
+
|
16
|
+
categories:
|
17
|
+
new:
|
18
|
+
create_new_category: 'Создать новую категорию'
|
19
|
+
category_name: 'Название категории'
|
20
|
+
|
21
|
+
|
22
|
+
forums:
|
23
|
+
new:
|
24
|
+
create_new_forum: 'Создать новый форум'
|
25
|
+
forum_name: 'Название форума'
|
26
|
+
forum_description: 'Описание форума'
|
27
|
+
|
28
|
+
|
29
|
+
welcome:
|
30
|
+
index:
|
31
|
+
topics_count: "%{topics_count} тем"
|
32
|
+
messages_count: "%{messages_count} сообщений"
|
33
|
+
last_answer_from: 'Последний ответ от: '
|
34
|
+
in_forum: 'в '
|
35
|
+
users_online: 'Сейчас на форуме: '
|
36
|
+
today_online: 'Сегодня на форуме были: '
|
37
|
+
|
38
|
+
forums:
|
39
|
+
show:
|
40
|
+
subject: 'Тема'
|
41
|
+
author: 'Автор'
|
42
|
+
answers: 'Ответов'
|
43
|
+
viewa: 'Просмотров'
|
44
|
+
mark_all_as_read: 'Отметить все как прочитанное'
|
45
|
+
last_message: 'Последний ответ'
|
46
|
+
topic_subject:
|
47
|
+
author: "Автор: %{author}"
|
48
|
+
|
49
|
+
topics:
|
50
|
+
new:
|
51
|
+
name: 'Название темы'
|
52
|
+
description: 'Описание'
|
53
|
+
post_text: ''
|
54
|
+
create_new_topic_in: "Создать новую тему в '%{topic_name}'"
|
55
|
+
show:
|
56
|
+
messages_in_topic: "Сообщений в теме: %{count}"
|
57
|
+
user_info:
|
58
|
+
user_posts_count: "%{count} сообщений"
|
59
|
+
quick_answer:
|
60
|
+
quick_answer: 'Быстрый ответ'
|
61
|
+
advanced_answer: 'Расширенный ответ'
|
62
|
+
post:
|
63
|
+
sent: "Отправленно: %{datetime}"
|
64
|
+
|
65
|
+
users:
|
66
|
+
signin:
|
67
|
+
sign_in_head: 'Вход на форум'
|
68
|
+
login: 'Логин'
|
69
|
+
password: 'Пароль'
|
70
|
+
enter: 'Войти'
|
71
|
+
forgot_password: 'Восстановить пароль'
|
72
|
+
new:
|
73
|
+
login: 'Логин'
|
74
|
+
email: 'E-mail'
|
75
|
+
password: 'Пароль'
|
76
|
+
register_new_user: 'Регистрация нового участника'
|
77
|
+
register: 'Зарегестрироваться'
|
78
|
+
forgot_password:
|
79
|
+
forgot_password_head: 'Восстановление пароля'
|
80
|
+
reset_password: 'Сбросить пароль'
|
81
|
+
edit:
|
82
|
+
edit_profile: 'Редактирование персональных данных'
|
83
|
+
email: 'Электронная почта'
|
84
|
+
current_password: 'Текущий пароль'
|
85
|
+
new_password: 'Новый пароль'
|
86
|
+
|
87
|
+
|
88
|
+
private_messages:
|
89
|
+
sidebar:
|
90
|
+
inbox: 'Входящие'
|
91
|
+
outbox: 'Отправленные'
|
92
|
+
deleted: 'Удаленные'
|
93
|
+
new:
|
94
|
+
recipient: 'Кому'
|
95
|
+
subject: 'Тема'
|
96
|
+
body: 'Сообщение'
|
97
|
+
create:
|
98
|
+
cant_find_recipient: 'Ошибка, пользователя адресата не существует'
|
99
|
+
|
100
|
+
|
101
|
+
layouts:
|
102
|
+
my_forum:
|
103
|
+
user_navbar:
|
104
|
+
welcome_to_forum: 'Добро пожаловать'
|
105
|
+
private_messages: 'Личные сообщения'
|
106
|
+
new_forum_messages: 'Непрочитанные темы'
|
107
|
+
user_profile: 'Профиль'
|
108
|
+
logout: 'Выход'
|
109
|
+
guest_navbar:
|
110
|
+
login: 'Войти'
|
111
|
+
register: 'Зарегестрироваться'
|
112
|
+
|
113
|
+
activerecord:
|
114
|
+
errors:
|
115
|
+
models:
|
116
|
+
my_forum/user:
|
117
|
+
attributes:
|
118
|
+
login:
|
119
|
+
taken: 'Занят'
|
120
|
+
email:
|
121
|
+
taken: 'Занят'
|