slash_admin 1.5.1 → 1.5.2

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
  SHA256:
3
- metadata.gz: a370ada076f5e75847c03295de614ad55fe75a3cc21aea02bb3643dae2112325
4
- data.tar.gz: 263f0df3accd2d6d316bcde3b11c476facd7e724a1c75980ef7ca7d1f358b37f
3
+ metadata.gz: dd6fca0261e85e32892848c0fc3b5ea84e76c839c410a6e0f37d05474cc41b1a
4
+ data.tar.gz: ee1e603f3e4acb9e0ea876f1aba28495ae7686eae58ea7be36dadb95ef68b644
5
5
  SHA512:
6
- metadata.gz: d2418b0341f04bf62b210034f09ad73cee0b02e306f2b52ffe8f32327b2f4a607bbd8c356d4b5940cef4f5c3a28bd495c24cb43fe2a9c3d0162c37aec69d9573
7
- data.tar.gz: c002bf47c5741ce20fbba8a3d9260708794f4e16a7fb35ca56a847650ccc496254c8fe2440737bf6522c26c8385fca45845461f4d09015a83ce78327530b571e
6
+ metadata.gz: 79d797a173c872decb0062ba27623a110870ecf13039953f0c37d7cdad0dedcbe32a3d4b4028ce802e563c7023e25e9bee086f6b4774cd255de095e6a8f26f54
7
+ data.tar.gz: 2df908377331a6a5ed064c6b4a38784bad47d6f07b30d9cb0c7743ffd41918f30b345d53bedeac6db8acf35dd7233511dac88c3699ec0d76860b7177b625d368
@@ -565,6 +565,10 @@ p[data-f-id="pbf"] {
565
565
  padding-left: 8px;
566
566
  }
567
567
 
568
+ .dropdown .dropdown-menu a.dropdown-item {
569
+ color: #7f96ac;
570
+ }
571
+
568
572
  .nav-item {
569
573
  margin: 0;
570
574
  padding: 0;
@@ -10,8 +10,12 @@
10
10
  <div class="navbar-nav mr-auto mt-2 mt-lg-0">
11
11
  </div>
12
12
  <ul class="nav right-nav-fix">
13
- <li class="nav-item">
14
- <a class="nav-link">
13
+ <li class="nav-item <%= can?(:update, current_admin) ? 'dropdown' : '' %>">
14
+ <% if can?(:update, current_admin) %>
15
+ <a class= "nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown">
16
+ <% else %>
17
+ <a class="nav-link">
18
+ <% end %>
15
19
  <% if current_admin.avatar.present? %>
16
20
  <img src="<%= current_admin.avatar.url %>" class="rounded-circle"/>
17
21
  <% else %>
@@ -19,6 +23,13 @@
19
23
  <% end %>
20
24
  <span class=""><%= current_admin.login %></span>
21
25
  </a>
26
+ <% if can?(:update, current_admin) %>
27
+ <div class="dropdown-menu" aria-labelledby="navbarDropdown">
28
+ <a href="<%= edit_slash_admin_admin_path current_admin %>" class="dropdown-item">
29
+ <i class="fas fa-user-circle"></i> <%= t('slash_admin.view.edit_account') %>
30
+ </a>
31
+ </div>
32
+ <% end %>
22
33
  </li>
23
34
 
24
35
  <li class="nav-item">
@@ -13,6 +13,7 @@ en:
13
13
  error: Impossible to create '%{model_name}'
14
14
  success: Operation successed.
15
15
  view:
16
+ edit_account: Edit my Account
16
17
  fill_login_and_password: "Please enter your credentials to proceed."
17
18
  administration: Administration
18
19
  home: Home
@@ -13,6 +13,7 @@ fr:
13
13
  error: Impossible de trier '%{model_name}'
14
14
  success: Opération réussi.
15
15
  view:
16
+ edit_account: Modifier mon Compte
16
17
  fill_login_and_password: "Merci d'entrer votre identifiant et mot de passe."
17
18
  administration: Administration
18
19
  home: Accueil
@@ -1,3 +1,3 @@
1
1
  module SlashAdmin
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slash_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - KOVACS Nicolas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-31 00:00:00.000000000 Z
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -456,7 +456,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
456
456
  - !ruby/object:Gem::Version
457
457
  version: '0'
458
458
  requirements: []
459
- rubygems_version: 3.1.2
459
+ rubygems_version: 3.1.4
460
460
  signing_key:
461
461
  specification_version: 4
462
462
  summary: A modern and overridable admin gem, just the rails way.