gdpr_rails 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/policy_manager/application.css +7 -3
- data/app/assets/stylesheets/policy_manager/tabler/dashboard.css +15979 -0
- data/app/controllers/policy_manager/application_controller.rb +12 -1
- data/app/controllers/policy_manager/categories_controller.rb +2 -0
- data/app/controllers/policy_manager/terms_controller.rb +0 -7
- data/app/helpers/policy_manager/application_helper.rb +15 -0
- data/app/models/policy_manager/portability_request.rb +2 -1
- data/app/views/layouts/policy_manager/application.html.erb +21 -66
- data/app/views/layouts/policy_manager/blank.html.erb +34 -0
- data/app/views/policy_manager/401.erb +14 -1
- data/app/views/policy_manager/categories/index.html.erb +36 -19
- data/app/views/policy_manager/categories/show.html.erb +46 -26
- data/app/views/policy_manager/doc.erb +9 -0
- data/app/views/policy_manager/portability_requests/index.html.erb +53 -30
- data/app/views/policy_manager/shared/_footer.erb +27 -0
- data/app/views/policy_manager/shared/_header.erb +100 -0
- data/app/views/policy_manager/terms/_side.erb +42 -0
- data/app/views/policy_manager/terms/edit.html.erb +15 -7
- data/app/views/policy_manager/terms/new.html.erb +16 -5
- data/app/views/policy_manager/terms/show.html.erb +27 -12
- data/app/views/policy_manager/user_portability_requests/index.html.erb +58 -34
- data/app/views/policy_manager/user_terms/pending.html.erb +32 -4
- data/app/views/policy_manager/user_terms/show.html.erb +49 -21
- data/config/routes.rb +3 -1
- data/lib/policy_manager.rb +1 -0
- data/lib/policy_manager/bootstrap_link_renderer.rb +68 -0
- data/lib/policy_manager/exporter.rb +6 -0
- data/lib/policy_manager/exporter/json_link.rb +1 -5
- data/lib/policy_manager/version.rb +1 -1
- data/spec/controllers/policy_manager/categories_controller_spec.rb +32 -1
- data/spec/controllers/policy_manager/terms_controller_spec.rb +1 -31
- data/spec/dummy/log/test.log +15227 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-j/-joLD6bGYWbwr7m8lbVykq-N3VlbwjsslJhFpvIO1M0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5A/5AIrhjjjXhTfhDPF_yhVxN6qDlH7W7my02uwW-21MjE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6s/6svTyA-_cLrryEIxjCg2dFwGFJQhPSq8bfl7NHX-6S8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AZ/AZG0LaS8wP07WA8vP7N6xGcOT1q-p2jPeab90NjvW10.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C_/C_P5dY0UXIhjEA7OrFQd1aofpQ-_F7rDisjiNerCFeE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gk/gkajaBT4J0v708PEXfi7rmWyPyXGbFTU0rbt28hhuCU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ht/HtqVv_OtFVLOaqSfS6SFC1-xHJcXV16Htu4GXJS7Ge8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JX/JXUoRCJSB2Hqb7r8dj7NjeH3GmkBCMgZiXLlDitT9_8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KT/KT-nMmPKXvwiFzLexhvO9mK4-Z16Uy2lgSh-C_2tl2A.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ly/Lype9QbYtOa9M-u3fcbKpnwunSd0vsgm4kC_Ljy3ei8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QL/QLwCOHeeYbzWHu9pvmWf9zGaIVz7Jr8aJqETzRVhj2g.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VO/VOMqAX4P5jY9p79SxqoDgMhcwyV3Ji7NH4ZBRN2C4Eg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X_/X_IvNiCc17UkQfT5hGGeSgXOXQd1jvf9mqLtwgfVBoE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_G/_GWVUnXr5EcwMXjUvdA1DwSGUKeBIFN8_3HqLUuQ2bc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_K/_KRxFH5M3jnffTGbv8MMa9F35zU5K18JLkjYWb8n4K4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dG/Dg4KPTfNIbu-ZWN3w-oz6AOGW2Tnl6wiGMof---xBwM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hf/hfbBpe8z0eauhajpHgM1LKCGRdXHNCfPKmAJG6PziWw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iH/iH-iP8fWBpiKteXxHSgWYNCTvH3PoKU3j9HU7N1beK8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jH/jHf-4aOYfA7SkTW8_sIcQXMi26wGt-lhJPOpLrsXitI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k9/k9YLRLSeoYGPd6U7HVdzqbKDoJ-kHVlHpqDh3yxctjk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lD/lDyaaMV05ckGoGvz03Cr_FziEutVI5z8XmGZwSV2ZpY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rP/rPeQ8umAkR6JSXEzQ6m6oqhlQVPkbF4_C9Rikas9Ziw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sD/sD_kmbR8U3xvyAe4HyDRvQjP0YD47jZyEbmhEbMFgWE.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/se/seYQsoLihjxVNHqBL3F_R5iyDgAdEYJpmMe2BhlMkeo.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sg/sgDzGRWafDZfwXDyiKhxxXXMYcwJd-72HeJTMbEpb3E.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/y4/y4-yGJgEeIDCoxA20rsfXeJYRakmtzwIxmHZLMmAutM.cache +0 -0
- data/spec/dummy/tmp/portability/14/build.zip +0 -0
- data/spec/dummy/tmp/portability/15/build.zip +0 -0
- data/spec/dummy/tmp/portability/17/build.zip +0 -0
- data/spec/dummy/tmp/portability/2/build.zip +0 -0
- metadata +61 -5
- data/app/assets/stylesheets/policy_manager/dashboard.css +0 -99
- data/app/assets/stylesheets/policy_manager/portability_requests.css +0 -4
- data/app/assets/stylesheets/policy_manager/user_portability_requests.css +0 -4
@@ -0,0 +1,27 @@
|
|
1
|
+
<footer class="footer">
|
2
|
+
<div class="container">
|
3
|
+
<div class="row align-items-center flex-row-reverse">
|
4
|
+
<div class="col-auto ml-lg-auto">
|
5
|
+
<div class="row align-items-center">
|
6
|
+
<div class="col-auto">
|
7
|
+
<ul class="list-inline list-inline-dots mb-0">
|
8
|
+
<li class="list-inline-item">
|
9
|
+
<a href="<%= documentation_path %>">
|
10
|
+
Documentation
|
11
|
+
</a>
|
12
|
+
</li>
|
13
|
+
|
14
|
+
</ul>
|
15
|
+
</div>
|
16
|
+
<div class="col-auto">
|
17
|
+
<a href="https://github.com/prey/gdpr_rails" class="btn btn-outline-primary btn-sm">Source code</a>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="col-12 col-lg-auto mt-3 mt-lg-0 text-center">
|
23
|
+
with <i class="fa fa-heart"></i> by <a href=".">Preyproject</a>. Theme by <a href="https://codecalm.net" target="_blank">codecalm.net</a>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</footer>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
<div class="header py-4">
|
2
|
+
<div class="container">
|
3
|
+
<div class="d-flex">
|
4
|
+
|
5
|
+
<a class="header-brand" href="<%= root_url %>">
|
6
|
+
<%= I18n.t("terms_app.sub_title") %>
|
7
|
+
<!--<img src="./demo/brand/tabler.svg" class="header-brand-img" alt="tabler logo">-->
|
8
|
+
</a>
|
9
|
+
|
10
|
+
<div class="d-flex order-lg-2 ml-auto">
|
11
|
+
|
12
|
+
<div class="dropdown">
|
13
|
+
<a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
|
14
|
+
<span class="avatar" style="background-image: url(<%= gravatar_url(controller.current_user, 40)%>)"></span>
|
15
|
+
<span class="ml-2 d-none d-lg-block">
|
16
|
+
<span class="text-default">
|
17
|
+
<%= controller.current_user.email %>
|
18
|
+
</span>
|
19
|
+
<% if PolicyManager::Config.is_admin?(controller.current_user) %>
|
20
|
+
<small class="text-muted d-block mt-1">Administrator</small>
|
21
|
+
<% end %>
|
22
|
+
</span>
|
23
|
+
</a>
|
24
|
+
|
25
|
+
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
26
|
+
<!--
|
27
|
+
<a class="dropdown-item" href="#">
|
28
|
+
<i class="dropdown-icon fe fe-user"></i> Profile
|
29
|
+
</a>
|
30
|
+
<div class="dropdown-divider"></div>
|
31
|
+
-->
|
32
|
+
|
33
|
+
<% if PolicyManager::Config.logout_url.present? %>
|
34
|
+
<a class="dropdown-item" href="<%= PolicyManager::Config.logout_url %>">
|
35
|
+
<i class="dropdown-icon fe fe-log-out"></i>
|
36
|
+
<%= I18n.t("terms_app.sign_out") %>
|
37
|
+
</a>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<a href="#" class="header-toggler d-lg-none ml-3 ml-lg-0" data-toggle="collapse" data-target="#headerMenuCollapse">
|
46
|
+
<span class="header-toggler-icon"></span>
|
47
|
+
</a>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<div class="header collapse d-lg-flex p-0" id="headerMenuCollapse">
|
52
|
+
<div class="container">
|
53
|
+
<div class="row align-items-center">
|
54
|
+
<div class="col-lg order-lg-first">
|
55
|
+
|
56
|
+
<ul class="nav nav-tabs border-0 flex-column flex-lg-row">
|
57
|
+
|
58
|
+
<% if PolicyManager::Config.is_admin?(controller.current_user) %>
|
59
|
+
|
60
|
+
<li class="nav-item">
|
61
|
+
<a class="nav-link" href="<%= categories_path %>">
|
62
|
+
<i class="fas fa-balance-scale"></i>
|
63
|
+
<%= I18n.t("terms_app.menu.policies") %>
|
64
|
+
</a>
|
65
|
+
</li>
|
66
|
+
|
67
|
+
<li class="nav-item">
|
68
|
+
<a class="nav-link" href="<%= portability_requests_path %>">
|
69
|
+
<i class="fas fa-suitcase"></i>
|
70
|
+
<%= I18n.t("terms_app.menu.portability_requests") %>
|
71
|
+
</a>
|
72
|
+
</li>
|
73
|
+
|
74
|
+
<% end %>
|
75
|
+
|
76
|
+
<% if controller.current_user.class.to_s == PolicyManager::Config.user_resource.to_s %>
|
77
|
+
|
78
|
+
<li class="separator"></li>
|
79
|
+
|
80
|
+
<li class="nav-item">
|
81
|
+
<a class="nav-link" href="<%= pending_user_terms_path %>">
|
82
|
+
<i class="fas fa-user-secret"></i>
|
83
|
+
<%= I18n.t("terms_app.menu.user_pending_policies") %>
|
84
|
+
</a>
|
85
|
+
</li>
|
86
|
+
|
87
|
+
<li class="nav-item">
|
88
|
+
<a class="nav-link" href="<%= user_portability_requests_path %>">
|
89
|
+
<i class="fas fa-suitcase"></i>
|
90
|
+
<%= I18n.t("terms_app.menu.user_portability_requests") %>
|
91
|
+
</a>
|
92
|
+
</li>
|
93
|
+
|
94
|
+
<% end %>
|
95
|
+
|
96
|
+
</ul>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
</div>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<div class="col-md-3">
|
2
|
+
<h3 class="page-title mb-5">
|
3
|
+
<%= I18n.t("terms_app.terms.new.title", name: params[:category_id]) %>
|
4
|
+
</h3>
|
5
|
+
<div>
|
6
|
+
<div class="list-group list-group-transparent mb-0">
|
7
|
+
|
8
|
+
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
|
9
|
+
<span class="icon mr-3">
|
10
|
+
<i class="fa fa-check"></i>
|
11
|
+
</span>
|
12
|
+
|
13
|
+
Published Policies on
|
14
|
+
|
15
|
+
<strong>
|
16
|
+
<%= params[:category_id] %>
|
17
|
+
</strong>
|
18
|
+
<span class="ml-auto badge badge-primary">
|
19
|
+
<%= PolicyManager::Term.where(rule: params[:category_id], state: "published").size %>
|
20
|
+
</span>
|
21
|
+
</a>
|
22
|
+
|
23
|
+
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
|
24
|
+
<span class="icon mr-3">
|
25
|
+
<i class="fa fa-exclamation-triangle"></i>
|
26
|
+
</span>
|
27
|
+
|
28
|
+
Draft Policies on
|
29
|
+
<strong><%= params[:category_id] %></strong>
|
30
|
+
|
31
|
+
<span class="ml-auto badge badge-primary">
|
32
|
+
<%= PolicyManager::Term.where(rule: params[:category_id], state: "draft").size %>
|
33
|
+
</span>
|
34
|
+
</a>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
<div class="mt-6">
|
38
|
+
<%= link_to I18n.t("terms_app.terms.index.button"), new_category_term_path(params[:category_id]), class:"btn btn-secondary btn-block" %>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
@@ -1,8 +1,16 @@
|
|
1
|
-
<
|
1
|
+
<div class="row">
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%=
|
3
|
+
<%= render "side" %>
|
4
|
+
<div class="col-md-9">
|
5
|
+
<div class="card">
|
6
|
+
<div class="card-header">
|
7
|
+
<h3 class="card-title">
|
8
|
+
<%= I18n.t("terms_app.terms.edit.title", name: params[:category_id]) %>
|
9
|
+
</h3>
|
10
|
+
</div>
|
11
|
+
<div class="card-body">
|
12
|
+
<%= render 'form', term: @term %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -1,7 +1,18 @@
|
|
1
|
-
<h2><%= I18n.t("terms_app.terms.new.title", name: params[:category_id]) %></h2>
|
2
1
|
|
3
|
-
<div class="float-right">
|
4
|
-
<%= link_to I18n.t("terms_app.misc.back"), category_terms_path(params[:category_id]), class: " btn btn-primary" %>
|
5
|
-
</div>
|
6
2
|
|
7
|
-
|
3
|
+
<div class="row">
|
4
|
+
<%= render "side" %>
|
5
|
+
|
6
|
+
<div class="col-md-9">
|
7
|
+
<div class="card">
|
8
|
+
<div class="card-header">
|
9
|
+
<h3 class="card-title">
|
10
|
+
<%= I18n.t("terms_app.terms.new.title", name: params[:category_id]) %>
|
11
|
+
</h3>
|
12
|
+
</div>
|
13
|
+
<div class="card-body">
|
14
|
+
<%= render 'form', term: @term %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -1,18 +1,33 @@
|
|
1
|
-
<h2
|
1
|
+
<h2>
|
2
|
+
<%= I18n.t("terms_app.terms.show.title") %> <%= @term.rule.name %>
|
3
|
+
</h2>
|
2
4
|
|
3
|
-
<div class="
|
4
|
-
|
5
|
-
|
5
|
+
<div class="card">
|
6
|
+
|
7
|
+
<div class="card-header">
|
8
|
+
<span class="badge-xl badge-pill badge-primary">
|
9
|
+
<%= I18n.t("terms_app.states.#{@term.state}") %>
|
10
|
+
</span>
|
11
|
+
|
12
|
+
<span class="text-muted">
|
13
|
+
<%= I18n.t("terms_app.terms.show.last_update") %>
|
14
|
+
<%= @term.updated_at %>
|
15
|
+
</span>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="card-body">
|
19
|
+
<%= raw @term.to_html %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="card-footer">
|
23
|
+
<div class="float-right">
|
24
|
+
<%= link_to I18n.t("terms_app.misc.back"), category_path(@term.rule.name), class: "btn-sm btn-primary" %>
|
25
|
+
<%= link_to I18n.t("terms_app.misc.edit"), edit_category_term_path(@term.rule.name, @term), class: "btn-sm btn-success" %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
</div>
|
6
29
|
</div>
|
7
30
|
|
8
|
-
<span class="badge badge-pill badge-primary">
|
9
|
-
<%= I18n.t("terms_app.states.#{@term.state}") %>
|
10
|
-
</span>
|
11
31
|
|
12
|
-
<span class="text-muted">
|
13
|
-
<%= I18n.t("terms_app.terms.show.last_update") %> <%= @term.updated_at %>
|
14
|
-
</span>
|
15
32
|
|
16
|
-
<hr />
|
17
33
|
|
18
|
-
<%= raw @term.to_html %>
|
@@ -1,42 +1,66 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
<div class="float-right">
|
3
|
+
<%= link_to I18n.t("terms_app.user_portability_requests.index.button"), user_portability_requests_path, class: "btn btn-success", method: :post, data: { confirm: I18n.t("terms_app.misc.are_you_sure") } %>
|
4
|
+
</div>
|
5
|
+
<h2>
|
6
|
+
<%= I18n.t("terms_app.user_portability_requests.index.title") %>
|
7
|
+
|
8
|
+
</h2>
|
2
9
|
|
3
10
|
<% if @user_portability_requests.any? %>
|
4
|
-
<div class="
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<tbody>
|
17
|
-
<% @user_portability_requests.each do |portability_request| %>
|
11
|
+
<div class="card">
|
12
|
+
|
13
|
+
<div class="card-header">
|
14
|
+
<h3 class="card-title">
|
15
|
+
<%= I18n.t("terms_app.user_portability_requests.index.title") %>
|
16
|
+
</h3>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="table-responsive">
|
20
|
+
<table class="table card-table table-vcenter text-nowrap">
|
21
|
+
<thead>
|
18
22
|
<tr>
|
19
|
-
<
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<% end %>
|
25
|
-
<td><%= portability_request.created_at %></td>
|
26
|
-
<!--<td><%= portability_request.expire_at %></td>-->
|
27
|
-
<td><%= link_to I18n.t("terms_app.user_portability_requests.index.table.destroy"), user_portability_request_url(portability_request.id), method: :delete, data: { confirm: I18n.t("terms_app.misc.are_you_sure") } %></td>
|
23
|
+
<th><%= I18n.t("terms_app.user_portability_requests.index.table.state") %></th>
|
24
|
+
<th><%= I18n.t("terms_app.user_portability_requests.index.table.file") %></th>
|
25
|
+
<th><%= I18n.t("terms_app.user_portability_requests.index.table.created_at") %></th>
|
26
|
+
<!--<th>Expire at</th>-->
|
27
|
+
<th></th>
|
28
28
|
</tr>
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
</thead>
|
30
|
+
|
31
|
+
<tbody>
|
32
|
+
<% @user_portability_requests.each do |portability_request| %>
|
33
|
+
<tr>
|
34
|
+
<td>
|
35
|
+
<span class="tag <%=state_color(portability_request.state)%>">
|
36
|
+
<%= I18n.t("terms_app.user_portability_requests.index.states.#{portability_request.state}") %>
|
37
|
+
</span>
|
38
|
+
</td>
|
39
|
+
<% if portability_request.completed? %>
|
40
|
+
<td>
|
41
|
+
<%= link_to portability_request.attachment.expiring_url(60), class: "btn btn-secondary btn-sm" do %>
|
42
|
+
<i class="fa fa-download"></i>
|
43
|
+
<%= I18n.t("terms_app.misc.download")%>
|
44
|
+
<% end %>
|
45
|
+
</td>
|
46
|
+
<% else %>
|
47
|
+
<td></td>
|
48
|
+
<% end %>
|
49
|
+
<td><%= portability_request.created_at %></td>
|
50
|
+
<!--<td><%= portability_request.expire_at %></td>-->
|
51
|
+
<td><%= link_to I18n.t("terms_app.user_portability_requests.index.table.destroy"), user_portability_request_url(portability_request.id), method: :delete, data: { confirm: I18n.t("terms_app.misc.are_you_sure") }, class: "btn btn-sm btn-danger" %></td>
|
52
|
+
</tr>
|
53
|
+
<% end %>
|
54
|
+
</tbody>
|
55
|
+
</table>
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
|
32
60
|
</div>
|
33
61
|
|
34
|
-
<%= will_paginate @user_portability_requests, :
|
35
|
-
|
36
|
-
<br/>
|
37
|
-
|
62
|
+
<%= will_paginate @user_portability_requests, renderer: PolicyManager::BootstrapLinkRenderer %>
|
63
|
+
|
38
64
|
<% else %>
|
39
65
|
<p><%= I18n.t("terms_app.user_portability_requests.index.empty") %></p>
|
40
|
-
<% end %>
|
41
|
-
|
42
|
-
<%= link_to I18n.t("terms_app.user_portability_requests.index.button"), user_portability_requests_path, class: "btn btn-success", method: :post, data: { confirm: I18n.t("terms_app.misc.are_you_sure") } %>
|
66
|
+
<% end %>
|
@@ -1,11 +1,39 @@
|
|
1
|
+
|
1
2
|
<h2><%= I18n.t("terms_app.user_terms.pending.title") %></h2>
|
2
3
|
|
3
4
|
<% if @pending_policies.size == 0 %>
|
4
|
-
|
5
|
+
|
6
|
+
<div class="alert alert-warning alert-dismissible">
|
7
|
+
<button type="button" class="close invisible" data-dismiss="alert"></button>
|
8
|
+
<%= I18n.t("terms_app.user_terms.pending.empty") %>
|
9
|
+
</div>
|
10
|
+
|
5
11
|
<% else %>
|
6
|
-
|
12
|
+
|
13
|
+
<div class="row row-cards row-deck">
|
7
14
|
<% @pending_policies.each do |category| %>
|
8
|
-
<
|
15
|
+
<div class="col-md-3">
|
16
|
+
<div class="card">
|
17
|
+
<div class="card-status bg-purple"></div>
|
18
|
+
<div class="card-header">
|
19
|
+
<h3 class="card-title">
|
20
|
+
<%= link_to category.name, user_term_path(category.name) %>
|
21
|
+
</h3>
|
22
|
+
</div>
|
23
|
+
<div class="card-body">
|
24
|
+
<%= truncate(category.terms.published.last.to_html.html_safe, length: 25) %>
|
25
|
+
</div>
|
26
|
+
<div class="card-footer">
|
27
|
+
<strong>policy updated at:</strong>
|
28
|
+
<br/>
|
29
|
+
<span class="muted">
|
30
|
+
<%= category.terms.published.last.updated_at %>
|
31
|
+
</span>
|
32
|
+
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
9
36
|
<% end %>
|
10
|
-
</
|
37
|
+
</div>
|
38
|
+
|
11
39
|
<% end %>
|
@@ -1,31 +1,59 @@
|
|
1
|
-
<%= raw @term.to_html %>
|
2
1
|
|
3
|
-
<hr/>
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
<div>
|
8
|
-
<
|
9
|
-
|
3
|
+
<div class="card">
|
4
|
+
|
5
|
+
<div class="card-header">
|
6
|
+
<h3 class="card-title">
|
7
|
+
<%= I18n.t("terms_app.categories.index.title") %> :
|
8
|
+
<strong><%= @term.rule.name %></strong>
|
9
|
+
</h3>
|
10
|
+
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="card-body">
|
14
|
+
<%= raw @term.to_html %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="card-footer">
|
18
|
+
|
19
|
+
<% if @user_term.persisted? && @user_term.state == "accepted" %>
|
20
|
+
|
21
|
+
<div>
|
22
|
+
<strong>
|
23
|
+
<%= I18n.t("terms_app.user_terms.show.accepted.message") %>
|
24
|
+
|
25
|
+
</strong>
|
26
|
+
<br/>
|
27
|
+
|
28
|
+
<%= I18n.t("terms_app.user_terms.show.accepted.question") %>
|
29
|
+
|
30
|
+
<%= form_with model: @user_term, url: reject_user_term_path(params[:id]), method: :put, local: true do |f| %>
|
31
|
+
<%= f.submit I18n.t("terms_app.user_terms.show.accepted.reject"), class: "btn btn-danger" %>
|
32
|
+
<%= link_to I18n.t("terms_app.user_terms.show.pending.not_now"), pending_user_terms_path, class: "btn btn-secondary" %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<% else %>
|
38
|
+
|
39
|
+
<strong>
|
40
|
+
<%= controller.current_user.email %>
|
41
|
+
</strong>
|
42
|
+
|
43
|
+
<%= I18n.t("terms_app.user_terms.show.pending.message") %>
|
44
|
+
|
45
|
+
<%= form_with model: @user_term, url: accept_user_term_path(params[:id]), method: :put, local: true do |f| %>
|
46
|
+
<%= f.submit I18n.t("terms_app.user_terms.show.pending.agree"), class: "btn btn-success" %>
|
47
|
+
<%= link_to I18n.t("terms_app.user_terms.show.pending.not_now"), pending_user_terms_path, class: "btn btn-secondary" %>
|
48
|
+
<% end %>
|
10
49
|
|
11
|
-
<%= form_with model: @user_term, url: reject_user_term_path(params[:id]), method: :put, local: true do |f| %>
|
12
|
-
<%= f.submit I18n.t("terms_app.user_terms.show.accepted.reject"), class: "btn btn-danger" %>
|
13
|
-
<%= link_to I18n.t("terms_app.user_terms.show.pending.not_now"), pending_user_terms_path, class: "btn btn-secondary" %>
|
14
50
|
<% end %>
|
15
51
|
|
16
52
|
</div>
|
17
53
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
</strong> <%= I18n.t("terms_app.user_terms.show.pending.message") %>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
22
57
|
|
23
|
-
<hr/>
|
24
58
|
|
25
|
-
<%= form_with model: @user_term, url: accept_user_term_path(params[:id]), method: :put, local: true do |f| %>
|
26
|
-
<%= f.submit I18n.t("terms_app.user_terms.show.pending.agree"), class: "btn btn-success" %>
|
27
|
-
<%= link_to I18n.t("terms_app.user_terms.show.pending.not_now"), pending_user_terms_path, class: "btn btn-secondary" %>
|
28
|
-
<% end %>
|
29
59
|
|
30
|
-
<hr/>
|
31
|
-
<% end %>
|