add custom messages when managing project storages as non-admin

pull/10285/head
Christophe Bliard 3 years ago
parent f9285ec851
commit b6fcb1aee4
No known key found for this signature in database
GPG Key ID: 2BC07603210C3FA4
  1. 10
      modules/storages/app/views/storages/project_settings/_toast_no_storage_set_up.html.erb
  2. 10
      modules/storages/app/views/storages/project_settings/new.html.erb
  3. 5
      modules/storages/config/locales/en.yml

@ -5,8 +5,12 @@
<strong><%= t(:'storages.instructions.no_storage_set_up') %></strong>
</p>
<p>
<%= t(:"storages.instructions.setting_up_additional_storages") %>
<%= link_to "#{t(:label_administration)} / #{t(:project_module_storages)}", controller: '/storages/admin/storages', action: :index %>.
<% if User.current.admin? %>
<%= t(:"storages.instructions.setting_up_storages") %>
<%= link_to "#{t(:label_administration)} / #{t(:project_module_storages)}", controller: '/storages/admin/storages', action: :index %>.
<% else %>
<%= t(:"storages.instructions.setting_up_storages_non_admin") %>
<% end %>
</p>
</div>
</div>
</div>

@ -27,12 +27,14 @@
<p>
<strong><%= t(:'storages.instructions.all_available_storages_already_added') %></strong>
</p>
<% if User.current.admin? %>
<p>
<p>
<% if User.current.admin? %>
<%= t(:"storages.instructions.setting_up_additional_storages") %>
<%= link_to "#{t(:label_administration)} / #{t(:project_module_storages)}", controller: '/storages/admin/storages', action: :index %>.
</p>
<% end %>
<% else %>
<%= t(:"storages.instructions.setting_up_additional_storages_non_admin") %>
<% end %>
</p>
</div>
</div>
<% end %>

@ -35,6 +35,9 @@ en:
host: "The URL of your storage instance. The URL should not be more than 255 characters long."
no_storage_set_up: "There are no file storages set up, yet."
setting_up_additional_storages: "For setting up additional file storages, please visit"
setting_up_additional_storages_non_admin: "Administrators can set up additional file storages in Administration / File Storages."
setting_up_storages: "For setting up file storages, please visit"
setting_up_storages_non_admin: "Administrators can set up file storages in Administration / File Storages."
all_available_storages_already_added: "All available storages are already added to the project."
delete_warning:
storage: >
@ -52,7 +55,7 @@ en:
label_new_storage: "New storage"
label_storage: "Storage"
label_storages: "Storages"
no_results: "No storages setup, yet."
no_results: "No storages set up, yet."
provider_types:
label: "Provider type"
nextcloud: "Nextcloud"

Loading…
Cancel
Save