fixes conflicts
This commit is contained in:
10
app/views/management/_account_info.html.erb
Normal file
10
app/views/management/_account_info.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(account.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= account.document_number %></strong>
|
||||
<% if account.username.present? %>
|
||||
<%= t("management.username_label") %> <strong><%= account.username %></strong>
|
||||
<% end %>
|
||||
<% if account.email.present? %>
|
||||
<%= t("management.email_label") %> <strong><%= account.email %></strong>
|
||||
<% end %>
|
||||
</p>
|
||||
@@ -0,0 +1,16 @@
|
||||
<nav class="admin-sidebar">
|
||||
<ul id="admin_menu">
|
||||
<li>
|
||||
<%= link_to t("management.menu.title"), management_root_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=active" if controller_name == "document_verifications" ||
|
||||
controller_name == "email_verifications" ||
|
||||
controller_name == "users" %>>
|
||||
<%= link_to management_document_verifications_path do %>
|
||||
<i class="icon-tag"></i>
|
||||
<%= t("management.menu.users") %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
20
app/views/management/_user_permissions.html.erb
Normal file
20
app/views/management/_user_permissions.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<%
|
||||
# Parameters:
|
||||
# message: A string explaining the permissions
|
||||
# permissions: An array of symbols containing the permissions
|
||||
# (can be :debates, :proposal, :support_proposal, :votes)
|
||||
%>
|
||||
<div class="user-permissions">
|
||||
|
||||
<p><%= message %></p>
|
||||
|
||||
<ul>
|
||||
<% [:debates, :create_proposals, :support_proposals, :vote_proposals].each do |permission| %>
|
||||
<li>
|
||||
<i class="<%= permissions.include?(permission) ? 'icon-check' : 'icon-x' %>"></i>
|
||||
<%= t("management.permissions.#{permission}") %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
25
app/views/management/document_verifications/index.html.erb
Normal file
25
app/views/management/document_verifications/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<h2><%= t("management.document_verifications.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= form_for(@document_verification,
|
||||
as: :document_verification,
|
||||
url: check_management_document_verifications_path) do |f| %>
|
||||
|
||||
<div class="small-12 medium-4">
|
||||
<%= f.select(:document_type,
|
||||
[[humanize_document_type("1"), 1],
|
||||
[humanize_document_type("2"), 2],
|
||||
[humanize_document_type("3"), 3]],
|
||||
label: t("management.document_type_label")) %>
|
||||
</div>
|
||||
<div class="small-12 medium-5">
|
||||
<%= f.text_field :document_number,
|
||||
placeholder: t('management.document_number'),
|
||||
label: t("management.document_number")
|
||||
%>
|
||||
</div>
|
||||
<%= f.submit t("management.check") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<%= render 'management/account_info.html', account: @document_verification %>
|
||||
|
||||
<div class="alert-box alert radius">
|
||||
<%= t("management.document_verifications.not_in_census") %>
|
||||
</div>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.document_verifications.not_in_census_info"),
|
||||
permissions: [:debates, :create_proposals] %>
|
||||
|
||||
<p>
|
||||
<%= t("management.document_verifications.has_no_account_html",
|
||||
link: link_to('http://decide.madrid.es', 'http://decide.madrid.es'),
|
||||
target: "_blank") %>
|
||||
</p>
|
||||
17
app/views/management/document_verifications/new.html.erb
Normal file
17
app/views/management/document_verifications/new.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<%= render 'management/account_info.html', account: @document_verification %>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.document_verifications.please_check_account_data") %>
|
||||
</div>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.document_verifications.in_census_has_following_permissions"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals] %>
|
||||
|
||||
<%= form_for @document_verification,
|
||||
as: :document_verification,
|
||||
url: management_document_verifications_path do |f| %>
|
||||
<%= f.hidden_field :document_type %>
|
||||
<%= f.hidden_field :document_number %>
|
||||
<%= f.submit t("management.document_verifications.verify"), class: "button success radius" %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,11 @@
|
||||
<%= render 'management/account_info.html', account: @document_verification %>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.document_verifications.already_verified") %>
|
||||
</div>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.document_verifications.in_census_has_following_permissions"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals, :vote_proposals] %>
|
||||
|
||||
<a href="javascript:window.print();" class="button warning radius"><%= t("management.print_info") %></a>
|
||||
31
app/views/management/email_verifications/new.html.erb
Normal file
31
app/views/management/email_verifications/new.html.erb
Normal file
@@ -0,0 +1,31 @@
|
||||
<%= render 'management/account_info.html', account: @email_verification %>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.email_verifications.document_found_in_census") %>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<strong><%= t("management.email_verifications.if_existing_account") %></strong>
|
||||
|
||||
<p><%= t("management.email_verifications.introduce_email") %></p>
|
||||
|
||||
<%= form_for @email_verification,
|
||||
as: :email_verification,
|
||||
url: management_email_verifications_path do |f| %>
|
||||
<%= f.hidden_field :document_type %>
|
||||
<%= f.hidden_field :document_number %>
|
||||
<%= f.text_field :email, label: false, placeholder: t('management.email_verifications.email_placeholder') %>
|
||||
|
||||
<%= f.submit t("management.email_verifications.send_email"), class: "button success radius" %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong><%= t("management.email_verifications.if_no_existing_account") %></strong>
|
||||
|
||||
<p class="margin-top">
|
||||
<%= link_to t('management.users.create_user'), new_management_user_path(user: params[:email_verification]), class: "button warning radius" %>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
14
app/views/management/email_verifications/sent.html.erb
Normal file
14
app/views/management/email_verifications/sent.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<%= render 'management/account_info.html', account: @email_verification %>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.email_verifications.email_sent_instructions") %>
|
||||
</div>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.email_verifications.document_found_in_census"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals, :vote_proposals] %>
|
||||
|
||||
<p>
|
||||
<a href="javascript:window.print();" class="button warning radius"><%= t("management.print_info") %></a>
|
||||
</p>
|
||||
|
||||
25
app/views/management/users/new.html.erb
Normal file
25
app/views/management/users/new.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%= render 'management/account_info.html', account: @user %>
|
||||
|
||||
<p><%= t("management.users.create_user_info") %></p>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.document_verifications.in_census_has_following_permissions"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals, :vote_proposals] %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= form_for @user, url: management_users_path do |f| %>
|
||||
<%= f.hidden_field :document_type %>
|
||||
<%= f.hidden_field :document_number %>
|
||||
<%= f.text_field :username,
|
||||
label: t('management.username_label'),
|
||||
placeholder: t('management.username_label') %>
|
||||
<%= f.text_field :email,
|
||||
label: t('management.email_label'),
|
||||
placeholder: t('management.email_label') %>
|
||||
|
||||
<%= f.submit t("management.users.create_user_submit"), class: "button success radius" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
7
app/views/management/users/show.html.erb
Normal file
7
app/views/management/users/show.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<%= render 'management/account_info.html', account: @user %>
|
||||
|
||||
<p><%= t("management.users.create_user_success_html", email: @user.email) %></p>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.document_verifications.in_census_has_following_permissions"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals, :vote_proposals] %>
|
||||
Reference in New Issue
Block a user