biovision-base 0.15.180415 → 0.15.180502
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/biovision/base/biovision.js +9 -0
- data/app/assets/stylesheets/biovision/base/admin.scss +18 -1
- data/app/controllers/my/index_controller.rb +1 -5
- data/app/controllers/my/profiles_controller.rb +3 -1
- data/app/controllers/my/tokens_controller.rb +1 -2
- data/app/controllers/profile_controller.rb +9 -0
- data/app/views/layouts/profile/_sidebar.html.erb +15 -0
- data/app/views/layouts/profile.html.erb +10 -3
- data/app/views/my/index/index/_sidebar.html.erb +15 -13
- data/app/views/my/index/index.html.erb +1 -10
- data/app/views/shared/_breadcrumbs_profile.html.erb +7 -0
- data/db/migrate/20170302000101_create_privileges.rb +2 -0
- data/lib/biovision/base/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a1498261b5c92964dc68ed231731b1edbe106d0b41e1cae16c10527ec1891d4
|
4
|
+
data.tar.gz: e4968f3a7396a9d54d95840ea4435a6198c85a12db44519b06738e7261c12016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b96d1c6787eea0003c5e8d0c5341385761a75348944d9d7212ef31e7b03b9575ff43b8feb88b648d1e492abde88549bb12a41724714ca456be99b0020edc1be
|
7
|
+
data.tar.gz: f35baf097a33a05fa6c1deaf62823a92657942f40f7e0bdd41dfd832869cad03b17a57d7af2bf2fa9c0d2643ab4ea28d19b1a9e90609b90af6c02a6cee1d2751
|
@@ -442,13 +442,22 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
442
442
|
|
443
443
|
document.querySelectorAll('form[data-remote]').forEach(function (form) {
|
444
444
|
const button = form.querySelector('button[type=submit]');
|
445
|
+
const loading_message = form.querySelector('.loading_message');
|
445
446
|
|
446
447
|
form.addEventListener('ajax:before', function () {
|
447
448
|
button.disabled = true;
|
449
|
+
|
450
|
+
if (loading_message) {
|
451
|
+
loading_message.classList.remove('hidden');
|
452
|
+
}
|
448
453
|
});
|
449
454
|
|
450
455
|
form.addEventListener('ajax:complete', function () {
|
451
456
|
button.disabled = false;
|
457
|
+
|
458
|
+
if (loading_message) {
|
459
|
+
loading_message.classList.add('hidden');
|
460
|
+
}
|
452
461
|
});
|
453
462
|
});
|
454
463
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
:root {
|
2
2
|
--content-width: #{$content-width};
|
3
3
|
--content-width-min: #{$content-width-min};
|
4
|
+
--spacer-xs: .5rem;
|
5
|
+
--spacer-s: 1rem;
|
4
6
|
}
|
5
7
|
|
6
8
|
html {
|
@@ -135,7 +137,7 @@ article {
|
|
135
137
|
min-width: 1ch;
|
136
138
|
}
|
137
139
|
|
138
|
-
input:not([type=checkbox]):not([type=radio]):not([size]):not([type=date]):not([max]),
|
140
|
+
input:not([type=checkbox]):not([type=radio]):not([size]):not([type=date]):not([max]):not([min]),
|
139
141
|
textarea {
|
140
142
|
width: 100%;
|
141
143
|
}
|
@@ -192,6 +194,21 @@ article {
|
|
192
194
|
}
|
193
195
|
}
|
194
196
|
|
197
|
+
.list-of-entities {
|
198
|
+
.data {
|
199
|
+
> div:first-of-type {
|
200
|
+
margin-bottom: var(--spacer-xs);
|
201
|
+
}
|
202
|
+
|
203
|
+
nav {
|
204
|
+
margin: var(--spacer-s) 0;
|
205
|
+
|
206
|
+
a:not(:last-of-type) {
|
207
|
+
margin-right: var(--spacer-xs);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
195
212
|
|
196
213
|
nav.admin-breadcrumbs {
|
197
214
|
margin-bottom: .8rem;
|
@@ -4,6 +4,8 @@ class My::ProfilesController < ApplicationController
|
|
4
4
|
before_action :redirect_authorized_user, only: [:new, :create]
|
5
5
|
before_action :restrict_anonymous_access, except: [:new, :create]
|
6
6
|
|
7
|
+
layout 'profile', only: [:show, :edit]
|
8
|
+
|
7
9
|
# get /my/profile/new
|
8
10
|
def new
|
9
11
|
@entity = User.new
|
@@ -40,7 +42,7 @@ class My::ProfilesController < ApplicationController
|
|
40
42
|
protected
|
41
43
|
|
42
44
|
def redirect_authorized_user
|
43
|
-
redirect_to
|
45
|
+
redirect_to my_path if current_user.is_a? User
|
44
46
|
end
|
45
47
|
|
46
48
|
def create_user
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="sidebar">
|
2
|
+
<nav>
|
3
|
+
<ul>
|
4
|
+
<li><%= render 'my/profiles/nav_item' %></li>
|
5
|
+
<li><%= render 'my/tokens/nav_item' %></li>
|
6
|
+
<li><%= render 'my/login_attempts/nav_item' %></li>
|
7
|
+
<%= render 'my/index/sidebar/biovision_courses' if Gem.loaded_specs.key?('biovision-courses') %>
|
8
|
+
<%= render 'my/index/index/custom_sidebar' %>
|
9
|
+
<% if UserPrivilege.user_has_any_privilege?(current_user) %>
|
10
|
+
<li><%= link_to t('admin.index.index.heading'), admin_path %></li>
|
11
|
+
<% end %>
|
12
|
+
<li><%= link_to t(:logout), logout_path, method: :delete %></li>
|
13
|
+
</ul>
|
14
|
+
</nav>
|
15
|
+
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<meta charset="UTF-8"/>
|
5
5
|
<title><%= yield :meta_title %></title>
|
6
|
-
<%= stylesheet_link_tag '
|
6
|
+
<%= stylesheet_link_tag 'application', media: 'all' %>
|
7
7
|
<%= javascript_include_tag 'application' %>
|
8
8
|
<%= csrf_meta_tags %>
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
@@ -13,9 +13,16 @@
|
|
13
13
|
|
14
14
|
<main id="main">
|
15
15
|
<%= render 'shared/flash_messages' %>
|
16
|
-
<%= render 'shared/
|
16
|
+
<%= render 'shared/breadcrumbs_profile' %>
|
17
17
|
|
18
|
-
|
18
|
+
<div id="profile-content">
|
19
|
+
<% unless content_for?(:hide_sidebar) || current_user.nil? %>
|
20
|
+
<%= render 'layouts/profile/sidebar' %>
|
21
|
+
<% end %>
|
22
|
+
<div class="content">
|
23
|
+
<%= yield %>
|
24
|
+
</div>
|
25
|
+
</div>
|
19
26
|
</main>
|
20
27
|
|
21
28
|
<%= render 'layouts/profile/footer' %>
|
@@ -1,13 +1,15 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</
|
1
|
+
<div class="sidebar">
|
2
|
+
<nav>
|
3
|
+
<ul>
|
4
|
+
<li><%= render 'my/profiles/nav_item' %></li>
|
5
|
+
<li><%= render 'my/tokens/nav_item' %></li>
|
6
|
+
<li><%= render 'my/login_attempts/nav_item' %></li>
|
7
|
+
<%= render 'my/index/sidebar/biovision_courses' if Gem.loaded_specs.key?('biovision-courses') %>
|
8
|
+
<%= render 'my/index/index/custom_sidebar' %>
|
9
|
+
<% if UserPrivilege.user_has_any_privilege?(current_user) %>
|
10
|
+
<li><%= link_to t('admin.index.index.heading'), admin_path %></li>
|
11
|
+
<% end %>
|
12
|
+
<li><%= link_to t(:logout), logout_path, method: :delete %></li>
|
13
|
+
</ul>
|
14
|
+
</nav>
|
15
|
+
</div>
|
@@ -1,14 +1,5 @@
|
|
1
1
|
<% content_for :meta_title, t('.title') %>
|
2
|
-
<% content_for :breadcrumbs do %>
|
3
|
-
<span><%= t('.heading') %></span>
|
4
|
-
<% end %>
|
5
2
|
|
6
3
|
<article id="my-index" class="profile-content">
|
7
|
-
|
8
|
-
<%= render 'my/index/index/sidebar' %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="content">
|
12
|
-
<%= render 'my/index/index/dashboard' %>
|
13
|
-
</div>
|
4
|
+
<%= render 'my/index/index/dashboard' %>
|
14
5
|
</article>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biovision-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.180502
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxim Khan-Magomedov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- app/controllers/my/tokens_controller.rb
|
254
254
|
- app/controllers/privilege_groups_controller.rb
|
255
255
|
- app/controllers/privileges_controller.rb
|
256
|
+
- app/controllers/profile_controller.rb
|
256
257
|
- app/controllers/profiles_controller.rb
|
257
258
|
- app/controllers/stored_values_controller.rb
|
258
259
|
- app/controllers/tokens_controller.rb
|
@@ -456,6 +457,7 @@ files:
|
|
456
457
|
- app/views/layouts/profile.html.erb
|
457
458
|
- app/views/layouts/profile/_footer.html.erb
|
458
459
|
- app/views/layouts/profile/_header.html.erb
|
460
|
+
- app/views/layouts/profile/_sidebar.html.erb
|
459
461
|
- app/views/layouts/profile/header/_navigation.html.erb
|
460
462
|
- app/views/media_files/_form.html.erb
|
461
463
|
- app/views/media_files/ckeditor.html.erb
|
@@ -505,6 +507,7 @@ files:
|
|
505
507
|
- app/views/profiles/_profile.html.erb
|
506
508
|
- app/views/profiles/show.html.erb
|
507
509
|
- app/views/shared/_breadcrumbs.html.erb
|
510
|
+
- app/views/shared/_breadcrumbs_profile.html.erb
|
508
511
|
- app/views/shared/_counters.html.erb
|
509
512
|
- app/views/shared/_flash_messages.html.erb
|
510
513
|
- app/views/shared/_list_of_errors.html.erb
|