biovision-base 0.11.180127 → 0.14.180326

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -0
  3. data/app/assets/javascripts/biovision/base/biovision-sliders.js +12 -9
  4. data/app/assets/javascripts/biovision/base/biovision.js +187 -2
  5. data/app/assets/stylesheets/biovision/base/admin.scss +84 -40
  6. data/app/assets/stylesheets/biovision/base/biovision.scss +104 -44
  7. data/app/assets/stylesheets/biovision/base/buttons/buttons-common.scss +95 -0
  8. data/app/assets/stylesheets/biovision/base/buttons/buttons-rounded.scss +26 -0
  9. data/app/assets/stylesheets/biovision/base/default.scss +2 -2
  10. data/app/assets/stylesheets/biovision/base/default_admin.scss +1 -1
  11. data/app/assets/stylesheets/biovision/base/default_application.scss +1 -1
  12. data/app/assets/stylesheets/biovision/base/themes/simple-layout.scss +115 -0
  13. data/app/assets/stylesheets/biovision/base/users.scss +15 -0
  14. data/app/controllers/agents_controller.rb +3 -3
  15. data/app/controllers/authentication_controller.rb +4 -4
  16. data/app/controllers/browsers_controller.rb +3 -3
  17. data/app/controllers/codes_controller.rb +2 -2
  18. data/app/controllers/editable_pages_controller.rb +6 -5
  19. data/app/controllers/index_controller.rb +1 -1
  20. data/app/controllers/media_files_controller.rb +3 -3
  21. data/app/controllers/media_folders_controller.rb +3 -3
  22. data/app/controllers/metrics_controller.rb +1 -1
  23. data/app/controllers/my/index_controller.rb +2 -0
  24. data/app/controllers/my/profiles_controller.rb +15 -9
  25. data/app/controllers/privilege_groups_controller.rb +2 -2
  26. data/app/controllers/privileges_controller.rb +3 -3
  27. data/app/controllers/stored_values_controller.rb +2 -2
  28. data/app/controllers/tokens_controller.rb +2 -2
  29. data/app/controllers/users_controller.rb +26 -10
  30. data/app/helpers/biovision_helper.rb +13 -2
  31. data/app/helpers/biovision_users_helper.rb +20 -5
  32. data/app/helpers/codes_helper.rb +1 -1
  33. data/app/helpers/editable_pages_helper.rb +1 -1
  34. data/app/helpers/languages_helper.rb +18 -0
  35. data/app/helpers/media_helper.rb +2 -2
  36. data/app/helpers/privileges_helper.rb +2 -2
  37. data/app/helpers/stored_values_helper.rb +1 -1
  38. data/app/helpers/tracking_helper.rb +2 -2
  39. data/app/models/editable_page.rb +10 -1
  40. data/app/models/user.rb +17 -23
  41. data/app/services/user_manager.rb +15 -18
  42. data/app/services/user_profile_handler.rb +28 -0
  43. data/app/uploaders/avatar_uploader.rb +1 -5
  44. data/app/uploaders/editable_page_image_uploader.rb +1 -1
  45. data/app/views/admin/agents/entity/_in_list.html.erb +3 -3
  46. data/app/views/admin/agents/show.html.erb +10 -2
  47. data/app/views/admin/browsers/entity/_in_list.html.erb +3 -3
  48. data/app/views/admin/browsers/show.html.erb +2 -2
  49. data/app/views/admin/codes/entity/_in_list.html.erb +1 -1
  50. data/app/views/admin/codes/show.html.erb +1 -1
  51. data/app/views/admin/editable_pages/entity/_in_list.html.erb +7 -1
  52. data/app/views/admin/editable_pages/show.html.erb +26 -19
  53. data/app/views/admin/feedback_requests/entity/_in_list.html.erb +1 -1
  54. data/app/views/admin/index/_biovision_base.html.erb +1 -0
  55. data/app/views/admin/media_files/entity/_in_list.html.erb +1 -1
  56. data/app/views/admin/media_files/show.html.erb +2 -2
  57. data/app/views/admin/media_folders/entity/_in_list.html.erb +2 -2
  58. data/app/views/admin/media_folders/files.html.erb +1 -1
  59. data/app/views/admin/media_folders/show.html.erb +6 -4
  60. data/app/views/admin/metrics/_list.html.erb +2 -2
  61. data/app/views/admin/metrics/show.html.erb +2 -2
  62. data/app/views/admin/privilege_groups/entity/_in_list.html.erb +1 -1
  63. data/app/views/admin/privilege_groups/show.html.erb +1 -1
  64. data/app/views/admin/privileges/entity/_in_list.html.erb +4 -4
  65. data/app/views/admin/privileges/show.html.erb +4 -4
  66. data/app/views/admin/privileges/users.html.erb +1 -1
  67. data/app/views/admin/stored_values/entity/_in_list.html.erb +1 -1
  68. data/app/views/admin/stored_values/show.html.erb +1 -1
  69. data/app/views/admin/tokens/entity/_in_list.html.erb +2 -2
  70. data/app/views/admin/tokens/show.html.erb +2 -2
  71. data/app/views/admin/users/codes.html.erb +1 -1
  72. data/app/views/admin/users/entity/_in_list.html.erb +3 -2
  73. data/app/views/admin/users/entity/_privilege.html.erb +1 -1
  74. data/app/views/admin/users/entity/_profile.html.erb +17 -0
  75. data/app/views/admin/users/privileges.html.erb +1 -1
  76. data/app/views/admin/users/search.jbuilder +2 -2
  77. data/app/views/admin/users/show.html.erb +34 -49
  78. data/app/views/admin/users/tokens.html.erb +1 -1
  79. data/app/views/agents/_agent.jbuilder +1 -1
  80. data/app/views/agents/edit.html.erb +1 -1
  81. data/app/views/authentication/_form.html.erb +1 -1
  82. data/app/views/authentication/create.jbuilder +10 -0
  83. data/app/views/browsers/edit.html.erb +1 -1
  84. data/app/views/codes/edit.html.erb +1 -1
  85. data/app/views/editable_pages/_form.html.erb +116 -61
  86. data/app/views/editable_pages/edit.html.erb +1 -1
  87. data/app/views/index/index.html.erb +8 -6
  88. data/app/views/index/index/_custom_dashboard.html.erb +0 -0
  89. data/app/views/index/index/_default_dashboard.html.erb +2 -0
  90. data/app/views/index/index/_editable.html.erb +9 -0
  91. data/app/views/layouts/admin/_header.html.erb +1 -1
  92. data/app/views/layouts/application/_header.html.erb +1 -1
  93. data/app/views/layouts/application/header/authentication/_links.html.erb +3 -3
  94. data/app/views/layouts/application/header/authentication/_plate.html.erb +1 -1
  95. data/app/views/layouts/profile.html.erb +23 -0
  96. data/app/views/layouts/profile/_footer.html.erb +11 -0
  97. data/app/views/layouts/profile/_header.html.erb +9 -0
  98. data/app/views/layouts/profile/header/_navigation.html.erb +0 -0
  99. data/app/views/media_files/edit.html.erb +1 -1
  100. data/app/views/media_folders/_form.html.erb +0 -2
  101. data/app/views/media_folders/edit.html.erb +1 -1
  102. data/app/views/media_folders/new.html.erb +1 -1
  103. data/app/views/metrics/edit.html.erb +2 -2
  104. data/app/views/my/index/index.html.erb +9 -14
  105. data/app/views/my/index/index/_dashboard.html.erb +12 -0
  106. data/app/views/my/index/index/_sidebar.html.erb +11 -0
  107. data/app/views/my/login_attempts/index.html.erb +1 -1
  108. data/app/views/my/profiles/_nav_item.html.erb +1 -1
  109. data/app/views/my/profiles/edit.js.erb +1 -0
  110. data/app/views/my/profiles/edit/_form.html.erb +130 -116
  111. data/app/views/my/profiles/edit/form/_profile_data.html.erb +53 -0
  112. data/app/views/my/profiles/new.js.erb +1 -0
  113. data/app/views/my/profiles/new/_form.html.erb +100 -53
  114. data/app/views/my/tokens/_toggleable.html.erb +1 -1
  115. data/app/views/my/tokens/index.html.erb +1 -1
  116. data/app/views/privilege_groups/edit.html.erb +1 -1
  117. data/app/views/privileges/edit.html.erb +1 -1
  118. data/app/views/profiles/_profile.html.erb +5 -6
  119. data/app/views/shared/_pagination.jbuilder +4 -0
  120. data/app/views/shared/admin/_list_with_priority.html.erb +6 -1
  121. data/app/views/shared/forms/_list_of_errors.js.erb +2 -0
  122. data/app/views/shared/forms/_wysiwyg.html.erb +11 -0
  123. data/app/views/shared/forms/errors.js.erb +5 -0
  124. data/app/views/stored_values/edit.html.erb +1 -1
  125. data/app/views/tokens/edit.html.erb +1 -1
  126. data/app/views/users/_form.html.erb +141 -83
  127. data/app/views/users/check.jbuilder +4 -0
  128. data/app/views/users/edit.html.erb +1 -1
  129. data/app/views/users/form/_profile_data.html.erb +53 -0
  130. data/app/views/users/new.html.erb +1 -1
  131. data/config/locales/common-en.yml +2 -0
  132. data/config/locales/common-ru.yml +2 -0
  133. data/config/locales/editable-pages-en.yml +5 -4
  134. data/config/locales/editable-pages-ru.yml +5 -4
  135. data/config/locales/users-en.yml +388 -0
  136. data/config/locales/users-ru.yml +8 -3
  137. data/config/routes.rb +127 -103
  138. data/db/migrate/20170302000001_create_users.rb +2 -0
  139. data/db/migrate/20170320000000_create_editable_pages.rb +1 -1
  140. data/db/migrate/20180321000000_add_profile_data_to_users.rb +31 -0
  141. data/lib/biovision/base/base_methods.rb +37 -7
  142. data/lib/biovision/base/engine.rb +1 -1
  143. data/lib/biovision/base/privilege_methods.rb +1 -1
  144. data/lib/biovision/base/version.rb +1 -1
  145. metadata +27 -6
  146. data/app/assets/stylesheets/biovision/base/buttons.scss +0 -195
  147. data/app/assets/stylesheets/biovision/base/layout.scss +0 -193
  148. data/app/views/editable_pages/form/_ckeditor.html.erb +0 -11
  149. data/db/migrate/20170302000002_create_user_profiles.rb +0 -21
@@ -9,7 +9,7 @@
9
9
  <h1><%= t('admin.tokens.index.heading') %></h1>
10
10
 
11
11
  <ul class="actions">
12
- <li><%= back_icon(admin_user_path(@entity.id)) %></li>
12
+ <li><%= back_icon(admin_user_path(id: @entity.id)) %></li>
13
13
  </ul>
14
14
 
15
15
  <%= paginate @collection %>
@@ -14,7 +14,7 @@ json.agent do
14
14
  json.value agent.active
15
15
  end
16
16
  end
17
- json.url api_agent_path(agent)
17
+ json.url api_agent_path(id: agent.id)
18
18
  json.browser agent.browser.nil? ? nil : agent.browser.name
19
19
  json.html render(partial: 'admin/agents/entity/in_list', locals: { agent: agent }, formats: [:html] )
20
20
  end
@@ -9,7 +9,7 @@
9
9
  <h1><%= t('.title') %></h1>
10
10
 
11
11
  <ul class="actions">
12
- <li><%= return_icon(admin_agent_path(@entity.id)) %></li>
12
+ <li><%= return_icon(admin_agent_path(id: @entity.id)) %></li>
13
13
  <li class="danger"><%= destroy_icon @entity %></li>
14
14
  </ul>
15
15
 
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  </div>
12
12
  <div class="actions">
13
- <%= button_tag t('.log_in'), type: 'submit' %>
13
+ <%= button_tag t('.log_in'), type: 'submit', class: 'button-action' %>
14
14
  <%= link_to t('my.profiles.new.title'), new_my_profile_path, class: 'button-nav' %>
15
15
  </div>
16
16
  <% end %>
@@ -0,0 +1,10 @@
1
+ json.data do
2
+ json.id @user.id
3
+ json.type @user.class.table_name
4
+ json.attributes do
5
+ json.(@user, :screen_name, :email)
6
+ end
7
+ end
8
+ json.links do
9
+ json.return_path @return_path
10
+ end
@@ -9,7 +9,7 @@
9
9
  <h1><%= t('.title') %></h1>
10
10
 
11
11
  <ul class="actions">
12
- <li><%= back_icon(admin_browser_path(@entity.id)) %></li>
12
+ <li><%= back_icon(admin_browser_path(id: @entity.id)) %></li>
13
13
  <li class="danger"><%= destroy_icon(@entity) %></li>
14
14
  </ul>
15
15
 
@@ -9,7 +9,7 @@
9
9
  <h1><%= t('.title') %></h1>
10
10
 
11
11
  <ul class="actions">
12
- <li><%= return_icon(admin_code_path(@entity.id)) %></li>
12
+ <li><%= return_icon(admin_code_path(id: @entity.id)) %></li>
13
13
  <li class="danger"><%= destroy_icon(@entity) %></li>
14
14
  </ul>
15
15
 
@@ -1,63 +1,118 @@
1
- <%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
2
-
3
- <%= form_for entity do |f| %>
4
- <figure class="preview" id="editable_page-image">
5
- <% if entity.image.blank? %>
6
- <% image_path = 'biovision/base/placeholders/image.svg' %>
7
- <% else %>
8
- <% image_path = entity.image.url %>
9
- <% end %>
10
- <%= label_tag(:editable_page_image, image_tag(image_path, alt: t('activerecord.attributes.editable_page.image'))) %>
11
- <figcaption>
12
- <%= f.label :image %>
13
- <%= f.file_field :image, accept: 'image/jpeg,image/png', data: { image: 'editable_page-image' } %>
14
- <div class="guideline"><%= t('.guidelines.image') %></div>
15
- </figcaption>
16
- </figure>
17
-
18
- <dl>
19
- <% if entity.id.nil? %>
20
- <dt><%= f.label :slug %></dt>
21
- <dd>
22
- <%= f.text_field :slug, required: true %>
23
- <div class="guideline"><%= t('.guidelines.slug') %></div>
24
- </dd>
25
- <% end %>
26
-
27
- <dt><%= f.label :name %></dt>
28
- <dd>
29
- <%= f.text_field :name, required: true, size: nil, maxlength: 100 %>
30
- <div class="guideline"><%= t('.guidelines.name') %></div>
31
- </dd>
32
-
33
- <dt><%= f.label :title %></dt>
34
- <dd>
35
- <%= f.text_field :title, size: nil, maxlength: 200 %>
36
- <div class="guideline"><%= t('.guidelines.title') %></div>
37
- </dd>
38
-
39
- <dt><%= f.label :keywords %></dt>
40
- <dd>
41
- <%= f.text_field :keywords, size: nil, maxlength: 250 %>
42
- <div class="guideline"><%= t('.guidelines.keywords') %></div>
43
- </dd>
44
-
45
- <dt><%= f.label :description %></dt>
46
- <dd>
47
- <%= f.text_field :description, size: nil, maxlength: 250 %>
48
- <div class="guideline"><%= t('.guidelines.description') %></div>
49
- </dd>
50
-
51
- <dt><%= f.label :body %></dt>
52
- <dd>
53
- <%= f.text_area :body, cols: 80, rows: 25, required: true %>
54
- <div class="guideline"><%= t('.guidelines.body') %></div>
55
- </dd>
56
- </dl>
57
-
58
- <div class="buttons">
59
- <%= f.button t(:save), type: :submit %>
60
- </div>
1
+ <%= form_with(model: entity, html: { id: "#{entity.class.to_s.underscore}-form" }) do |f| %>
2
+ <%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
3
+
4
+ <dl>
5
+ <dt><%= f.label :language_id %></dt>
6
+ <dd><%= f.select :language_id, languages_for_select %></dd>
7
+
8
+ <dt><%= f.label :slug %></dt>
9
+ <dd>
10
+ <%=
11
+ f.text_field(
12
+ :slug,
13
+ id: :editable_page_slug,
14
+ size: nil,
15
+ maxlength: EditablePage::SLUG_LIMIT,
16
+ required: true
17
+ )
18
+ %>
19
+ <div class="guideline"><%= t('.guidelines.slug') %></div>
20
+ </dd>
21
+
22
+ <dt><%= f.label :image %></dt>
23
+ <dd>
24
+ <figure class="preview" role="group" id="editable_page-image">
25
+ <% if entity.image.blank? %>
26
+ <%= f.label :image, image_tag('biovision/base/placeholders/image.svg') %>
27
+ <% else %>
28
+ <%= f.label :image, image_tag(entity.image.medium.url) %>
29
+ <% end %>
30
+ <figcaption>
31
+ <%=
32
+ f.file_field(
33
+ :image,
34
+ id: :editable_page_image,
35
+ accept: 'image/jpeg,image/png',
36
+ data: { image: 'editable_page-image' }
37
+ )
38
+ %>
39
+ </figcaption>
40
+ </figure>
41
+ <div class="guideline"><%= t('.guidelines.image') %></div>
42
+ </dd>
43
+
44
+ <dt><%= f.label :name %></dt>
45
+ <dd>
46
+ <%=
47
+ f.text_field(
48
+ :name,
49
+ id: :editable_page_name,
50
+ size: nil,
51
+ maxlength: EditablePage::NAME_LIMIT,
52
+ required: true
53
+ )
54
+ %>
55
+ <div class="guideline"><%= t('.guidelines.name') %></div>
56
+ </dd>
57
+
58
+ <dt><%= f.label :title %></dt>
59
+ <dd>
60
+ <%=
61
+ f.text_field(
62
+ :title,
63
+ id: :editable_page_title,
64
+ size: nil,
65
+ maxlength: EditablePage::META_LIMIT
66
+ )
67
+ %>
68
+ <div class="guideline"><%= t('.guidelines.title') %></div>
69
+ </dd>
70
+
71
+ <dt><%= f.label :keywords %></dt>
72
+ <dd>
73
+ <%=
74
+ f.text_field(
75
+ :keywords,
76
+ id: :editable_page_keywords,
77
+ size: nil,
78
+ maxlength: EditablePage::META_LIMIT
79
+ )
80
+ %>
81
+ <div class="guideline"><%= t('.guidelines.keywords') %></div>
82
+ </dd>
83
+
84
+ <dt><%= f.label :description %></dt>
85
+ <dd>
86
+ <%=
87
+ f.text_field(
88
+ :description,
89
+ id: :editable_page_description,
90
+ size: nil,
91
+ maxlength: EditablePage::META_LIMIT
92
+ )
93
+ %>
94
+ <div class="guideline"><%= t('.guidelines.description') %></div>
95
+ </dd>
96
+
97
+ <dt><%= f.label :body %></dt>
98
+ <dd>
99
+ <%=
100
+ f.text_area(
101
+ :body,
102
+ id: :editable_page_body,
103
+ cols: 80,
104
+ rows: 25,
105
+ required: true,
106
+ data: { wysiwyg: 1 }
107
+ )
108
+ %>
109
+ <div class="guideline"><%= t('.guidelines.body') %></div>
110
+ </dd>
111
+ </dl>
112
+
113
+ <div class="buttons">
114
+ <%= f.button t(:save), type: :submit, class: 'button-save' %>
115
+ </div>
61
116
  <% end %>
62
117
 
63
- <%= render 'editable_pages/form/ckeditor' %>
118
+ <%= render partial: 'shared/forms/wysiwyg' %>
@@ -9,7 +9,7 @@
9
9
  <h1><%= t('.heading') %></h1>
10
10
 
11
11
  <ul class="actions">
12
- <li><%= return_icon(admin_editable_page_path(@entity.id)) %></li>
12
+ <li><%= return_icon(admin_editable_page_path(id: @entity.id)) %></li>
13
13
  <li class="danger"><%= destroy_icon(@entity) %></li>
14
14
  </ul>
15
15
 
@@ -1,9 +1,11 @@
1
1
  <% if @editable_page.nil? %>
2
- <% content_for :meta_title, t('.title') %>
3
-
4
- <article>
5
-
6
- </article>
2
+ <% content_for :meta_title, t('.title') %>
3
+ <% content_for :meta_title, t('.description') %>
7
4
  <% else %>
8
- <%= render partial: 'editable_pages/editable_page', locals: { entity: @editable_page } %>
5
+ <%= render partial: 'editable_pages/entity/metadata', locals: { entity: @editable_page } %>
9
6
  <% end %>
7
+
8
+ <article id="homepage">
9
+ <%= render partial: 'index/index/editable', locals: { entity: @editable_page } %>
10
+ <%= render 'index/index/default_dashboard' %>
11
+ </article>
File without changes
@@ -0,0 +1,2 @@
1
+ <%= render 'index/index/custom_dashboard' %>
2
+ <%= render 'index/dashboard/biovision_post' if Gem.loaded_specs.key?('biovision-post') %>
@@ -0,0 +1,9 @@
1
+ <% unless entity.nil? %>
2
+ <% unless entity.title.blank? %>
3
+ <h1><%= entity.title %></h1>
4
+ <% end %>
5
+
6
+ <div class="index-editable">
7
+ <%= raw(entity.body) %>
8
+ </div>
9
+ <% end %>
@@ -4,7 +4,7 @@
4
4
  <ul>
5
5
  <% unless current_user.nil? %>
6
6
  <li><%= current_user.screen_name %></li>
7
- <li><%= link_to(t(:logout), logout_path, method: :delete) %></li>
7
+ <li><%= link_to(t(:logout), logout_path, method: :delete, class: 'button-action') %></li>
8
8
  <% end %>
9
9
  </ul>
10
10
  </nav>
@@ -1,4 +1,4 @@
1
- <header>
1
+ <header id="site-header">
2
2
  <div>
3
3
  <%= render 'layouts/application/header/logo' %>
4
4
  <nav>
@@ -1,4 +1,4 @@
1
1
  <div class="links">
2
- <%= link_to(t('authentication.nav_item.log_in'), login_path) %>
3
- <%= link_to(t('authentication.nav_item.join'), new_my_profile_path) %>
4
- </div>
2
+ <%= link_to(t('authentication.nav_item.log_in'), login_path, class: 'button-nav') %>
3
+ <%= link_to(t('authentication.nav_item.join'), new_my_profile_path, class: 'button-nav') %>
4
+ </div>
@@ -1,4 +1,4 @@
1
1
  <div class="plate">
2
2
  <%= link_to current_user.profile_name, my_path, class: "profile" %>
3
- <%= link_to t('authentication.info.logout'), logout_path, method: :delete, class: 'logout' %>
3
+ <%= link_to t('authentication.info.logout'), logout_path, method: :delete, class: 'button-action' %>
4
4
  </div>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= locale %>">
3
+ <head>
4
+ <meta charset="UTF-8"/>
5
+ <title><%= yield :meta_title %></title>
6
+ <%= stylesheet_link_tag 'admin', media: 'all' %>
7
+ <%= javascript_include_tag 'application' %>
8
+ <%= csrf_meta_tags %>
9
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
10
+ </head>
11
+ <body>
12
+ <%= render 'layouts/profile/header' %>
13
+
14
+ <main id="main">
15
+ <%= render 'shared/flash_messages' %>
16
+ <%= render 'shared/breadcrumbs' %>
17
+
18
+ <%= yield %>
19
+ </main>
20
+
21
+ <%= render 'layouts/profile/footer' %>
22
+ </body>
23
+ </html>
@@ -0,0 +1,11 @@
1
+ <footer>
2
+ <div>
3
+ <div class="copyright">&copy; <%= t(:copyright) %></div>
4
+ <nav>
5
+ <ul>
6
+ <li><%= link_to(t('about.index.nav_text'), about_path) %></li>
7
+ <li><%= link_to(t('about.tos.nav_text'), tos_path) %></li>
8
+ </ul>
9
+ </nav>
10
+ </div>
11
+ </footer>
@@ -0,0 +1,9 @@
1
+ <header>
2
+ <div>
3
+ <%= render 'layouts/application/header/logo' %>
4
+ <nav>
5
+ <%= render 'layouts/profile/header/navigation' %>
6
+ </nav>
7
+ <%= render 'layouts/application/header/authentication' %>
8
+ </div>
9
+ </header>
@@ -9,7 +9,7 @@
9
9
  <h1><%= t('.heading') %></h1>
10
10
 
11
11
  <ul class="actions">
12
- <li><%= return_icon(admin_media_file_path(@entity.id)) %></li>
12
+ <li><%= return_icon(admin_media_file_path(id: @entity.id)) %></li>
13
13
  <% unless @entity.locked? %>
14
14
  <li class="danger"><%= destroy_icon(@entity) %></li>
15
15
  <% end %>
@@ -50,5 +50,3 @@
50
50
  <%= f.button t(:save), type: :submit, class: 'button-save' %>
51
51
  </div>
52
52
  <% end %>
53
-
54
- <%= render partial: 'shared/forms/default_ajax_handler', locals: { form_id: 'media-folder-form' } %>
@@ -12,7 +12,7 @@
12
12
  <h1><%= t('.heading') %></h1>
13
13
 
14
14
  <ul class="actions">
15
- <li><%= return_icon(admin_media_folder_path(@entity.id)) %></li>
15
+ <li><%= return_icon(admin_media_folder_path(id: @entity.id)) %></li>
16
16
  <% if @entity.can_be_deleted? %>
17
17
  <li class="danger"><%= destroy_icon(@entity) %></li>
18
18
  <% end %>
@@ -11,7 +11,7 @@
11
11
  <% if @entity.parent.nil? %>
12
12
  <li><%= return_icon(admin_media_folders_path) %></li>
13
13
  <% else %>
14
- <li><%= return_icon(admin_media_folder_path(@entity.parent_id)) %></li>
14
+ <li><%= return_icon(admin_media_folder_path(id: @entity.parent_id)) %></li>
15
15
  <% end %>
16
16
  </ul>
17
17
 
@@ -1,7 +1,7 @@
1
1
  <% content_for :meta_title, t('.title') %>
2
2
  <% content_for :breadcrumbs do %>
3
3
  <%= link_to(t('admin.metrics.nav_item.text'), admin_metrics_path) %>
4
- <%= link_to(@entity.name, admin_metric_path(@entity.id)) %>
4
+ <%= link_to(@entity.name, admin_metric_path(id: @entity.id)) %>
5
5
  <span><%= t(:edit) %></span>
6
6
  <% end %>
7
7
 
@@ -10,7 +10,7 @@
10
10
  <h1><%= t('.heading') %></h1>
11
11
 
12
12
  <ul class="actions">
13
- <li><%= return_icon(admin_metric_path(@entity.id)) %></li>
13
+ <li><%= return_icon(admin_metric_path(id: @entity.id)) %></li>
14
14
  </ul>
15
15
 
16
16
  <%= render partial: 'form', locals: { entity: @entity } %>
@@ -1,19 +1,14 @@
1
1
  <% content_for :meta_title, t('.title') %>
2
+ <% content_for :breadcrumbs do %>
3
+ <span><%= t('.heading') %></span>
4
+ <% end %>
2
5
 
3
- <article class="my-index">
4
- <h1><%= t('.title') %></h1>
6
+ <article id="my-index">
7
+ <div class="sidebar dashboard">
8
+ <%= render 'my/index/index/sidebar' %>
9
+ </div>
5
10
 
6
- <div class="dashboard">
7
- <nav>
8
- <ul>
9
- <li><%= render 'my/profiles/nav_item' %></li>
10
- <li><%= render 'my/tokens/nav_item' %></li>
11
- <li><%= render 'my/login_attempts/nav_item' %></li>
12
- <% if UserPrivilege.user_has_any_privilege?(current_user) %>
13
- <li><%= link_to t('admin.index.index.heading'), admin_path %></li>
14
- <% end %>
15
- <li><%= link_to t(:logout), logout_path, method: :delete %></li>
16
- </ul>
17
- </nav>
11
+ <div class="content">
12
+ <%= render 'my/index/index/dashboard' %>
18
13
  </div>
19
14
  </article>