biovision-base 0.5.170614
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +42 -0
- data/Rakefile +26 -0
- data/app/assets/config/biovision_base_manifest.js +0 -0
- data/app/assets/images/biovision/base/icons/alert.svg +15 -0
- data/app/assets/images/biovision/base/icons/back.svg +28 -0
- data/app/assets/images/biovision/base/icons/create.svg +1 -0
- data/app/assets/images/biovision/base/icons/destroy.svg +3 -0
- data/app/assets/images/biovision/base/icons/edit.svg +22 -0
- data/app/assets/images/biovision/base/icons/exit.svg +1 -0
- data/app/assets/images/biovision/base/icons/foreign/facebook.svg +1 -0
- data/app/assets/images/biovision/base/icons/gear.svg +4 -0
- data/app/assets/images/biovision/base/icons/lock-closed.svg +1 -0
- data/app/assets/images/biovision/base/icons/lock-open.svg +1 -0
- data/app/assets/images/biovision/base/icons/notice.svg +1 -0
- data/app/assets/images/biovision/base/icons/return.svg +1 -0
- data/app/assets/images/biovision/base/icons/warning.svg +43 -0
- data/app/assets/images/biovision/base/icons/world.svg +4 -0
- data/app/assets/images/biovision/base/placeholders/image.svg +19 -0
- data/app/assets/images/biovision/base/placeholders/photo.svg +23 -0
- data/app/assets/images/biovision/base/placeholders/user.svg +21 -0
- data/app/assets/javascripts/biovision/base/biovision.js +238 -0
- data/app/assets/stylesheets/biovision/base/admin.scss +58 -0
- data/app/assets/stylesheets/biovision/base/biovision.scss +472 -0
- data/app/assets/stylesheets/biovision/base/buttons.scss +90 -0
- data/app/assets/stylesheets/biovision/base/default.scss +45 -0
- data/app/assets/stylesheets/biovision/base/filters.scss +53 -0
- data/app/assets/stylesheets/biovision/base/fonts.scss +9 -0
- data/app/assets/stylesheets/biovision/base/message-box.scss +60 -0
- data/app/assets/stylesheets/biovision/base/pagination.scss +42 -0
- data/app/assets/stylesheets/biovision/base/tootik.scss +385 -0
- data/app/assets/stylesheets/biovision/base/track.scss +28 -0
- data/app/controllers/admin/agents_controller.rb +30 -0
- data/app/controllers/admin/browsers_controller.rb +30 -0
- data/app/controllers/admin/codes_controller.rb +25 -0
- data/app/controllers/admin/editable_pages_controller.rb +25 -0
- data/app/controllers/admin/index_controller.rb +5 -0
- data/app/controllers/admin/metrics_controller.rb +29 -0
- data/app/controllers/admin/privilege_groups_controller.rb +48 -0
- data/app/controllers/admin/privileges_controller.rb +5 -0
- data/app/controllers/admin/tokens_controller.rb +28 -0
- data/app/controllers/admin/users_controller.rb +87 -0
- data/app/controllers/admin_controller.rb +10 -0
- data/app/controllers/agents_controller.rb +67 -0
- data/app/controllers/authentication_controller.rb +70 -0
- data/app/controllers/browsers_controller.rb +63 -0
- data/app/controllers/codes_controller.rb +60 -0
- data/app/controllers/concerns/authentication.rb +19 -0
- data/app/controllers/concerns/biovision/admin/privileges.rb +34 -0
- data/app/controllers/concerns/entity_priority.rb +7 -0
- data/app/controllers/concerns/lockable_entity.rb +23 -0
- data/app/controllers/concerns/toggleable_entity.rb +7 -0
- data/app/controllers/editable_pages_controller.rb +60 -0
- data/app/controllers/index_controller.rb +5 -0
- data/app/controllers/metrics_controller.rb +33 -0
- data/app/controllers/my/confirmations_controller.rb +37 -0
- data/app/controllers/my/index_controller.rb +7 -0
- data/app/controllers/my/profiles_controller.rb +81 -0
- data/app/controllers/my/recoveries_controller.rb +68 -0
- data/app/controllers/privilege_groups_controller.rb +57 -0
- data/app/controllers/privileges_controller.rb +74 -0
- data/app/controllers/profiles_controller.rb +22 -0
- data/app/controllers/tokens_controller.rb +60 -0
- data/app/controllers/users_controller.rb +57 -0
- data/app/helpers/biovision_helper.rb +81 -0
- data/app/helpers/biovision_users_helper.rb +52 -0
- data/app/helpers/codes_helper.rb +10 -0
- data/app/helpers/editable_pages_helper.rb +20 -0
- data/app/helpers/privileges_helper.rb +11 -0
- data/app/helpers/tracking_helper.rb +17 -0
- data/app/jobs/application_job.rb +7 -0
- data/app/jobs/clean_tokens_job.rb +8 -0
- data/app/mailers/code_sender.rb +15 -0
- data/app/models/agent.rb +38 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/browser.rb +22 -0
- data/app/models/code.rb +58 -0
- data/app/models/code_type.rb +11 -0
- data/app/models/concerns/biovision/privilege_base.rb +143 -0
- data/app/models/concerns/biovision/user_base.rb +124 -0
- data/app/models/concerns/biovision/user_privilege_base.rb +46 -0
- data/app/models/concerns/has_owner.rb +19 -0
- data/app/models/concerns/required_unique_name.rb +13 -0
- data/app/models/concerns/required_unique_slug.rb +12 -0
- data/app/models/concerns/toggleable.rb +29 -0
- data/app/models/editable_page.rb +30 -0
- data/app/models/foreign_site.rb +75 -0
- data/app/models/foreign_user.rb +26 -0
- data/app/models/metric.rb +67 -0
- data/app/models/metric_value.rb +15 -0
- data/app/models/privilege.rb +3 -0
- data/app/models/privilege_group.rb +50 -0
- data/app/models/privilege_group_privilege.rb +6 -0
- data/app/models/token.rb +75 -0
- data/app/models/user.rb +3 -0
- data/app/models/user_privilege.rb +3 -0
- data/app/services/canonizer.rb +29 -0
- data/app/services/code_manager.rb +16 -0
- data/app/services/code_manager/confirmation.rb +26 -0
- data/app/services/code_manager/invitation.rb +27 -0
- data/app/services/code_manager/recovery.rb +31 -0
- data/app/uploaders/avatar_uploader.rb +62 -0
- data/app/uploaders/editable_page_image_uploader.rb +38 -0
- data/app/views/admin/agents/_filter.html.erb +16 -0
- data/app/views/admin/agents/_list.html.erb +17 -0
- data/app/views/admin/agents/_nav_item.html.erb +6 -0
- data/app/views/admin/agents/_toggleable.html.erb +7 -0
- data/app/views/admin/agents/entity/_in_list.html.erb +13 -0
- data/app/views/admin/agents/index.html.erb +17 -0
- data/app/views/admin/agents/show.html.erb +28 -0
- data/app/views/admin/browsers/_list.html.erb +17 -0
- data/app/views/admin/browsers/_nav_item.html.erb +6 -0
- data/app/views/admin/browsers/_toggleable.html.erb +7 -0
- data/app/views/admin/browsers/agents/_add.html.erb +79 -0
- data/app/views/admin/browsers/entity/_in_list.html.erb +13 -0
- data/app/views/admin/browsers/index.html.erb +17 -0
- data/app/views/admin/browsers/show.html.erb +29 -0
- data/app/views/admin/codes/_list.html.erb +11 -0
- data/app/views/admin/codes/_nav_item.html.erb +6 -0
- data/app/views/admin/codes/entity/_in_list.html.erb +24 -0
- data/app/views/admin/codes/index.html.erb +16 -0
- data/app/views/admin/codes/show.html.erb +51 -0
- data/app/views/admin/editable_pages/_list.html.erb +11 -0
- data/app/views/admin/editable_pages/_nav_item.html.erb +6 -0
- data/app/views/admin/editable_pages/entity/_in_list.html.erb +13 -0
- data/app/views/admin/editable_pages/index.html.erb +14 -0
- data/app/views/admin/editable_pages/show.html.erb +47 -0
- data/app/views/admin/index/index.html.erb +25 -0
- data/app/views/admin/metrics/_list.html.erb +26 -0
- data/app/views/admin/metrics/_nav_item.html.erb +6 -0
- data/app/views/admin/metrics/data.jbuilder +6 -0
- data/app/views/admin/metrics/index.html.erb +14 -0
- data/app/views/admin/metrics/show.html.erb +52 -0
- data/app/views/admin/privilege_groups/_list.html.erb +11 -0
- data/app/views/admin/privilege_groups/_nav_item.html.erb +6 -0
- data/app/views/admin/privilege_groups/entity/_in_list.html.erb +10 -0
- data/app/views/admin/privilege_groups/index.html.erb +14 -0
- data/app/views/admin/privilege_groups/show.html.erb +31 -0
- data/app/views/admin/privileges/_list.html.erb +15 -0
- data/app/views/admin/privileges/_nav_item.html.erb +6 -0
- data/app/views/admin/privileges/entity/_groups.html.erb +34 -0
- data/app/views/admin/privileges/entity/_in_list.html.erb +25 -0
- data/app/views/admin/privileges/index.html.erb +20 -0
- data/app/views/admin/privileges/show.html.erb +66 -0
- data/app/views/admin/privileges/users.html.erb +24 -0
- data/app/views/admin/tokens/_filter.html.erb +17 -0
- data/app/views/admin/tokens/_list.html.erb +11 -0
- data/app/views/admin/tokens/_nav_item.html.erb +6 -0
- data/app/views/admin/tokens/_toggleable.html.erb +7 -0
- data/app/views/admin/tokens/entity/_in_list.html.erb +25 -0
- data/app/views/admin/tokens/index.html.erb +19 -0
- data/app/views/admin/tokens/show.html.erb +43 -0
- data/app/views/admin/users/_filter.html.erb +22 -0
- data/app/views/admin/users/_list.html.erb +17 -0
- data/app/views/admin/users/_nav_item.html.erb +6 -0
- data/app/views/admin/users/_search.html.erb +5 -0
- data/app/views/admin/users/_toggleable.html.erb +7 -0
- data/app/views/admin/users/codes.html.erb +24 -0
- data/app/views/admin/users/entity/_in_list.html.erb +24 -0
- data/app/views/admin/users/entity/_privilege.html.erb +10 -0
- data/app/views/admin/users/entity/_privilege_tree.html.erb +17 -0
- data/app/views/admin/users/index.html.erb +19 -0
- data/app/views/admin/users/privileges.html.erb +35 -0
- data/app/views/admin/users/search.jbuilder +10 -0
- data/app/views/admin/users/search/_results.html.erb +11 -0
- data/app/views/admin/users/show.html.erb +94 -0
- data/app/views/admin/users/tokens.html.erb +24 -0
- data/app/views/agents/_agent.jbuilder +20 -0
- data/app/views/agents/_filter.html.erb +53 -0
- data/app/views/agents/_form.html.erb +33 -0
- data/app/views/agents/edit.html.erb +17 -0
- data/app/views/agents/index.jbuilder +5 -0
- data/app/views/agents/new.html.erb +15 -0
- data/app/views/agents/show.jbuilder +3 -0
- data/app/views/application/not_found.html.erb +9 -0
- data/app/views/application/not_found.jbuilder +3 -0
- data/app/views/application/service_unavailable.html.erb +9 -0
- data/app/views/application/unauthorized.html.erb +11 -0
- data/app/views/application/unauthorized.jbuilder +3 -0
- data/app/views/authentication/_form.html.erb +16 -0
- data/app/views/authentication/_info.html.erb +8 -0
- data/app/views/authentication/new.html.erb +10 -0
- data/app/views/browsers/_form.html.erb +28 -0
- data/app/views/browsers/edit.html.erb +17 -0
- data/app/views/browsers/new.html.erb +15 -0
- data/app/views/code_sender/email.text.erb +9 -0
- data/app/views/code_sender/password.text.erb +10 -0
- data/app/views/codes/_form.html.erb +49 -0
- data/app/views/codes/edit.html.erb +17 -0
- data/app/views/codes/new.html.erb +15 -0
- data/app/views/editable_pages/_form.html.erb +63 -0
- data/app/views/editable_pages/edit.html.erb +17 -0
- data/app/views/editable_pages/form/_ckeditor.html.erb +11 -0
- data/app/views/editable_pages/new.html.erb +15 -0
- data/app/views/index/index.html.erb +5 -0
- data/app/views/layouts/admin.html.erb +23 -0
- data/app/views/layouts/admin/_footer.html.erb +0 -0
- data/app/views/layouts/admin/_header.html.erb +11 -0
- data/app/views/layouts/admin/header/_logo.html.erb +3 -0
- data/app/views/metrics/_form.html.erb +41 -0
- data/app/views/metrics/edit.html.erb +17 -0
- data/app/views/metrics/index.jbuilder +7 -0
- data/app/views/metrics/show.jbuilder +3 -0
- data/app/views/my/confirmations/show.html.erb +30 -0
- data/app/views/my/index/index.html.erb +17 -0
- data/app/views/my/profiles/edit.html.erb +10 -0
- data/app/views/my/profiles/edit/_form.html.erb +70 -0
- data/app/views/my/profiles/new.html.erb +7 -0
- data/app/views/my/profiles/new/_form.html.erb +34 -0
- data/app/views/my/profiles/show.html.erb +3 -0
- data/app/views/my/recoveries/show.html.erb +39 -0
- data/app/views/privilege_groups/_form.html.erb +25 -0
- data/app/views/privilege_groups/edit.html.erb +17 -0
- data/app/views/privilege_groups/new.html.erb +15 -0
- data/app/views/privileges/_form.html.erb +42 -0
- data/app/views/privileges/edit.html.erb +21 -0
- data/app/views/privileges/new.html.erb +14 -0
- data/app/views/profiles/_profile.html.erb +48 -0
- data/app/views/profiles/show.html.erb +4 -0
- data/app/views/shared/_flash_messages.html.erb +7 -0
- data/app/views/shared/_list_of_errors.html.erb +11 -0
- data/app/views/shared/_meta_texts.html.erb +17 -0
- data/app/views/shared/_nothing_found.html.erb +1 -0
- data/app/views/shared/_track.html.erb +10 -0
- data/app/views/shared/actions/_locks.html.erb +4 -0
- data/app/views/shared/actions/_priority_changer.html.erb +4 -0
- data/app/views/shared/admin/_breadcrumbs.html.erb +6 -0
- data/app/views/shared/editable_pages/_body.html.erb +12 -0
- data/app/views/shared/filter/_flag.html.erb +17 -0
- data/app/views/tokens/_form.html.erb +30 -0
- data/app/views/tokens/edit.html.erb +17 -0
- data/app/views/tokens/new.html.erb +15 -0
- data/app/views/users/_form.html.erb +78 -0
- data/app/views/users/edit.html.erb +18 -0
- data/app/views/users/new.html.erb +15 -0
- data/config/initializers/carrierwave.rb +22 -0
- data/config/initializers/pluralization.rb +2 -0
- data/config/locales/common-ru.yml +96 -0
- data/config/locales/editable-pages-ru.yml +43 -0
- data/config/locales/plurals.rb +17 -0
- data/config/locales/track-ru.yml +102 -0
- data/config/locales/users-ru.yml +324 -0
- data/config/routes.rb +92 -0
- data/db/migrate/20170301000001_create_metrics.rb +23 -0
- data/db/migrate/20170301000002_create_metric_values.rb +19 -0
- data/db/migrate/20170301000101_create_browsers.rb +22 -0
- data/db/migrate/20170301000102_create_agents.rb +22 -0
- data/db/migrate/20170302000001_create_users.rb +52 -0
- data/db/migrate/20170302000002_create_tokens.rb +23 -0
- data/db/migrate/20170302000003_create_code_types.rb +20 -0
- data/db/migrate/20170302000004_create_codes.rb +24 -0
- data/db/migrate/20170302000101_create_privileges.rb +34 -0
- data/db/migrate/20170302000102_create_user_privileges.rb +17 -0
- data/db/migrate/20170302000103_create_privilege_groups.rb +23 -0
- data/db/migrate/20170302000104_create_privilege_group_privileges.rb +24 -0
- data/db/migrate/20170320000000_create_editable_pages.rb +22 -0
- data/db/migrate/20170425000001_create_foreign_sites.rb +18 -0
- data/db/migrate/20170425000002_create_foreign_users.rb +23 -0
- data/lib/biovision/base.rb +9 -0
- data/lib/biovision/base/base_methods.rb +96 -0
- data/lib/biovision/base/engine.rb +17 -0
- data/lib/biovision/base/privilege_methods.rb +35 -0
- data/lib/biovision/base/version.rb +5 -0
- data/lib/tasks/biovision/agents.rake +38 -0
- data/lib/tasks/biovision/base_tasks.rake +4 -0
- data/lib/tasks/biovision/browsers.rake +38 -0
- data/lib/tasks/biovision/codes.rake +49 -0
- data/lib/tasks/biovision/tokens.rake +54 -0
- data/lib/tasks/biovision/users.rake +67 -0
- metadata +467 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
2
|
+
|
3
|
+
<%= form_for entity do |f| %>
|
4
|
+
<dl>
|
5
|
+
<dt><%= t('activerecord.attributes.metric.name') %></dt>
|
6
|
+
<dd>
|
7
|
+
<%= entity.name %>
|
8
|
+
</dd>
|
9
|
+
|
10
|
+
<dt><%= f.label :description %></dt>
|
11
|
+
<dd>
|
12
|
+
<%= f.text_field :description %>
|
13
|
+
<div class="guideline"><%= t('.guidelines.description') %></div>
|
14
|
+
</dd>
|
15
|
+
|
16
|
+
<dt><%= f.label :default_period %></dt>
|
17
|
+
<dd>
|
18
|
+
<%= f.number_field :default_period, in: Metric::PERIOD_RANGE, size: 3, required: true %>
|
19
|
+
<div class="guideline"><%= t('.guidelines.default_period') %></div>
|
20
|
+
</dd>
|
21
|
+
</dl>
|
22
|
+
|
23
|
+
<ul class="flags">
|
24
|
+
<li>
|
25
|
+
<%= f.check_box :incremental %>
|
26
|
+
<%= f.label :incremental %>
|
27
|
+
</li>
|
28
|
+
<li>
|
29
|
+
<%= f.check_box :start_with_zero %>
|
30
|
+
<%= f.label :start_with_zero %>
|
31
|
+
</li>
|
32
|
+
<li>
|
33
|
+
<%= f.check_box :show_on_dashboard %>
|
34
|
+
<%= f.label :show_on_dashboard %>
|
35
|
+
</li>
|
36
|
+
</ul>
|
37
|
+
|
38
|
+
<div class="buttons">
|
39
|
+
<%= f.button t(:save), type: :submit %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('admin.metrics.nav_item.text'), admin_metrics_path) %>
|
4
|
+
<%= link_to(@entity.name, admin_metric_path(@entity.id)) %>
|
5
|
+
<span><%= t(:edit) %></span>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
|
9
|
+
<article class="entity-page">
|
10
|
+
<h1><%= t('.heading') %></h1>
|
11
|
+
|
12
|
+
<ul class="actions">
|
13
|
+
<li><%= return_icon(admin_metric_path(@entity.id)) %></li>
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
<%= render partial: 'form', locals: { entity: @entity } %>
|
17
|
+
</article>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
|
3
|
+
<article>
|
4
|
+
<h1><%= t('.title') %></h1>
|
5
|
+
<% if current_user&.email_confirmed? %>
|
6
|
+
<div class="message-box-notice"><%= t('activerecord.attributes.user.email_confirmed') %></div>
|
7
|
+
<% else %>
|
8
|
+
<section>
|
9
|
+
<h2><%= t('.got_code') %></h2>
|
10
|
+
<%= form_tag my_confirmation_path, method: :patch do %>
|
11
|
+
<div>
|
12
|
+
<%= label_tag :code, t('activerecord.attributes.code.body') %>
|
13
|
+
<%= text_field_tag :code, param_from_request(:code), required: true %>
|
14
|
+
</div>
|
15
|
+
<div>
|
16
|
+
<%= button_tag t('.confirm'), type: :submit %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
</section>
|
20
|
+
|
21
|
+
<section>
|
22
|
+
<h2><%= t('.no_code') %></h2>
|
23
|
+
<%= form_tag my_confirmation_path, method: :post do %>
|
24
|
+
<div>
|
25
|
+
<%= button_tag t('.send_code'), type: :submit %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
</section>
|
29
|
+
<% end %>
|
30
|
+
</article>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
|
3
|
+
<article class="my-index">
|
4
|
+
<h1><%= t('.title') %></h1>
|
5
|
+
|
6
|
+
<div class="dashboard">
|
7
|
+
<nav>
|
8
|
+
<ul>
|
9
|
+
<li>
|
10
|
+
<div><%= link_to t('my.profiles.show.heading'), my_profile_path %></div>
|
11
|
+
<div class="description"><%= t('my.profiles.show.description') %></div>
|
12
|
+
</li>
|
13
|
+
<li><%= link_to t(:logout), logout_path, method: :delete %></li>
|
14
|
+
</ul>
|
15
|
+
</nav>
|
16
|
+
</div>
|
17
|
+
</article>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
|
3
|
+
<article class="profile">
|
4
|
+
<h1><%= current_user.profile_name %></h1>
|
5
|
+
<div>
|
6
|
+
<p><%= link_to t(:view), my_profile_path %></p>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<%= render partial: 'my/profiles/edit/form', locals: { entity: current_user } %>
|
10
|
+
</article>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
2
|
+
|
3
|
+
<%= form_tag my_profile_path, method: :patch, multipart: true do %>
|
4
|
+
<table>
|
5
|
+
<caption><%= t('my.profiles.edit.title') %></caption>
|
6
|
+
<tbody>
|
7
|
+
<tr>
|
8
|
+
<th colspan="2"><%= t('.common_parameters') %></th>
|
9
|
+
</tr>
|
10
|
+
<tr>
|
11
|
+
<td colspan="2">
|
12
|
+
<figure class="preview" id="user-image">
|
13
|
+
<%= image_tag entity.image.profile.url, alt: t(:current_image) %>
|
14
|
+
<figcaption>
|
15
|
+
<%= label_tag :user_image, t('.update_image') %>
|
16
|
+
<%= file_field_tag 'user[image]', accept: 'image/jpeg,image/png', data: { image: 'user-image' } %>
|
17
|
+
</figcaption>
|
18
|
+
</figure>
|
19
|
+
</td>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<th><%= label_tag :user_name, t('activerecord.attributes.user.name') %></th>
|
23
|
+
<td><%= text_field_tag 'user[name]', entity.name, size: 30, maxlength: User::NAME_LIMIT %></td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<th><%= label_tag :user_gender, t('activerecord.attributes.user.gender') %></th>
|
27
|
+
<td>
|
28
|
+
<%= select_tag 'user[gender]', options_for_select(genders_for_select, selected: entity.gender) %>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td colspan="2">
|
33
|
+
<%= hidden_field_tag 'user[allow_mail]', '0' %>
|
34
|
+
<%= check_box_tag 'user[allow_mail]', '1', entity.allow_mail %>
|
35
|
+
<%= label_tag :user_allow_mail, t('activerecord.attributes.user.allow_mail') %>
|
36
|
+
</td>
|
37
|
+
</tr>
|
38
|
+
<tr>
|
39
|
+
<th colspan="2"><%= t('.sensitive_parameters') %></th>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td colspan="2"><p class="notice"><%= t('.sensitive_parameters_notice') %></p></td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<th><%= label_tag :password, t('.current_password') %></th>
|
46
|
+
<td><%= password_field_tag 'password', '', size: 30 %></td>
|
47
|
+
</tr>
|
48
|
+
<tr>
|
49
|
+
<th><%= label_tag :user_email, t('activerecord.attributes.user.email') %></th>
|
50
|
+
<td><%= email_field_tag 'user[email]', entity.email, size: 30, maxlength: User::EMAIL_LIMIT %></td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<td colspan="2"><p class="notice"><%= t('.leave_blank_if_necessary') %></p></td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<th><%= label_tag :profile_password, t('.new_password') %></th>
|
57
|
+
<td><%= password_field_tag 'user[password]', '', size: 30, maxlength: 70 %></td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<th><%= label_tag :profile_password_confirmation, t('activerecord.attributes.user.password_confirmation') %></th>
|
61
|
+
<td><%= password_field_tag 'user[password_confirmation]', '', size: 30, maxlength: 70 %></td>
|
62
|
+
</tr>
|
63
|
+
</tbody>
|
64
|
+
<tfoot>
|
65
|
+
<tr>
|
66
|
+
<td colspan="2"><%= button_tag t('.update'), type: :submit %></td>
|
67
|
+
</tr>
|
68
|
+
</tfoot>
|
69
|
+
</table>
|
70
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<section class="form">
|
2
|
+
<h2><%= t('.registration_form') %></h2>
|
3
|
+
|
4
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
5
|
+
|
6
|
+
<%= form_tag my_profile_path do %>
|
7
|
+
<div>
|
8
|
+
<div><%= label_tag :user_screen_name, t('activerecord.attributes.user.screen_name') %></div>
|
9
|
+
<%= text_field_tag 'user[screen_name]', entity.screen_name, required: true, size: 30, maxlength: 30 %>
|
10
|
+
</div>
|
11
|
+
<div>
|
12
|
+
<div><%= label_tag :user_password, t('activerecord.attributes.user.password') %></div>
|
13
|
+
<%= password_field_tag 'user[password]', '', required: true, size: 30, maxlength: 70 %>
|
14
|
+
</div>
|
15
|
+
<div>
|
16
|
+
<div><%= label_tag :user_password_confirmation, t('activerecord.attributes.user.password_confirmation') %></div>
|
17
|
+
<%= password_field_tag 'user[password_confirmation]', '', required: true, size: 30, maxlength: 70 %>
|
18
|
+
</div>
|
19
|
+
<div>
|
20
|
+
<div><%= label_tag :user_email, t('activerecord.attributes.user.email') %></div>
|
21
|
+
<%= email_field_tag 'user[email]', entity.email, size: 50, maxlength: User::EMAIL_LIMIT %>
|
22
|
+
</div>
|
23
|
+
<div>
|
24
|
+
<%= check_box_tag :agree %>
|
25
|
+
<%= label_tag :agree, t('.i_am_bot') %>
|
26
|
+
</div>
|
27
|
+
<div>
|
28
|
+
<p><%= t('.you_accept_terms_of_service') %></p>
|
29
|
+
</div>
|
30
|
+
<div>
|
31
|
+
<%= button_tag t('my.profiles.new.title'), type: :submit, name: 'button' %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
</section>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
|
3
|
+
<article class="recovery">
|
4
|
+
<h1><%= t('.title') %></h1>
|
5
|
+
|
6
|
+
<section>
|
7
|
+
<h2><%= t('.got_code') %></h2>
|
8
|
+
<%= form_tag my_recovery_path, method: :patch do %>
|
9
|
+
<div>
|
10
|
+
<%= label_tag :code, t('activerecord.attributes.code.body') %>
|
11
|
+
<%= text_field_tag :code, param_from_request(:code), required: true, size: 25 %>
|
12
|
+
</div>
|
13
|
+
<div>
|
14
|
+
<%= label_tag :user_password, t('activerecord.attributes.user.password') %>
|
15
|
+
<%= password_field_tag 'user[password]', '', required: true, size: 25 %>
|
16
|
+
</div>
|
17
|
+
<div>
|
18
|
+
<%= label_tag :user_password_confirmation, t('activerecord.attributes.user.password_confirmation') %>
|
19
|
+
<%= password_field_tag 'user[password_confirmation]', '', required: true, size: 25 %>
|
20
|
+
</div>
|
21
|
+
<div>
|
22
|
+
<%= button_tag t('.update_password'), type: :submit %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
</section>
|
26
|
+
|
27
|
+
<section>
|
28
|
+
<h2><%= t('.no_code') %></h2>
|
29
|
+
<%= form_tag my_recovery_path, method: :post do %>
|
30
|
+
<div>
|
31
|
+
<%= label_tag :email, t('activerecord.attributes.user.email') %>
|
32
|
+
<%= text_field_tag :email, param_from_request(:email), required: true, size: 40 %>
|
33
|
+
</div>
|
34
|
+
<div>
|
35
|
+
<%= button_tag t('.send_code'), type: :submit %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
</section>
|
39
|
+
</article>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
2
|
+
|
3
|
+
<%= form_for entity do |f| %>
|
4
|
+
<dl>
|
5
|
+
<dt><%= f.label :name %></dt>
|
6
|
+
<dd>
|
7
|
+
<%= f.text_field :name, size: nil, maxlenght: PrivilegeGroup::NAME_LIMIT, required: true, placeholder: t('.placeholders.name') %>
|
8
|
+
</dd>
|
9
|
+
|
10
|
+
<dt><%= f.label :slug %></dt>
|
11
|
+
<dd>
|
12
|
+
<%= f.text_field :slug, size: nil, maxlenght: PrivilegeGroup::SLUG_LIMIT, required: true, placeholder: t('.placeholders.slug') %>
|
13
|
+
<div class="guideline"><%= t('.guidelines.slug') %></div>
|
14
|
+
</dd>
|
15
|
+
|
16
|
+
<dt><%= f.label :description %></dt>
|
17
|
+
<dd>
|
18
|
+
<%= f.text_area :description, cols: 80, rows: 3, maxlenght: PrivilegeGroup::DESCRIPTION_LIMIT %>
|
19
|
+
<div class="guideline"><%= t('.guidelines.description') %></div>
|
20
|
+
</dd>
|
21
|
+
</dl>
|
22
|
+
<div class="buttons">
|
23
|
+
<%= f.button t(:save), type: :submit %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('admin.privilege_groups.nav_item.text'), admin_privilege_groups_path) %>
|
4
|
+
<%= admin_privilege_group_link(@entity) %>
|
5
|
+
<span><%= t(:edit) %></span>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<article class="entity-page">
|
9
|
+
<h1><%= t('.heading') %></h1>
|
10
|
+
|
11
|
+
<ul class="actions">
|
12
|
+
<li><%= return_icon(admin_privilege_group_path(@entity.id)) %></li>
|
13
|
+
<li class="danger"><%= destroy_icon(@entity) %></li>
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
<%= render partial: 'form', locals: { entity: @entity } %>
|
17
|
+
</article>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('admin.privilege_groups.nav_item.text'), admin_privilege_groups_path) %>
|
4
|
+
<span><%= t('.heading') %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article class="entity-page">
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<ul class="actions">
|
11
|
+
<li><%= back_icon(admin_privilege_groups_path) %></li>
|
12
|
+
</ul>
|
13
|
+
|
14
|
+
<%= render partial: 'form', locals: { entity: @entity } %>
|
15
|
+
</article>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
2
|
+
|
3
|
+
<%= form_for entity do |f| %>
|
4
|
+
<dl>
|
5
|
+
<% unless entity.id.nil? %>
|
6
|
+
<% unless entity.parent_id.nil? %>
|
7
|
+
<dt><%= t('activerecord.attributes.privilege.parent_id') %></dt>
|
8
|
+
<dd>
|
9
|
+
<%= admin_privilege_link(entity.parent) %>
|
10
|
+
</dd>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<dt><%= f.label :name %></dt>
|
15
|
+
<dd>
|
16
|
+
<%= f.text_field :name, size: nil, maxlength: Privilege::NAME_LIMIT, required: true %>
|
17
|
+
<div class="guideline"><%= t('.guidelines.name') %></div>
|
18
|
+
</dd>
|
19
|
+
|
20
|
+
<dt><%= f.label :slug %></dt>
|
21
|
+
<dd>
|
22
|
+
<%= f.text_field :slug, size: nil, maxlength: Privilege::SLUG_LIMIT, required: true, placeholder: t('.placeholders.slug') %>
|
23
|
+
<div class="guideline"><%= t('.guidelines.slug') %></div>
|
24
|
+
</dd>
|
25
|
+
|
26
|
+
<dt><%= f.label :priority %></dt>
|
27
|
+
<dd>
|
28
|
+
<%= f.number_field :priority, in: Privilege::PRIORITY_RANGE, required: true %>
|
29
|
+
</dd>
|
30
|
+
|
31
|
+
<dt><%= f.label :description %></dt>
|
32
|
+
<dd>
|
33
|
+
<%= f.text_area :description, cols: 50, rows: 3, maxlength: Privilege::DESCRIPTION_LIMIT %>
|
34
|
+
<div class="guideline"><%= t('.guidelines.description') %></div>
|
35
|
+
</dd>
|
36
|
+
</dl>
|
37
|
+
|
38
|
+
<div class="buttons">
|
39
|
+
<%= f.hidden_field :parent_id if entity.id.nil? %>
|
40
|
+
<%= f.button t(:save), type: :submit %>
|
41
|
+
</div>
|
42
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('admin.privileges.nav_item.text'), admin_privileges_path) %>
|
4
|
+
<% @entity.parents.each do |parent| %>
|
5
|
+
<% admin_privilege_link(parent) %>
|
6
|
+
<% end %>
|
7
|
+
<%= admin_privilege_link(@entity) %>
|
8
|
+
<span><%= t(:edit) %></span>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<article class="entity-page">
|
12
|
+
<h1><%= t('.title') %></h1>
|
13
|
+
<ul class="actions">
|
14
|
+
<li><%= back_icon(admin_privilege_path(@entity.id)) %></li>
|
15
|
+
<% if @entity.can_be_deleted? %>
|
16
|
+
<li class="danger"><%= destroy_icon(@entity) %></li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
|
20
|
+
<%= render partial: 'form', locals: { entity: @entity } %>
|
21
|
+
</article>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('admin.privileges.nav_item.text'), admin_privileges_path) %>
|
4
|
+
<span><%= t(:create) %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article class="entity-page">
|
8
|
+
<h1><%= t('.title') %></h1>
|
9
|
+
<ul class="actions">
|
10
|
+
<li><%= back_icon(admin_privileges_path) %></li>
|
11
|
+
</ul>
|
12
|
+
|
13
|
+
<%= render partial: 'form', locals: { entity: @entity } %>
|
14
|
+
</article>
|