add i18n
This commit is contained in:
committed by
Oleksandr Turchyn
parent
3c60fb4ee6
commit
e9d728fa4a
@@ -1,19 +1,19 @@
|
||||
<%= form_for user, html: { class: 'space-y-4' }, data: { turbo_frame: :_top } do |f| %>
|
||||
<div class="space-y-2">
|
||||
<div class="form-control">
|
||||
<%= f.label :first_name, class: 'label' %>
|
||||
<%= f.label :first_name, t('first_name'), class: 'label' %>
|
||||
<%= f.text_field :first_name, required: true, class: 'base-input', dir: 'auto' %>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= f.label :last_name, class: 'label' %>
|
||||
<%= f.label :last_name, t('last_name'), class: 'label' %>
|
||||
<%= f.text_field :last_name, required: true, class: 'base-input', dir: 'auto' %>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= f.label :email, class: 'label' %>
|
||||
<%= f.label :email, t('email'), class: 'label' %>
|
||||
<%= f.email_field :email, required: true, class: 'base-input' %>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= f.label :password, class: 'label' %>
|
||||
<%= f.label :password, t('password'), class: 'label' %>
|
||||
<%= f.password_field :password, required: user.new_record?, class: 'base-input' %>
|
||||
</div>
|
||||
<% if f.object != current_user %>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<div class="form-control">
|
||||
<%= f.label :role, class: 'label' %>
|
||||
<%= f.select :role, nil, {}, class: 'base-select' do %>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="editor" disabled>Editor</option>
|
||||
<option value="viewer" disabled>Viewer</option>
|
||||
<option value="admin"><%= t('admin') %></option>
|
||||
<option value="editor" disabled><%= t('editor') %></option>
|
||||
<option value="viewer" disabled><%= t('viewer') %></option>
|
||||
<% end %>
|
||||
<a class="text-sm mt-3 px-4 py-2 bg-base-300 rounded-full block" target="_blank" href="<%= Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/plans") : "#{Docuseal::CLOUD_URL}/sign_up?#{{ redir: "#{Docuseal::CONSOLE_URL}/on_premise" }.to_query}" %>">
|
||||
<%= svg_icon('info_circle', class: 'w-4 h-4 inline align-text-bottom') %>
|
||||
Unlock more user roles with DocuSeal Pro.
|
||||
<span class="link font-medium">Learn More</a>
|
||||
<%= t('unlock_more_user_roles_with_docuseal_pro') %>
|
||||
<span class="link font-medium"><%= t('learn_more') %></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<%= render 'shared/turbo_modal', title: 'Edit User' do %>
|
||||
<%= render 'shared/turbo_modal', title: t('edit_user') do %>
|
||||
<%= render 'form', user: @user %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="md:flex-grow">
|
||||
<div class="flex justify-between mb-4">
|
||||
<h1 class="text-4xl font-bold"><%= params[:status].to_s.titleize %> Users</h1>
|
||||
<h1 class="text-4xl font-bold">
|
||||
<%= t('status_users', status: params[:status].to_s.titleize) %>
|
||||
</h1>
|
||||
<div class="flex items-center space-x-4">
|
||||
<% if can?(:create, User.new(account: current_account)) %>
|
||||
<%= render 'users/extra_buttons' %>
|
||||
@@ -11,7 +13,7 @@
|
||||
<% else %>
|
||||
<%= link_to new_user_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: 'modal' } do %>
|
||||
<%= svg_icon('plus', class: 'w-6 h-6') %>
|
||||
<span>New User</span>
|
||||
<span><%= t('new_user') %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -22,16 +24,16 @@
|
||||
<thead class="bg-base-200">
|
||||
<tr class="text-neutral uppercase">
|
||||
<th>
|
||||
Name
|
||||
<%= t('name') %>
|
||||
</th>
|
||||
<th>
|
||||
Email
|
||||
<%= t('email') %>
|
||||
</th>
|
||||
<th>
|
||||
Role
|
||||
<%= t('role') %>
|
||||
</th>
|
||||
<th>
|
||||
Last session
|
||||
<%= t('last_session') %>
|
||||
</th>
|
||||
<th class="text-right" width="1px">
|
||||
</th>
|
||||
@@ -56,18 +58,18 @@
|
||||
</td>
|
||||
<td class="flex items-center space-x-2 justify-end">
|
||||
<% if can?(:update, user) && user.archived_at.blank? %>
|
||||
<%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: 'Edit', data: { turbo_frame: 'modal' } do %>
|
||||
Edit
|
||||
<%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: t('edit'), data: { turbo_frame: 'modal' } do %>
|
||||
<%= t('edit') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if params[:status].blank? && can?(:destroy, user) && user != current_user %>
|
||||
<%= button_to user_path(user), method: :delete, class: 'btn btn-outline btn-error btn-xs', title: 'Delete', data: { turbo_confirm: 'Are you sure?' } do %>
|
||||
Remove
|
||||
<%= button_to user_path(user), method: :delete, class: 'btn btn-outline btn-error btn-xs', title: t('remove'), data: { turbo_confirm: t('are_you_sure_') } do %>
|
||||
<%= t('remove') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if params[:status].present? && can?(:manage, user) && user != current_user %>
|
||||
<%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-xs', title: 'Unarchive', data: { turbo_confirm: 'Are you sure?' } do %>
|
||||
Unarchive
|
||||
<%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-xs', title: t('unarchive'), data: { turbo_confirm: t('are_you_sure_') } do %>
|
||||
<%= t('unarchive') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
@@ -80,9 +82,9 @@
|
||||
<% if current_account.users.archived.exists? %>
|
||||
<div>
|
||||
<% if params[:status] == 'archived' %>
|
||||
<a href="<%= settings_users_path %>" class="link text-sm">View Active</a>
|
||||
<a href="<%= settings_users_path %>" class="link text-sm"><%= t('view_active') %></a>
|
||||
<% else %>
|
||||
<a href="<%= settings_archived_users_path %>" class="link text-sm">View Archived</a>
|
||||
<a href="<%= settings_archived_users_path %>" class="link text-sm"><%= t('view_archived') %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<%= render 'shared/turbo_modal', title: 'New User' do %>
|
||||
<%= render 'shared/turbo_modal', title: t('new_user') do %>
|
||||
<%= render 'form', user: @user %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user