mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Use BaseController in admin
This commit is contained in:
parent
cee4c84edd
commit
a63b989cd6
36 changed files with 1265 additions and 1215 deletions
20
app/views/admin/base/_flash_messages.html.erb
Normal file
20
app/views/admin/base/_flash_messages.html.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<% if flash[:notice] %>
|
||||
<div class="alert alert-success alert-dismissible">
|
||||
<button class="close" data-dismiss="alert" type=button><span>×</span></button>
|
||||
<p><%= flash[:notice] %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if flash[:alert] %>
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button class="close" data-dismiss="alert" type=button><span>×</span></button>
|
||||
<p><%= flash[:alert] %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if flash[:info] %>
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<button class="close" data-dismiss="alert" type=button><span>×</span></button>
|
||||
<p><%= flash[:info] %></p>
|
||||
</div>
|
||||
<% end %>
|
44
app/views/admin/base/_menu.haml
Normal file
44
app/views/admin/base/_menu.haml
Normal file
|
@ -0,0 +1,44 @@
|
|||
.navbar-collapse.collapse
|
||||
%ul.nav.navbar-nav
|
||||
- if can? :show, Domain
|
||||
%li= link_to t(:domains), admin_domains_path
|
||||
- if can? :show, Contact
|
||||
%li= link_to t(:contacts), admin_contacts_path
|
||||
- if can? :show, Registrar
|
||||
%li= link_to t(:registrars), admin_registrars_path
|
||||
- if can? :show, Keyrelay
|
||||
%li= link_to t(:keyrelays), admin_keyrelays_path
|
||||
- if can?(:access, :settings_menu)
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
|
||||
= t(:settings)
|
||||
%span.caret
|
||||
%ul.dropdown-menu{role: "menu"}
|
||||
%li.dropdown-header= t('.users')
|
||||
%li= link_to t('.api_users'), admin_api_users_path
|
||||
%li= link_to t('.admin_users'), admin_admin_users_path
|
||||
%li.divider
|
||||
%li.dropdown-header= t(:billing)
|
||||
- if can? :view, Billing::Price
|
||||
%li= link_to t('.prices'), admin_prices_path
|
||||
%li= link_to t(:bank_statements), admin_bank_statements_path
|
||||
%li= link_to t(:invoices), admin_invoices_path
|
||||
%li= link_to t(:account_activities), admin_account_activities_path(created_after: 'today')
|
||||
%li.divider
|
||||
%li.dropdown-header= t('.archive')
|
||||
%li= link_to t('.domain_history'), admin_domain_versions_path
|
||||
%li= link_to t('.contact_history'), admin_contact_versions_path
|
||||
%li.divider
|
||||
%li.dropdown-header= t(:system)
|
||||
%li= link_to t(:settings), admin_settings_path
|
||||
%li= link_to t('.zones'), admin_zones_path
|
||||
%li= link_to t('.blocked_domains'), admin_blocked_domains_path
|
||||
%li= link_to t('.reserved_domains'), admin_reserved_domains_path
|
||||
%li= link_to t(:mail_templates), admin_mail_templates_path
|
||||
%li= link_to t('.epp_log'), admin_epp_logs_path(created_after: 'today')
|
||||
%li= link_to t('.repp_log'), admin_repp_logs_path(created_after: 'today')
|
||||
%li= link_to t('.que'), '/admin/que'
|
||||
|
||||
- if signed_in?
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
%li= link_to t(:log_out, user: current_user), '/admin/logout'
|
Loading…
Add table
Add a link
Reference in a new issue