my_forum 0.0.1.beta41 → 0.0.1.beta42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f49ca54ed8f98a8d39047f5a1fdc2eafc8355ff
4
- data.tar.gz: b72e39f91d1d662531adbee7359995a7f3eeabd6
3
+ metadata.gz: 50b1db333d9e70df0dc190ede0c0ca5fd0c07b02
4
+ data.tar.gz: 416c97311f6a6383395f7d845dcc6c27a1f1cb49
5
5
  SHA512:
6
- metadata.gz: 22ee46c7a3948a64df8ac5aa7860407a6322da86da287fc835f7ae35c2fd14f2ff318b40104d048821aebe0150cb77b5168a48cfe01f901e0dcd6cb1fbc1ce9e
7
- data.tar.gz: db971a8d40e68057fe2932440f84fddcc2930e6d0a499ca915b9861dd5ccf859740cd7a12ac784ba2600306181fc1604882560aa94c1f542fa3c317e4bac5232
6
+ metadata.gz: 14eb269a8a94b0537d0ae1833a6d6baa639ce6953bd7ee65eae87e0911a65714938dc4af99344a27559fd60f2aafcd65a3308dde0646698dd758621600cad564
7
+ data.tar.gz: 79aa72eb79131a5bef00bfe0696c437a727f274fa277c618f4019f26b1cc151b623479ed8ee7c36b8cc1c073bc07f95cf16f7392f31c96f8d7ed310fe747e0f3
data/README.rdoc CHANGED
@@ -7,6 +7,27 @@ This project rocks and uses MIT-LICENSE.
7
7
  INSTALLATION
8
8
  rake my_forum:install:migrations
9
9
 
10
+
11
+ FAQ
12
+ Q: how to customize urls
13
+ A:
14
+
15
+ Create, for exmaple, my_forum.rb file in your initialize app folder (your_app/config/initializer/my_forum.rb) and rewrite
16
+ methids like this -
17
+
18
+ MyForum::Forum.class_eval do
19
+ def to_param
20
+ "#{id}-something"
21
+ end
22
+ end
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
10
31
  For using existing User model, use somethink like this:
11
32
 
12
33
  Create config/initializers/my_forum.rb with next content:
@@ -1,45 +1,47 @@
1
1
  .profile-popover
2
2
  .row.col-md-12
3
- .row.col-md-6
4
- .row
5
- .col-sm-6
6
- %strong= t('my_forum.profile_popover.posts_count')
7
- .col-sm-6
8
- = user.posts_count
9
- .row
10
- .col-sm-6
11
- %strong= t('my_forum.profile_popover.registered_at')
12
- .col-sm-6
13
- = time(user.created_at)
14
- .row
15
- .col-sm-6
16
- %strong= t('my_forum.profile_popover.status')
17
- .col-sm-6
18
- - is_online = is_online_user?(user.login)
19
- = is_online ? t('my_forum.profile_popover.online') : t('my_forum.profile_popover.offline')
20
- - unless is_online
3
+ - unless current_user
4
+ %p.text-center=t('my_forum.profile_popover.only_for_registereg_users')
5
+ - else
6
+ .row.col-md-6
21
7
  .row
22
8
  .col-sm-6
23
- %strong= t('my_forum.profile_popover.last_online')
9
+ %strong= t('my_forum.profile_popover.posts_count')
24
10
  .col-sm-6
25
- = time(user.updated_at)
26
- .row.pm
27
- .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'
28
-
29
- .row.col-md-6.second_row
30
- .row
31
- .col-sm-5
32
- %strong= t('my_forum.profile_popover.user_name')
33
- .col-sm-7
34
- = user.real_name || '-'
35
- .row
36
- .col-sm-5
37
- %strong= t('my_forum.profile_popover.phone')
38
- .col-sm-7
39
- = user.phone || '-'
40
- .row
41
- .col-sm-5
42
- %strong= t('my_forum.profile_popover.car_info')
43
- .col-sm-7
44
- = user.car_info || '-'
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'
45
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 || '-'
@@ -26,6 +26,7 @@ ru:
26
26
  phone: 'Телефон'
27
27
  car_info: 'Марка авто'
28
28
  write_pm: 'Написать ЛС'
29
+ only_for_registereg_users: 'Доступно только зарегестрированным пользователям'
29
30
 
30
31
  today: "Сегодня в %{hhmm}"
31
32
  yesterday: "Вчера в %{hhmm}"
@@ -1,3 +1,3 @@
1
1
  module MyForum
2
- VERSION = "0.0.1.beta41"
2
+ VERSION = "0.0.1.beta42"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_forum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta41
4
+ version: 0.0.1.beta42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko