@@ -562,7 +562,7 @@ $sidebar-active: #f4fcd0;
|
||||
|
||||
.account-info,
|
||||
.login-as {
|
||||
background-color: #e7e7e7;
|
||||
background-color: $highlight;
|
||||
border-radius: rem-calc(3);
|
||||
font-size: rem-calc(16);
|
||||
font-weight: normal;
|
||||
@@ -669,6 +669,10 @@ $sidebar-active: #f4fcd0;
|
||||
}
|
||||
}
|
||||
|
||||
.management-list {
|
||||
max-width: rem-calc(1200);
|
||||
}
|
||||
|
||||
// 06. Polls
|
||||
// -----------------
|
||||
|
||||
|
||||
46
app/helpers/management_helper.rb
Normal file
46
app/helpers/management_helper.rb
Normal file
@@ -0,0 +1,46 @@
|
||||
module ManagementHelper
|
||||
|
||||
def menu_users?
|
||||
["users", "email_verifications", "document_verifications"].include?(controller_name)
|
||||
end
|
||||
|
||||
def menu_edit_password_email?
|
||||
controller_name == "account" && action_name == "edit_password_email"
|
||||
end
|
||||
|
||||
def menu_edit_password_manually?
|
||||
controller_name == "account" && action_name == "edit_password_manually"
|
||||
end
|
||||
|
||||
def menu_create_proposal?
|
||||
controller_name == "proposals" && action_name == "new"
|
||||
end
|
||||
|
||||
def menu_support_proposal?
|
||||
controller_name == "proposals" && action_name == "index"
|
||||
end
|
||||
|
||||
def menu_print_proposals?
|
||||
controller_name == "proposals" && action_name == "print"
|
||||
end
|
||||
|
||||
def menu_create_investments?
|
||||
(controller_name == "budget_investments" && action_name == "new") ||
|
||||
(controller_name == "budgets" && action_name == "create_investments")
|
||||
end
|
||||
|
||||
def menu_support_investments?
|
||||
(controller_name == "budget_investments" && action_name == "index") ||
|
||||
(controller_name == "budgets" && action_name == "support_investments")
|
||||
end
|
||||
|
||||
def menu_print_investments?
|
||||
(controller_name == "budget_investments" && action_name == "print") ||
|
||||
(controller_name == "budgets" && action_name == "print_investments")
|
||||
end
|
||||
|
||||
def menu_user_invites?
|
||||
controller_name == "user_invites"
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,10 +1,10 @@
|
||||
<%= form_for(Proposal.new, url: url, as: :proposal, method: :get) do |f| %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="small-12 medium-6">
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search, "", placeholder: t("admin.shared.proposal_search.placeholder") %>
|
||||
</div>
|
||||
<div class="form-inline small-12 medium-6 column">
|
||||
<%= f.submit t("admin.shared.proposal_search.button"), class: "button" %>
|
||||
<div class="input-group-button">
|
||||
<%= f.submit t("admin.shared.proposal_search.button"), class: "button" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,11 +2,16 @@
|
||||
<section class="small-12 medium-9 column">
|
||||
<div class="account-info">
|
||||
|
||||
<%= link_to(t("management.account_info.change_user"), logout_management_users_path, method: :delete, class: 'float-right change-user') %>
|
||||
<%= link_to(t("management.account_info.change_user"),
|
||||
logout_management_users_path,
|
||||
method: :delete,
|
||||
class: "float-right btchange-user button hollow") %>
|
||||
|
||||
<% if managed_user.level_two_or_three_verified? %>
|
||||
<p>
|
||||
<%= t("management.account_info.identified_label") %>
|
||||
<strong>
|
||||
<%= t("management.account_info.identified_label") %>
|
||||
</strong>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,104 +1,92 @@
|
||||
<div class="admin-sidebar">
|
||||
<ul id="admin_menu" data-accordion-menu data-multi-open="false">
|
||||
<li <%= "class=is-active" if controller_name == "document_verifications" ||
|
||||
controller_name == "email_verifications" ||
|
||||
controller_name == "users" %>>
|
||||
<%= link_to management_document_verifications_path do %>
|
||||
<span class="icon-user"></span>
|
||||
<%= t("management.menu.users") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<ul id="admin_menu" data-accordion-menu>
|
||||
<li class="section-title">
|
||||
<a href="#">
|
||||
<span class="icon-user"></span>
|
||||
<strong><%= t("management.menu.edit_user_accounts") %></strong>
|
||||
<strong><%= t("management.menu.users") %></strong>
|
||||
</a>
|
||||
<ul <%= "class=is-active" if controller_name == "account" %>>
|
||||
<ul class="is-active">
|
||||
|
||||
<li <%= "class=is-active" if menu_users? %>>
|
||||
<%= link_to t("management.menu.select_user"), management_document_verifications_path %>
|
||||
</li>
|
||||
|
||||
<% if managed_user.email %>
|
||||
<li>
|
||||
<li <%= "class=is-active" if menu_edit_password_email? %>>
|
||||
<%= link_to t("management.account.menu.reset_password_email"), edit_password_email_management_account_path %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
|
||||
<li <%= "class=is-active" if menu_edit_password_manually? %>>
|
||||
<%= link_to t("management.account.menu.reset_password_manually"), edit_password_manually_management_account_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if menu_create_proposal? %>>
|
||||
<%= link_to t("management.menu.create_proposal"), new_management_proposal_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if menu_support_proposal? %>>
|
||||
<%= link_to t("management.menu.support_proposals"), management_proposals_path %>
|
||||
</li>
|
||||
|
||||
<% if Setting['feature.budgets'] %>
|
||||
<li <%= "class=is-active" if menu_create_investments? %>>
|
||||
<%= link_to t("management.menu.create_budget_investment"), create_investments_management_budgets_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if menu_support_investments? %>>
|
||||
<%= link_to t("management.menu.support_budget_investments"), support_investments_management_budgets_path %>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "proposals" && action_name == "new" %>>
|
||||
<%= link_to new_management_proposal_path do %>
|
||||
<span class="icon-proposals"></span>
|
||||
<%= t("management.menu.create_proposal") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "proposals" && action_name == "index" %>>
|
||||
<%= link_to management_proposals_path do %>
|
||||
<span class="icon-like"></span>
|
||||
<%= t("management.menu.support_proposals") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "new" %>>
|
||||
<%= link_to new_management_spending_proposal_path do %>
|
||||
<span class="icon-budget"></span>
|
||||
<%= t("management.menu.create_spending_proposal") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "index" %>>
|
||||
<%= link_to management_spending_proposals_path do %>
|
||||
<span class="icon-like"></span>
|
||||
<%= t("management.menu.support_spending_proposals") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<% if Setting['feature.budgets'] %>
|
||||
<li <%= "class=is-active" if (controller_name == "budget_investments" && action_name == "new") ||
|
||||
(controller_name == "budget" && action_name == 'create_investments') %>>
|
||||
<%= link_to create_investments_management_budgets_path do %>
|
||||
<span class="icon-budget"></span>
|
||||
<%= t("management.menu.create_budget_investment") %>
|
||||
<li <%= "class=is-active" if menu_print_investments? %>>
|
||||
<%= link_to print_investments_management_budgets_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_budget_investments") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if (controller_name == "budget_investments" && action_name == "index") ||
|
||||
(controller_name == "budget" && action_name == "support_investments")%>>
|
||||
<%= link_to support_investments_management_budgets_path do %>
|
||||
<span class="icon-like"></span>
|
||||
<%= t("management.menu.support_budget_investments") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if (controller_name == "budget_investments" && action_name == "print") ||
|
||||
(controller_name == "budgets" && action_name == "print_investments") %>>
|
||||
<%= link_to print_investments_management_budgets_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_budget_investments") %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "proposals" && action_name == "print" %>>
|
||||
<li <%= "class=is-active" if menu_print_proposals? %>>
|
||||
<%= link_to print_management_proposals_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_proposals") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "print" %>>
|
||||
<%= link_to print_management_spending_proposals_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_spending_proposals") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li <%= "class=is-active" if menu_user_invites? %>>
|
||||
<%= link_to new_management_user_invite_path do %>
|
||||
<span class="icon-letter"></span>
|
||||
<%= t("management.menu.user_invites") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<%# temporarily commenting until obsolete spending_proposals is removed %>
|
||||
<% if false %>
|
||||
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "new" %>>
|
||||
<%= link_to new_management_spending_proposal_path do %>
|
||||
<span class="icon-budget"></span>
|
||||
<%= t("management.menu.create_spending_proposal") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "index" %>>
|
||||
<%= link_to management_spending_proposals_path do %>
|
||||
<span class="icon-like"></span>
|
||||
<%= t("management.menu.support_spending_proposals") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "print" %>>
|
||||
<%= link_to print_management_spending_proposals_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_spending_proposals") %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
<h2 class="not-print"><%= t("management.account.menu.reset_password_manually") %></h2>
|
||||
|
||||
<%= form_for managed_user, url: change_password_management_account_path do |f| %>
|
||||
<div class="row">
|
||||
<%= f.label :password %>
|
||||
<p class="help-text"><%= t("management.account.edit.password.print_help") %></p>
|
||||
<div class="columns small-6 end">
|
||||
<%= f.label :password %>
|
||||
<p class="help-text"><%= t("management.account.edit.password.print_help") %></p>
|
||||
<div class="small-12 medium-6">
|
||||
|
||||
<div class="input-group">
|
||||
<%= f.password_field :password, class: "input-group-field no-margin-bottom", label: false, value: nil %>
|
||||
<span class="input-group-label">
|
||||
<a href="#" class="show-password"><i class="icon-eye"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<%= link_to t("management.account.edit.password.random"), '#', class: 'generate-random-value float-right' %>
|
||||
<div class="input-group">
|
||||
<%= f.password_field :password, class: "input-group-field no-margin-bottom", label: false, value: nil %>
|
||||
<span class="input-group-label">
|
||||
<a href="#" class="show-password"><span class="icon-eye"></span></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<%= link_to t("management.account.edit.password.random"), '#', class: 'generate-random-value float-right' %>
|
||||
</div>
|
||||
|
||||
<%= f.submit t("management.account.edit.password.save"), class: "button success" %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,12 +1,30 @@
|
||||
<table>
|
||||
<% @budgets.each do |budget| %>
|
||||
<tr id="<%= dom_id(budget) %>">
|
||||
<td><%= budget.name %></td>
|
||||
<td><%= budget.translated_phase %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.create_new_investment"),
|
||||
new_management_budget_investment_path(budget) %>
|
||||
</td>
|
||||
</tr>
|
||||
<h2><%= t("management.budgets.create_new_investment") %></h2>
|
||||
|
||||
<% if @budgets.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("management.budgets.table_name") %></th>
|
||||
<th><%= t("management.budgets.table_phase") %></th>
|
||||
<th><%= t("management.budgets.table_actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @budgets.each do |budget| %>
|
||||
<tr id="<%= dom_id(budget) %>">
|
||||
<td><%= budget.name %></td>
|
||||
<td><%= budget.translated_phase %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.create_new_investment"),
|
||||
new_management_budget_investment_path(budget),
|
||||
class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<div class="callout primary">
|
||||
<%= t("management.budgets.no_budgets") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column end">
|
||||
<h1 class=""><%= t("management.budget_investments.create") %></h1>
|
||||
<h2><%= t("management.budget_investments.create") %></h2>
|
||||
|
||||
<%= render '/budgets/investments/form', form_url: management_budget_investments_path(@budget) %>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
<h2><%= t("management.budgets.print_investments") %></h2>
|
||||
|
||||
<table>
|
||||
<tr id="<%= dom_id(@budget) %>">
|
||||
<td><%= @budget.name %></td>
|
||||
<td><%= @budget.translated_phase %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.print_investments"),
|
||||
print_management_budget_investments_path(@budget) %>
|
||||
</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("management.budgets.table_name") %></th>
|
||||
<th><%= t("management.budgets.table_phase") %></th>
|
||||
<th><%= t("management.budgets.table_actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="<%= dom_id(@budget) %>">
|
||||
<td><%= @budget.name %></td>
|
||||
<td><%= @budget.translated_phase %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.print_investments"),
|
||||
print_management_budget_investments_path(@budget) %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,12 +1,30 @@
|
||||
<table>
|
||||
<% @budgets.each do |budget| %>
|
||||
<tr id="<%= dom_id(budget) %>">
|
||||
<td><%= budget.name %></td>
|
||||
<td><%= budget.translated_phase %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.support_investments"),
|
||||
management_budget_investments_path(budget) %>
|
||||
</td>
|
||||
</tr>
|
||||
<h2><%= t("management.budgets.support_investments") %></h2>
|
||||
|
||||
<% if @budgets.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("management.budgets.table_name") %></th>
|
||||
<th><%= t("management.budgets.table_phase") %></th>
|
||||
<th><%= t("management.budgets.table_actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @budgets.each do |budget| %>
|
||||
<tr id="<%= dom_id(budget) %>">
|
||||
<td><%= budget.name %></td>
|
||||
<td><%= budget.translated_phase %></td>
|
||||
<td align="right">
|
||||
<%= link_to t("management.budgets.support_investments"),
|
||||
management_budget_investments_path(budget),
|
||||
class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<div class="callout primary">
|
||||
<%= t("management.budgets.no_budgets") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
<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-8">
|
||||
<%= 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"), class: "button" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="small-12 medium-5">
|
||||
<%= 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"), class: "button" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<%= render partial: 'proposals/proposal', locals: {proposal: proposal} %>
|
||||
<%= render partial: "proposals/proposal", locals: {proposal: proposal} %>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<main>
|
||||
<h2><%= t("management.proposals.index.title") %></h2>
|
||||
|
||||
<%= render 'admin/shared/proposal_search', url: management_proposals_path %>
|
||||
|
||||
<div class="row">
|
||||
<div class="proposals-list small-12 column">
|
||||
<div class="management-list">
|
||||
<div class="proposals-list">
|
||||
|
||||
<div class="filters">
|
||||
<div class="small-12 medium-7 float-left">
|
||||
<% if @search_terms %>
|
||||
<h2>
|
||||
<%= page_entries_info @proposals %>
|
||||
<%= t("proposals.index.search_results_html", count: @proposals.size, search_term: @search_terms) %>
|
||||
</h2>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if @search_terms %>
|
||||
<h3>
|
||||
<%= page_entries_info @proposals %>
|
||||
<%= t("proposals.index.search_results_html", count: @proposals.size, search_term: @search_terms) %>
|
||||
</h3>
|
||||
<% end %>
|
||||
|
||||
<%= render @proposals %>
|
||||
<%= paginate @proposals %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column end">
|
||||
<h1 class=""><%= t("management.proposals.create_proposal") %></h1>
|
||||
<h2><%= t("management.proposals.create_proposal") %></h2>
|
||||
<%= render "proposals/form", form_url: management_proposals_url %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<main>
|
||||
<div class="row">
|
||||
<div class="proposals-list small-12 column">
|
||||
<div class="proposals-list">
|
||||
<a id="print_link" href="javascript:window.print();" class="button warning float-right">
|
||||
<%= t('management.proposals.print.print_button') %>
|
||||
</a>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= back_link_to %>
|
||||
|
||||
<h1><%= t('management.user_invites.create.title') %></h1>
|
||||
<h2><%= t("management.user_invites.create.title") %></h2>
|
||||
|
||||
<div class="callout success">
|
||||
<%= t('management.user_invites.create.success_html', count: @emails.count) %>
|
||||
<%= t("management.user_invites.create.success_html", count: @emails.count) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<div class="small-12 medium-8 column">
|
||||
<h1><%= t('management.user_invites.new.title') %></h1>
|
||||
<h2><%= t("management.user_invites.new.title") %></h2>
|
||||
|
||||
<%= form_tag management_user_invites_path do %>
|
||||
<label><%= t('management.user_invites.new.label') %></label>
|
||||
<p class="help-text" id="emails-help-text"><%= t('management.user_invites.new.info') %></p>
|
||||
<%= text_area_tag "emails", nil, rows: 5,
|
||||
placeholder: t('management.user_invites.new.info'),
|
||||
aria: {describedby: "emails-help-text"} %>
|
||||
<div class="small-12 medium-6">
|
||||
<input type="submit" name="" value="<%= t('management.user_invites.new.submit') %>", class="button hollow expanded">
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_tag management_user_invites_path do %>
|
||||
<label><%= t('management.user_invites.new.label') %></label>
|
||||
<p class="help-text" id="emails-help-text"><%= t('management.user_invites.new.info') %></p>
|
||||
<%= text_area_tag "emails", nil, rows: 5,
|
||||
placeholder: t('management.user_invites.new.info'),
|
||||
aria: {describedby: "emails-help-text"} %>
|
||||
<div class="small-12 medium-6 large-3">
|
||||
<input type="submit" name="" value="<%= t('management.user_invites.new.submit') %>", class="button expanded">
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
<p><%= t("management.users.create_user_info") %></p>
|
||||
<h2><%= t("management.users.create_user_info") %></h2>
|
||||
|
||||
<%= render 'management/user_permissions',
|
||||
message: t("management.document_verifications.in_census_has_following_permissions"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals, :vote_proposals] %>
|
||||
<div class="small-12 medium-6 column">
|
||||
|
||||
<div class="row verification account">
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="verification account">
|
||||
<%= form_for @user, url: management_users_path do |f| %>
|
||||
<%= f.hidden_field :document_type %>
|
||||
<%= f.hidden_field :document_number %>
|
||||
@@ -27,3 +24,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="callout">
|
||||
<%= render "management/user_permissions",
|
||||
message: t("management.document_verifications.in_census_has_following_permissions"),
|
||||
permissions: [:debates, :create_proposals, :support_proposals, :vote_proposals] %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ en:
|
||||
reset_email_send: Email correctly sent.
|
||||
reseted: Password reseted successfully
|
||||
random: Generate random password
|
||||
save: Save
|
||||
save: Save password
|
||||
print: Print password
|
||||
print_help: You will be able to print the password when it is saved.
|
||||
account_info:
|
||||
@@ -27,7 +27,7 @@ en:
|
||||
email_label: 'Email:'
|
||||
identified_label: 'Identified as:'
|
||||
username_label: 'Username:'
|
||||
check: Check
|
||||
check: Check document
|
||||
dashboard:
|
||||
index:
|
||||
title: Management
|
||||
@@ -66,11 +66,11 @@ en:
|
||||
print_spending_proposals: Print spending proposals
|
||||
support_spending_proposals: Support spending proposals
|
||||
create_budget_investment: Create budget investment
|
||||
print_budget_investments: Print Budget Investments
|
||||
support_budget_investments: Support Budget Investments
|
||||
users: Users
|
||||
edit_user_accounts: Edit user account
|
||||
print_budget_investments: Print budget investments
|
||||
support_budget_investments: Support budget investments
|
||||
users: Users management
|
||||
user_invites: Send invitations
|
||||
select_user: Select user
|
||||
permissions:
|
||||
create_proposals: Create proposals
|
||||
debates: Engage in debates
|
||||
@@ -91,10 +91,16 @@ en:
|
||||
create_proposal: Create proposal
|
||||
print:
|
||||
print_button: Print
|
||||
index:
|
||||
title: Support proposals
|
||||
budgets:
|
||||
create_new_investment: Create New Investment
|
||||
print_investments: Print Budget Investments
|
||||
support_investments: Support Budget Investments
|
||||
create_new_investment: Create budget investment
|
||||
print_investments: Print budget investments
|
||||
support_investments: Support budget investments
|
||||
table_name: Name
|
||||
table_phase: Phase
|
||||
table_actions: Actions
|
||||
no_budgets: There are no active participatory budgets.
|
||||
budget_investments:
|
||||
alert:
|
||||
unverified_user: User is not verified
|
||||
@@ -125,7 +131,7 @@ en:
|
||||
username_label: Username
|
||||
users:
|
||||
create_user: Create a new account
|
||||
create_user_info: 'We will create an account with the following data:'
|
||||
create_user_info: We will create an account with the following data
|
||||
create_user_submit: Create user
|
||||
create_user_success_html: We have sent an email to the email address <b>%{email}</b> in order to verify that it belongs to this user. It contains a link they have to click. Then they will have to set their access password before being able to log in to the website
|
||||
autogenerated_password_html: "Autogenerated password is <b>%{password}</b>, you can change it in the 'My account' section of the web"
|
||||
|
||||
@@ -17,7 +17,7 @@ es:
|
||||
reset_email_send: Email enviado correctamente.
|
||||
reseted: Contraseña restablecida correctamente
|
||||
random: Generar contraseña aleatoria
|
||||
save: Guardar
|
||||
save: Guardar contraseña
|
||||
print: Imprimir contraseña
|
||||
print_help: Podrás imprimir la contraseña cuando se haya guardado.
|
||||
account_info:
|
||||
@@ -27,7 +27,7 @@ es:
|
||||
email_label: 'Email:'
|
||||
identified_label: 'Identificado como:'
|
||||
username_label: 'Usuario:'
|
||||
check: Comprobar
|
||||
check: Comprobar documento
|
||||
dashboard:
|
||||
index:
|
||||
title: Gestión
|
||||
@@ -68,9 +68,9 @@ es:
|
||||
create_budget_investment: Crear proyectos de gasto
|
||||
print_budget_investments: Imprimir proyectos de gasto
|
||||
support_budget_investments: Apoyar proyectos de gasto
|
||||
users: Usuarios
|
||||
edit_user_accounts: Editar cuenta de usuario
|
||||
users: Gestión de usuarios
|
||||
user_invites: Enviar invitaciones
|
||||
select_user: Seleccionar usuario
|
||||
permissions:
|
||||
create_proposals: Crear nuevas propuestas
|
||||
debates: Participar en debates
|
||||
@@ -91,10 +91,16 @@ es:
|
||||
create_proposal: Crear propuesta
|
||||
print:
|
||||
print_button: Imprimir
|
||||
index:
|
||||
title: Apoyar propuestas
|
||||
budgets:
|
||||
create_new_investment: Crear nuevo proyecto
|
||||
print_investments: Imprimir proyectos
|
||||
support_investments: Apoyar proyectos
|
||||
create_new_investment: Crear proyectos de gasto
|
||||
print_investments: Imprimir proyectos de gasto
|
||||
support_investments: Apoyar proyectos de gasto
|
||||
table_name: Nombre
|
||||
table_phase: Fase
|
||||
table_actions: Acciones
|
||||
no_budgets: No hay presupuestos participativos activos.
|
||||
budget_investments:
|
||||
alert:
|
||||
unverified_user: Usuario no verificado
|
||||
@@ -125,7 +131,7 @@ es:
|
||||
username_label: Nombre de usuario
|
||||
users:
|
||||
create_user: Crear nueva cuenta de usuario
|
||||
create_user_info: 'Procedemos a crear un usuario con la siguiente información:'
|
||||
create_user_info: Procedemos a crear un usuario con la siguiente información
|
||||
create_user_submit: Crear usuario
|
||||
create_user_success_html: Hemos enviado un correo electrónico a <b>%{email}</b> para verificar que es suya. El correo enviado contiene un link que el usuario deberá pulsar. Entonces podrá seleccionar una clave de acceso, y entrar en la web de participación.
|
||||
autogenerated_password_html: "Se ha asignado la contraseña <b>%{password}</b> a este usuario. Puede modificarla desde el apartado 'Mi cuenta' de la web."
|
||||
|
||||
@@ -12,7 +12,6 @@ feature 'Account' do
|
||||
|
||||
visit management_root_path
|
||||
|
||||
click_link 'Edit user account'
|
||||
click_link 'Reset password via email'
|
||||
|
||||
expect(page).to have_content "No verified user logged in yet"
|
||||
@@ -37,7 +36,6 @@ feature 'Account' do
|
||||
login_managed_user(user)
|
||||
visit management_root_path
|
||||
|
||||
click_link 'Edit user account'
|
||||
click_link 'Reset password via email'
|
||||
|
||||
click_link 'Send reset password email'
|
||||
@@ -54,12 +52,11 @@ feature 'Account' do
|
||||
login_managed_user(user)
|
||||
visit management_root_path
|
||||
|
||||
click_link 'Edit user account'
|
||||
click_link 'Reset password manually'
|
||||
|
||||
find(:css, "input[id$='user_password']").set("new_password")
|
||||
|
||||
click_button 'Save'
|
||||
click_button 'Save password'
|
||||
|
||||
expect(page).to have_content 'Password reseted successfully'
|
||||
|
||||
@@ -75,13 +72,12 @@ feature 'Account' do
|
||||
login_managed_user(user)
|
||||
visit management_root_path
|
||||
|
||||
click_link 'Edit user account'
|
||||
click_link 'Reset password manually'
|
||||
click_link 'Generate random password'
|
||||
|
||||
new_password = find_field('user_password').value
|
||||
|
||||
click_button 'Save'
|
||||
click_button 'Save password'
|
||||
|
||||
expect(page).to have_content 'Password reseted successfully'
|
||||
|
||||
@@ -97,12 +93,11 @@ feature 'Account' do
|
||||
login_managed_user(user)
|
||||
visit management_root_path
|
||||
|
||||
click_link 'Edit user account'
|
||||
click_link 'Reset password manually'
|
||||
|
||||
find(:css, "input[id$='user_password']").set("another_new_password")
|
||||
|
||||
click_button 'Save'
|
||||
click_button 'Save password'
|
||||
|
||||
expect(page).to have_content 'Password reseted successfully'
|
||||
expect(page).to have_css("a[href='javascript:window.print();']", text: 'Print password')
|
||||
|
||||
@@ -19,7 +19,7 @@ feature 'Budget Investments' do
|
||||
|
||||
click_link "Create budget investment"
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Create New Investment"
|
||||
click_link "Create budget investment"
|
||||
end
|
||||
|
||||
within(".account-info") do
|
||||
@@ -69,10 +69,10 @@ feature 'Budget Investments' do
|
||||
user = create(:user, :level_two)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
end
|
||||
|
||||
fill_in "search", with: "what you got"
|
||||
@@ -96,10 +96,10 @@ feature 'Budget Investments' do
|
||||
user = create(:user, :level_two)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
end
|
||||
|
||||
fill_in "search", with: "Area 52"
|
||||
@@ -122,10 +122,10 @@ feature 'Budget Investments' do
|
||||
user = create(:user, :level_two)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
end
|
||||
|
||||
within(".account-info") do
|
||||
@@ -207,10 +207,10 @@ feature 'Budget Investments' do
|
||||
user = create(:user, :level_two)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
end
|
||||
expect(page).to have_content(budget_investment.title)
|
||||
|
||||
@@ -229,10 +229,10 @@ feature 'Budget Investments' do
|
||||
user = create(:user, :level_two)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
end
|
||||
|
||||
within("#budget-investments") do
|
||||
@@ -250,7 +250,7 @@ feature 'Budget Investments' do
|
||||
user = create(:user)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Support Budget Investments"
|
||||
click_link "Support budget investments"
|
||||
|
||||
expect(page).to have_content "User is not verified"
|
||||
end
|
||||
@@ -261,11 +261,11 @@ feature 'Budget Investments' do
|
||||
scenario 'Printing budget investments' do
|
||||
16.times { create(:budget_investment, budget: @budget, heading: @heading) }
|
||||
|
||||
click_link "Print Budget Investments"
|
||||
click_link "Print budget investments"
|
||||
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Print Budget Investments"
|
||||
click_link "Print budget investments"
|
||||
end
|
||||
|
||||
expect(page).to have_css('.budget-investment', count: 15)
|
||||
@@ -283,11 +283,11 @@ feature 'Budget Investments' do
|
||||
user = create(:user, :level_two)
|
||||
login_managed_user(user)
|
||||
|
||||
click_link "Print Budget Investments"
|
||||
click_link "Print budget investments"
|
||||
|
||||
expect(page).to have_content(@budget.name)
|
||||
within "#budget_#{@budget.id}" do
|
||||
click_link "Print Budget Investments"
|
||||
click_link "Print budget investments"
|
||||
end
|
||||
|
||||
within '#budget-investments' do
|
||||
|
||||
@@ -11,7 +11,7 @@ feature 'DocumentVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: user.document_number
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "already verified"
|
||||
end
|
||||
@@ -22,7 +22,7 @@ feature 'DocumentVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: user.document_number
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Vote proposals"
|
||||
|
||||
@@ -39,7 +39,7 @@ feature 'DocumentVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: "inexisting"
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "This document is not registered"
|
||||
end
|
||||
@@ -48,7 +48,7 @@ feature 'DocumentVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Please introduce the email used on the account"
|
||||
end
|
||||
@@ -57,7 +57,7 @@ feature 'DocumentVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345 - h'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Document number: 12345H"
|
||||
end
|
||||
@@ -67,7 +67,7 @@ feature 'DocumentVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "You don't have the required age to verify your account."
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ feature 'EmailVerifications' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Please introduce the email used on the account"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ feature 'Managed User' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: user.document_number
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "already verified"
|
||||
|
||||
@@ -35,7 +35,7 @@ feature 'Managed User' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: user.document_number
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Vote proposals"
|
||||
|
||||
@@ -58,7 +58,7 @@ feature 'Managed User' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
within(".account-info") do
|
||||
expect(page).not_to have_content "Identified as"
|
||||
@@ -89,7 +89,7 @@ feature 'Managed User' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Please introduce the email used on the account"
|
||||
|
||||
@@ -117,7 +117,7 @@ feature 'Managed User' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Please introduce the email used on the account"
|
||||
|
||||
@@ -145,7 +145,7 @@ feature 'Managed User' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: user.document_number
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "already verified"
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ feature 'Users' do
|
||||
scenario 'Create a level 3 user with email from scratch' do
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Please introduce the email used on the account"
|
||||
|
||||
@@ -49,7 +49,7 @@ feature 'Users' do
|
||||
scenario 'Create a level 3 user without email from scratch' do
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "Please introduce the email used on the account"
|
||||
|
||||
@@ -77,7 +77,7 @@ feature 'Users' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).not_to have_content "This user account is already verified."
|
||||
expect(page).to have_content "This user can participate in the website with the following permissions"
|
||||
@@ -91,7 +91,7 @@ feature 'Users' do
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '12345678Z'
|
||||
click_button 'Check'
|
||||
click_button 'Check document'
|
||||
|
||||
expect(page).to have_content "no user account associated to it"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user