elabs 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -0
  3. data/CHANGELOG.md +83 -0
  4. data/Gemfile +3 -1
  5. data/Gemfile.lock +9 -2
  6. data/ROADMAP.md +6 -11
  7. data/app/assets/stylesheets/elabs/_icons.scss +8 -4
  8. data/app/assets/stylesheets/elabs/app/_badges.scss +11 -0
  9. data/app/assets/stylesheets/elabs/app/_layout.scss +10 -2
  10. data/app/assets/stylesheets/elabs/app/_users.scss +7 -0
  11. data/app/assets/stylesheets/elabs/app/admin-members/_indexes.scss +2 -1
  12. data/app/assets/stylesheets/elabs/app/mixins/_content-card.scss +4 -0
  13. data/app/assets/stylesheets/elabs/app/mixins/_content-full.scss +17 -5
  14. data/app/assets/stylesheets/elabs/lib/knacss/_knacss-variables.scss +16 -15
  15. data/app/assets/stylesheets/elabs/lib/knacss/_knacss.scss +1 -1
  16. data/app/assets/stylesheets/elabs/style.scss +1 -0
  17. data/app/controllers/elabs/acts_controller.rb +1 -1
  18. data/app/controllers/elabs/admin/admin_content_application_controller.rb +13 -6
  19. data/app/controllers/elabs/admin/languages_controller.rb +4 -4
  20. data/app/controllers/elabs/admin/licenses_controller.rb +2 -2
  21. data/app/controllers/elabs/admin/tags_controller.rb +3 -3
  22. data/app/controllers/elabs/concerns/elabs_controller.rb +1 -0
  23. data/app/controllers/elabs/content_application_controller.rb +1 -1
  24. data/app/controllers/elabs/elabs_application_controller.rb +0 -73
  25. data/app/controllers/elabs/elabs_public_controller.rb +80 -0
  26. data/app/controllers/elabs/languages_controller.rb +3 -3
  27. data/app/controllers/elabs/licenses_controller.rb +3 -3
  28. data/app/controllers/elabs/member/member_content_application_controller.rb +24 -14
  29. data/app/controllers/elabs/member/notifications_controller.rb +30 -0
  30. data/app/controllers/elabs/member/preferences_controller.rb +1 -1
  31. data/app/controllers/elabs/member/users_controller.rb +8 -5
  32. data/app/controllers/elabs/reports_controller.rb +2 -2
  33. data/app/controllers/elabs/tags_controller.rb +2 -2
  34. data/app/controllers/elabs/users_controller.rb +3 -3
  35. data/app/helpers/elabs/admin_content_helper.rb +8 -24
  36. data/app/helpers/elabs/application_helper.rb +1 -1
  37. data/app/helpers/elabs/content_helper.rb +39 -0
  38. data/app/helpers/elabs/form_helper.rb +22 -10
  39. data/app/helpers/elabs/member_content_helper.rb +5 -22
  40. data/app/helpers/elabs/notification_helper.rb +69 -0
  41. data/app/helpers/elabs/thumbnails_helper.rb +15 -0
  42. data/app/helpers/elabs/time_helper.rb +7 -0
  43. data/app/models/elabs/application_content_record.rb +1 -0
  44. data/app/models/elabs/application_record.rb +2 -0
  45. data/app/models/elabs/comment.rb +14 -0
  46. data/app/models/elabs/concerns/actable_entity.rb +0 -12
  47. data/app/models/elabs/concerns/content_entity.rb +23 -0
  48. data/app/models/elabs/concerns/notifiable_entity.rb +46 -0
  49. data/app/models/elabs/notification.rb +10 -0
  50. data/app/models/elabs/preference.rb +2 -0
  51. data/app/models/elabs/report.rb +10 -0
  52. data/app/models/elabs/user.rb +26 -6
  53. data/app/views/elabs/acts/_act.json.jbuilder +7 -2
  54. data/app/views/elabs/acts/index.json.jbuilder +1 -1
  55. data/app/views/elabs/admin/albums/_album.json.jbuilder +15 -2
  56. data/app/views/elabs/admin/albums/index.html.haml +1 -1
  57. data/app/views/elabs/admin/albums/index.json.jbuilder +1 -1
  58. data/app/views/elabs/admin/articles/_article.json.jbuilder +15 -2
  59. data/app/views/elabs/admin/articles/index.html.haml +1 -1
  60. data/app/views/elabs/admin/articles/index.json.jbuilder +1 -1
  61. data/app/views/elabs/admin/languages/_language.json.jbuilder +9 -2
  62. data/app/views/elabs/admin/languages/index.html.haml +1 -1
  63. data/app/views/elabs/admin/languages/index.json.jbuilder +1 -1
  64. data/app/views/elabs/admin/licenses/_license.json.jbuilder +10 -2
  65. data/app/views/elabs/admin/licenses/index.html.haml +1 -1
  66. data/app/views/elabs/admin/licenses/index.json.jbuilder +1 -1
  67. data/app/views/elabs/admin/notes/_note.json.jbuilder +13 -2
  68. data/app/views/elabs/admin/notes/index.html.haml +1 -1
  69. data/app/views/elabs/admin/notes/index.json.jbuilder +1 -1
  70. data/app/views/elabs/admin/projects/_project.json.jbuilder +20 -2
  71. data/app/views/elabs/admin/projects/index.html.haml +1 -1
  72. data/app/views/elabs/admin/projects/index.json.jbuilder +1 -1
  73. data/app/views/elabs/admin/reports/_report.json.jbuilder +10 -0
  74. data/app/views/elabs/admin/reports/index.html.haml +1 -1
  75. data/app/views/elabs/admin/reports/index.json.jbuilder +1 -1
  76. data/app/views/elabs/admin/tags/_tag.json.jbuilder +8 -2
  77. data/app/views/elabs/admin/tags/index.html.haml +1 -1
  78. data/app/views/elabs/admin/tags/index.json.jbuilder +1 -1
  79. data/app/views/elabs/admin/uploads/_upload.json.jbuilder +17 -2
  80. data/app/views/elabs/admin/uploads/index.html.haml +1 -1
  81. data/app/views/elabs/admin/uploads/index.json.jbuilder +1 -1
  82. data/app/views/elabs/admin/users/_user.json.jbuilder +14 -0
  83. data/app/views/elabs/admin/users/index.html.haml +6 -2
  84. data/app/views/elabs/admin/users/index.json.jbuilder +1 -1
  85. data/app/views/elabs/admin/users/show.html.haml +1 -1
  86. data/app/views/elabs/admin/users/show.json.jbuilder +1 -1
  87. data/app/views/elabs/albums/_album.html.haml +2 -2
  88. data/app/views/elabs/albums/_album.json.jbuilder +12 -2
  89. data/app/views/elabs/albums/index.json.jbuilder +1 -1
  90. data/app/views/elabs/albums/show.html.haml +7 -7
  91. data/app/views/elabs/albums/show.json.jbuilder +1 -1
  92. data/app/views/elabs/articles/_article.html.haml +2 -2
  93. data/app/views/elabs/articles/_article.json.jbuilder +12 -2
  94. data/app/views/elabs/articles/index.json.jbuilder +1 -1
  95. data/app/views/elabs/articles/show.html.haml +6 -6
  96. data/app/views/elabs/articles/show.json.jbuilder +1 -1
  97. data/app/views/elabs/auth/registrations/edit.html.haml +8 -5
  98. data/app/views/elabs/comments/_comment.json.jbuilder +10 -2
  99. data/app/views/elabs/comments/_comments.html.haml +2 -2
  100. data/app/views/elabs/languages/_language.json.jbuilder +9 -2
  101. data/app/views/elabs/languages/index.json.jbuilder +1 -1
  102. data/app/views/elabs/languages/show.html.haml +1 -1
  103. data/app/views/elabs/languages/show.json.jbuilder +1 -1
  104. data/app/views/elabs/layouts/_menu.html.haml +10 -5
  105. data/app/views/elabs/licenses/_license.json.jbuilder +10 -2
  106. data/app/views/elabs/licenses/index.json.jbuilder +1 -1
  107. data/app/views/elabs/licenses/show.html.haml +2 -6
  108. data/app/views/elabs/member/albums/_album.json.jbuilder +15 -2
  109. data/app/views/elabs/member/albums/index.html.haml +1 -1
  110. data/app/views/elabs/member/albums/index.json.jbuilder +1 -1
  111. data/app/views/elabs/member/articles/_article.json.jbuilder +15 -2
  112. data/app/views/elabs/member/articles/index.html.haml +1 -1
  113. data/app/views/elabs/member/articles/index.json.jbuilder +1 -1
  114. data/app/views/elabs/member/layouts/_empty.html.haml +3 -2
  115. data/app/views/elabs/member/notes/_note.json.jbuilder +13 -2
  116. data/app/views/elabs/member/notes/index.html.haml +1 -1
  117. data/app/views/elabs/member/notes/index.json.jbuilder +1 -1
  118. data/app/views/elabs/member/notifications/_notification.json.jbuilder +8 -0
  119. data/app/views/elabs/member/notifications/index.html.haml +21 -0
  120. data/app/views/elabs/member/notifications/index.json.jbuilder +1 -0
  121. data/app/views/elabs/member/preferences/_form.html.haml +6 -0
  122. data/app/views/elabs/member/preferences/edit.html.haml +2 -1
  123. data/app/views/elabs/member/projects/_project.json.jbuilder +20 -2
  124. data/app/views/elabs/member/projects/index.html.haml +1 -1
  125. data/app/views/elabs/member/projects/index.json.jbuilder +1 -1
  126. data/app/views/elabs/member/uploads/_upload.json.jbuilder +17 -2
  127. data/app/views/elabs/member/uploads/index.html.haml +1 -1
  128. data/app/views/elabs/member/uploads/index.json.jbuilder +1 -1
  129. data/app/views/elabs/member/users/_form.html.haml +14 -9
  130. data/app/views/elabs/member/users/edit.html.haml +7 -0
  131. data/app/views/elabs/notes/_note.html.haml +2 -2
  132. data/app/views/elabs/notes/_note.json.jbuilder +10 -2
  133. data/app/views/elabs/notes/index.json.jbuilder +1 -1
  134. data/app/views/elabs/notes/show.html.haml +5 -5
  135. data/app/views/elabs/notes/show.json.jbuilder +1 -1
  136. data/app/views/elabs/projects/_project.html.haml +2 -2
  137. data/app/views/elabs/projects/_project.json.jbuilder +17 -0
  138. data/app/views/elabs/projects/index.json.jbuilder +1 -1
  139. data/app/views/elabs/projects/show.html.haml +14 -11
  140. data/app/views/elabs/projects/show.json.jbuilder +1 -1
  141. data/app/views/elabs/tags/_tag.json.jbuilder +8 -2
  142. data/app/views/elabs/tags/index.json.jbuilder +1 -1
  143. data/app/views/elabs/tags/show.json.jbuilder +1 -1
  144. data/app/views/elabs/uploads/_upload.html.haml +1 -1
  145. data/app/views/elabs/uploads/_upload.json.jbuilder +14 -2
  146. data/app/views/elabs/uploads/index.json.jbuilder +1 -1
  147. data/app/views/elabs/uploads/show.html.haml +12 -3
  148. data/app/views/elabs/uploads/show.json.jbuilder +1 -1
  149. data/app/views/elabs/users/_user.html.haml +10 -3
  150. data/app/views/elabs/users/_user.json.jbuilder +14 -2
  151. data/app/views/elabs/users/index.json.jbuilder +1 -1
  152. data/app/views/elabs/users/show.html.haml +15 -10
  153. data/app/views/elabs/users/show.json.jbuilder +1 -1
  154. data/config/routes.rb +21 -16
  155. data/db/migrate/20180910000015_remove_license_timestamps.rb +6 -0
  156. data/db/migrate/20180910175012_create_notifications.rb +13 -0
  157. data/db/migrate/20180913093027_add_fields_in_preferences.rb +6 -0
  158. data/docs/migrating.md +14 -0
  159. data/docs/setup.md +1 -0
  160. data/lib/elabs.rb +3 -0
  161. data/lib/elabs/version.rb +1 -1
  162. data/lib/generators/elabs/required_assets_generator.rb +1 -1
  163. data/lib/generators/templates/elabs.rb +6 -0
  164. data/locale/app.pot +73 -14
  165. data/locale/en/app.edit.po +71 -12
  166. data/locale/en/app.po +71 -12
  167. data/locale/fr/app.edit.po +76 -17
  168. data/locale/fr/app.po +75 -16
  169. data/package.json +4 -4
  170. metadata +19 -5
  171. data/app/assets/images/elabs/preview_placeholder.png +0 -0
  172. data/app/assets/images/elabs/preview_placeholder_nsfw.png +0 -0
  173. data/app/views/elabs/admin/users/_admin_user.json.jbuilder +0 -2
@@ -1 +1 @@
1
- json.array! @users, partial: 'admin_users/admin_user', as: :user
1
+ json.array! @users, partial: 'user', as: :user
@@ -20,7 +20,7 @@
20
20
  = @user.real_name
21
21
  %li
22
22
  %strong= _('Subscription date:')
23
- = @user.created_at
23
+ = short_date @user.created_at
24
24
 
25
25
  %dt= _('Bio')
26
26
  = markdown(@user.biography || '')
@@ -1 +1 @@
1
- json.partial! 'admin_users/admin_user', user: @user
1
+ json.partial! 'user', user: @user
@@ -11,13 +11,13 @@
11
11
  %li
12
12
  = icon('user', ['fw'])
13
13
  %strong= _('User:')
14
- = link_to album.user.username, album.user
14
+ = link_to album.user.display_name, album.user
15
15
  %li
16
16
  = icon('language', ['fw'])
17
17
  %strong= _('Language:')
18
18
  = link_to album.language.name, album.language
19
19
  %li
20
- = icon('copyright', ['fw'])
20
+ = icon('license', ['fw'])
21
21
  %strong= _('License:')
22
22
  = link_to album.license.name, album.license
23
23
  %li
@@ -1,2 +1,12 @@
1
- json.extract! album, :id, :name, :description, :sfw, :published, :hidden_in_history, :user_id, :language, :license_id, :created_at, :updated_at
2
- json.url album_url(album, format: :json)
1
+ json.extract! album,
2
+ :id,
3
+ :name,
4
+ :description,
5
+ :sfw,
6
+ :uploads_count,
7
+ :user_id,
8
+ :license_id,
9
+ :language_id,
10
+ :published_at,
11
+ :created_at,
12
+ :updated_at
@@ -1 +1 @@
1
- json.array! @albums, partial: 'albums/album', as: :album
1
+ json.array! @albums, partial: 'album', as: :album
@@ -9,19 +9,19 @@
9
9
  %li
10
10
  = icon('user', ['fw'])
11
11
  %strong= _('Author:')
12
- = link_to @album.user.username, @album.user
12
+ = link_to @album.user.display_name, @album.user
13
13
 
14
14
  %li
15
15
  = icon('calendar-check', ['fw'])
16
16
  %strong= _('Published at:')
17
- .date= @album.published_at
17
+ = short_date @album.published_at
18
18
 
19
19
  %li
20
20
  = icon('calendar', ['fw'])
21
21
  %strong= _('Updated at:')
22
- .date= @album.updated_at
22
+ = short_date @album.updated_at
23
23
 
24
- %li
24
+ %li.separator
25
25
  = icon('info', ['fw'])
26
26
  %strong= _('SFW:')
27
27
  = boolean_icon_tag @album.sfw, 'is-sfw', 'is-nsfw'
@@ -32,11 +32,11 @@
32
32
  = link_to @album.language.name, @album.language
33
33
 
34
34
  %li
35
- = icon('copyright', ['fw'])
35
+ = icon('license', ['fw'])
36
36
  %strong= _('License:')
37
- .license= link_to @album.license.name, @album.license
37
+ = link_to @album.license.name, @album.license
38
38
 
39
- %li
39
+ %li.separator
40
40
  = icon('upload', ['fw'])
41
41
  %strong= _('Uploads:')
42
42
  = @album.uploads_count
@@ -1 +1 @@
1
- json.partial! 'albums/album', album: @album
1
+ json.partial! 'album', album: @album
@@ -11,13 +11,13 @@
11
11
  %li
12
12
  = icon('user', ['fw'])
13
13
  %strong= _('User:')
14
- = link_to article.user.username, article.user
14
+ = link_to article.user.display_name, article.user
15
15
  %li
16
16
  = icon('language', ['fw'])
17
17
  %strong= _('Language:')
18
18
  = link_to article.language.name, article.language
19
19
  %li
20
- = icon('copyright', ['fw'])
20
+ = icon('license', ['fw'])
21
21
  %strong= _('License:')
22
22
  = link_to article.license.name, article.license
23
23
  %li
@@ -1,2 +1,12 @@
1
- json.extract! article, :id, :title, :excerpt, :content, :sfw, :locked, :published_at, :hidden_in_history, :user_id, :license_id, :language_id, :created_at, :updated_at
2
- json.url article_url(article, format: :json)
1
+ json.extract! article,
2
+ :id,
3
+ :title,
4
+ :excerpt,
5
+ :content,
6
+ :sfw,
7
+ :user_id,
8
+ :license_id,
9
+ :language_id,
10
+ :published_at,
11
+ :created_at,
12
+ :updated_at
@@ -1 +1 @@
1
- json.array! @articles, partial: 'articles/article', as: :article
1
+ json.array! @articles, partial: 'article', as: :article
@@ -9,25 +9,25 @@
9
9
  %li
10
10
  = icon('user', ['fw'])
11
11
  %strong= _('Author:')
12
- = link_to @article.user.username, @article.user
12
+ = link_to @article.user.display_name, @article.user
13
13
  %li
14
14
  = icon('calendar-check', ['fw'])
15
15
  %strong= _('Published at:')
16
- = @article.published_at
16
+ = short_date @article.published_at
17
17
  %li
18
18
  = icon('calendar', ['fw'])
19
19
  %strong= _('Updated at:')
20
- = @article.updated_at
21
- %li
20
+ = short_date @article.updated_at
21
+ %li.separator
22
22
  = icon('info', ['fw'])
23
23
  %strong= _('SFW:')
24
- = @article.sfw
24
+ = boolean_icon_tag @article.sfw, 'is-sfw', 'is-nsfw'
25
25
  %li
26
26
  = icon('language', ['fw'])
27
27
  %strong= _('Language:')
28
28
  = link_to @article.language.name, @article.language
29
29
  %li
30
- = icon('copyright', ['fw'])
30
+ = icon('license', ['fw'])
31
31
  %strong= _('License:')
32
32
  = link_to @article.license.name, @article.license
33
33
 
@@ -1 +1 @@
1
- json.partial! 'articles/article', article: @article
1
+ json.partial! 'article', article: @article
@@ -1,13 +1,16 @@
1
1
  - @page_title = _('Account')
2
2
 
3
- %h2= _('About')
4
- = render 'elabs/member/users/form'
5
-
6
3
  = form_for(resource, as: resource_name, url: { controller: 'elabs/auth/registrations', action: :update },
7
4
  html: { method: :put }) do |f|
8
- = devise_error_messages!
5
+ - if resource.errors.any?
6
+ .error
7
+ %h2= format(n_('An error prevented your account from being updated:',
8
+ '%<nb>i errors prevented your account from being updated:',
9
+ resource.errors.count), nb: resource.errors.count)
10
+ %ul
11
+ - resource.errors.full_messages.each do |message|
12
+ %li= message
9
13
 
10
- %h2.separator= _('Sensitive changes')
11
14
  .field
12
15
  = f.label :current_password
13
16
  .field-input
@@ -1,2 +1,10 @@
1
- json.extract! comment, :id, :content_id, :content_type, :name, :email, :comment, :allow_contact, :user_id, :deleted, :created_at, :updated_at
2
- json.url comment_url(comment, format: :json)
1
+ json.extract! comment,
2
+ :id,
3
+ :content_id,
4
+ :content_type,
5
+ :name,
6
+ :comment,
7
+ :user,
8
+ :deleted,
9
+ :created_at,
10
+ :updated_at
@@ -11,11 +11,11 @@
11
11
  %ul.informations
12
12
  %li
13
13
  = icon('user', ['fw'])
14
- = comment.name || link_to("@#{comment.user.username}", comment.user)
14
+ = comment.name || link_to(comment.user.display_name, comment.user)
15
15
  %li
16
16
  = icon('calendar', ['fw'])
17
17
  %strong= _('Posted on:')
18
- = comment.created_at
18
+ = short_date comment.created_at
19
19
  %article= markdown comment.comment
20
20
 
21
21
  = render 'elabs/comments/form', url: url, new_comment: new_comment
@@ -1,2 +1,9 @@
1
- json.extract! language, :id, :iso639_1, :name
2
- json.url language_url(language, format: :json)
1
+ json.extract! language,
2
+ :id,
3
+ :iso639_1,
4
+ :name,
5
+ :albums_count,
6
+ :articles_count,
7
+ :notes_count,
8
+ :projects_count,
9
+ :uploads_count
@@ -1 +1 @@
1
- json.array! @languages, partial: 'languages/language', as: :language
1
+ json.array! @languages, partial: 'language', as: :language
@@ -7,7 +7,7 @@
7
7
  = icon('info', ['fw'])
8
8
  %strong= _('ISO 639-1 code')
9
9
  = @language.iso639_1
10
- %li
10
+ %li.separator
11
11
  = icon('amount', ['fw'])
12
12
  %b= _('Albums:')
13
13
  = @language.albums_count
@@ -1 +1 @@
1
- json.partial! 'languages/language', language: @language
1
+ json.partial! 'language', language: @language
@@ -33,18 +33,23 @@
33
33
 
34
34
  - if user_signed_in?
35
35
  %header.page__menu.page__menu--member
36
- %span.page__menu__title= format(_('%<s>s:'), s: current_user.username)
36
+ %span.page__menu__title= format(_('%<s>s:'), s: current_user.display_name)
37
37
 
38
38
  .page__menu__group
39
+ = active_link_to _('Projects'), :member_projects
39
40
  = active_link_to _('Articles'), :member_articles
40
41
  = active_link_to _('Notes'), :member_notes
41
- = active_link_to _('Uploads'), :member_uploads
42
42
  = active_link_to _('Albums'), :member_albums
43
- = active_link_to _('Projects'), :member_projects
43
+ = active_link_to _('Uploads'), :member_uploads
44
44
 
45
45
  .page__menu__group
46
+ = active_link_to _('Infos'), :member_edit_infos
46
47
  = active_link_to _('Preferences'), :member_edit_preferences
47
48
  = active_link_to _('Account'), edit_user_registration_path
49
+ = active_link_to member_notifications_path do
50
+ = _('Notifications')
51
+ - if notification_count.positive?
52
+ %span.badge.badge--notification= notification_count
48
53
  = active_link_to _('Log out'), destroy_user_session_path, method: :delete
49
54
 
50
55
  - if current_user.admin?
@@ -52,10 +57,10 @@
52
57
  %span.page__menu__title= _('Administration:')
53
58
 
54
59
  .page__menu__group
55
- = active_link_to _('Albums'), :admin_albums
60
+ = active_link_to _('Projects'), :admin_projects
56
61
  = active_link_to _('Articles'), :admin_articles
57
62
  = active_link_to _('Notes'), :admin_notes
58
- = active_link_to _('Projects'), :admin_projects
63
+ = active_link_to _('Albums'), :admin_albums
59
64
  = active_link_to _('Uploads'), :admin_uploads
60
65
  .page__menu__group
61
66
  = active_link_to _('Tags'), :admin_tags
@@ -1,2 +1,10 @@
1
- json.extract! license, :id, :name, :url, :tldr_url, :icon, :created_at, :updated_at
2
- json.url license_url(license, format: :json)
1
+ json.extract! license, :id,
2
+ :name,
3
+ :url,
4
+ :tldr_url,
5
+ :icon,
6
+ :albums_count,
7
+ :articles_count,
8
+ :notes_count,
9
+ :projects_count,
10
+ :uploads_count
@@ -1 +1 @@
1
- json.array! @licenses, partial: 'licenses/license', as: :license
1
+ json.array! @licenses, partial: 'license', as: :license
@@ -1,19 +1,15 @@
1
- - @page_title = @license.name
1
+ - @page_title = "#{icon @license.icon, ['fw'], 'fab'} #{@license.name}".html_safe
2
2
 
3
3
  .license.license--full
4
4
  %aside
5
5
  %ul
6
- %li
7
- = icon('info', ['fw'])
8
- %strong= _('Icon:')
9
- = icon @license.icon, ['fw'], 'fab'
10
6
  %li
11
7
  = icon('home', ['fw'])
12
8
  = link_to _('Home page'), @license.url, target: '_blank'
13
9
  %li
14
10
  = icon('meh', ['fw'])
15
11
  = link_to _('TL; DR'), @license.tldr_url, target: '_blank'
16
- %li
12
+ %li.separator
17
13
  = icon('amount', ['fw'])
18
14
  %strong= _('Albums:')
19
15
  = @license.albums_count
@@ -1,2 +1,15 @@
1
- json.extract! album, :id, :name, :description, :sfw, :published, :hidden_in_history, :user_id, :language, :license_id, :created_at, :updated_at
2
- json.url album_url(album, format: :json)
1
+ json.extract! album,
2
+ :id,
3
+ :name,
4
+ :description,
5
+ :sfw,
6
+ :published,
7
+ :locked,
8
+ :hidden_in_history,
9
+ :uploads_count,
10
+ :user_id,
11
+ :license_id,
12
+ :language_id,
13
+ :published_at,
14
+ :created_at,
15
+ :updated_at
@@ -30,7 +30,7 @@
30
30
  %td.is-icon= boolean_icon_tag album.published
31
31
  %td.is-icon= boolean_icon_tag album.locked, 'lock', 'unlock'
32
32
  %td.is-icon= boolean_icon_tag album.hidden_in_history
33
- %td= album.published_at
33
+ %td= short_date album.published_at
34
34
  %td= album.language.name
35
35
  %td
36
36
  = license_icon album.license
@@ -1 +1 @@
1
- json.array! @albums, partial: 'albums/album', as: :album
1
+ json.array! @albums, partial: 'album', as: :album
@@ -1,2 +1,15 @@
1
- json.extract! article, :id, :title, :excerpt, :content, :sfw, :published, :locked, :published_at, :hidden_in_history, :user_id, :license_id, :language_id, :created_at, :updated_at
2
- json.url article_url(article, format: :json)
1
+ json.extract! article,
2
+ :id,
3
+ :title,
4
+ :excerpt,
5
+ :content,
6
+ :sfw,
7
+ :published,
8
+ :locked,
9
+ :hidden_in_history,
10
+ :user_id,
11
+ :license_id,
12
+ :language_id,
13
+ :published_at,
14
+ :created_at,
15
+ :updated_at
@@ -29,7 +29,7 @@
29
29
  %td.is-icon= boolean_icon_tag article.published
30
30
  %td.is-icon= boolean_icon_tag article.locked, 'lock', 'unlock'
31
31
  %td.is-icon= boolean_icon_tag article.hidden_in_history
32
- %td= article.published_at
32
+ %td= short_date article.published_at
33
33
  %td
34
34
  = license_icon article.license
35
35
  = article.license.name
@@ -1 +1 @@
1
- json.array! @articles, partial: 'articles/article', as: :article
1
+ json.array! @articles, partial: 'article', as: :article
@@ -1,4 +1,5 @@
1
1
  .empty.empty--big
2
2
  .empty__title= _('This space is empty')
3
- .empty__subtitle
4
- = link_to _('Create some content'), link, class: 'btn btn--large, btn--new'
3
+ - if defined? link
4
+ .empty__subtitle
5
+ = link_to _('Create some content'), link, class: 'btn btn--large, btn--new'
@@ -1,2 +1,13 @@
1
- json.extract! note, :id, :content, :sfw, :hidden_in_history, :user_id, :license_id, :language_id, :created_at, :updated_at
2
- json.url note_url(note, format: :json)
1
+ json.extract! note,
2
+ :id,
3
+ :content,
4
+ :sfw,
5
+ :published,
6
+ :locked,
7
+ :hidden_in_history,
8
+ :user_id,
9
+ :license_id,
10
+ :language_id,
11
+ :published_at,
12
+ :created_at,
13
+ :updated_at
@@ -29,7 +29,7 @@
29
29
  %td.is-icon= boolean_icon_tag note.published
30
30
  %td.is-icon= boolean_icon_tag note.locked, 'lock', 'unlock'
31
31
  %td.is-icon= boolean_icon_tag note.hidden_in_history
32
- %td= note.published_at
32
+ %td= short_date note.published_at
33
33
  %td
34
34
  = license_icon note.license
35
35
  = note.license.name
@@ -1 +1 @@
1
- json.array! @notes, partial: 'notes/note', as: :note
1
+ json.array! @notes, partial: 'note', as: :note
@@ -0,0 +1,8 @@
1
+ json.extract! notification,
2
+ :id,
3
+ :content,
4
+ :event,
5
+ :user_id,
6
+ :source_user_id,
7
+ :created_at,
8
+ :updated_at