mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
commit
cef49aec6f
47 changed files with 319 additions and 237 deletions
|
@ -1,6 +1,5 @@
|
|||
#= require jquery
|
||||
#= require jquery_ujs
|
||||
#= require turbolinks
|
||||
#= require bootstrap-sprockets
|
||||
#= require typeahead.bundle.min
|
||||
#= require admin/autocomplete
|
||||
|
@ -10,5 +9,6 @@
|
|||
#= require jquery-ui/datepicker
|
||||
#= require select2
|
||||
#= require jquery.doubleScroll
|
||||
#= require shared/general
|
||||
#= require admin/application
|
||||
#= require admin/combobox
|
||||
#= require admin/datepicker
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$(document).on 'page:change', ->
|
||||
$(window).load ->
|
||||
$('.selectize').selectize({
|
||||
allowEmptyOption: true
|
||||
})
|
||||
|
@ -6,23 +6,12 @@ $(document).on 'page:change', ->
|
|||
allowEmptyOption: true, create: true
|
||||
})
|
||||
|
||||
$('.js-datepicker').datepicker({
|
||||
showAnim: "",
|
||||
autoclose: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
})
|
||||
|
||||
# client side validate all forms
|
||||
$('form').each ->
|
||||
$(this).validate()
|
||||
|
||||
|
||||
$('[data-toggle="popover"]').popover()
|
||||
|
||||
|
||||
|
||||
|
||||
# doublescroll
|
||||
$('[data-doublescroll]').doubleScroll({
|
||||
onlyIfScroll: false,
|
||||
|
@ -50,4 +39,3 @@ $(document).on 'page:change', ->
|
|||
$(window).scroll(positionSlider).resize positionSlider
|
||||
#due .report-table width: auto top scrollbar appears after resize so we do fake resize action
|
||||
$(window).resize()
|
||||
|
||||
|
|
9
app/assets/javascripts/admin/combobox.js
Normal file
9
app/assets/javascripts/admin/combobox.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
var comboBoxFields = $('.js-combobox');
|
||||
|
||||
if (comboBoxFields.length) {
|
||||
comboBoxFields.select2({
|
||||
width: "100%",
|
||||
selectOnBlur: true,
|
||||
dropdownAutoWidth: self === top
|
||||
});
|
||||
}
|
3
app/assets/javascripts/admin/datepicker.js
Normal file
3
app/assets/javascripts/admin/datepicker.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
$('.datepicker').datepicker({
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
|
@ -1,6 +1,5 @@
|
|||
class Admin::SessionsController < Devise::SessionsController
|
||||
skip_authorization_check only: :create
|
||||
layout 'admin/application'
|
||||
|
||||
def login
|
||||
@admin_user = AdminUser.new
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class AdminController < ApplicationController
|
||||
layout 'admin/application'
|
||||
before_action :authenticate_user!
|
||||
|
||||
helper_method :head_title_sufix
|
||||
|
|
44
app/views/admin/_menu.haml
Normal file
44
app/views/admin/_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, Pricelist
|
||||
%li= link_to t(:pricelists), admin_pricelists_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(:zonefile), admin_zonefile_settings_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'
|
|
@ -38,8 +38,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_account_activities_path, class: 'btn btn-default')
|
||||
.row
|
||||
.col-md-3
|
||||
.col-md-3
|
||||
|
@ -87,8 +86,3 @@
|
|||
.row
|
||||
.col-md-12
|
||||
= paginate @account_activities
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_account_activities_path}"
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
.col-md-8.text-right
|
||||
= button_tag(t(:save), class: 'btn btn-warning')
|
||||
|
||||
:coffee
|
||||
$("#admin_user_password").removeAttr('required')
|
||||
$("#admin_user_password_confirmation").removeAttr('required')
|
||||
|
||||
:javascript
|
||||
window.addEventListener('load', function() {
|
||||
$("#admin_user_password").removeAttr('required');
|
||||
$("#admin_user_password_confirmation").removeAttr('required');
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:create_new_user), new_admin_admin_user_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:admin_users)
|
||||
= link_to(t('.new_btn'), new_admin_admin_user_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -23,7 +23,7 @@
|
|||
%td= x.email
|
||||
%td= x.identity_code
|
||||
- if x.roles
|
||||
%td= t(x.roles.first)
|
||||
%td= x.roles.first
|
||||
- else
|
||||
%td
|
||||
.row
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
= render 'shared/title', name: t(:create_new_user)
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
= render 'form'
|
||||
|
|
|
@ -46,12 +46,12 @@
|
|||
= f.label :role, class: 'required'
|
||||
.col-md-7
|
||||
= select_tag 'api_user[roles][]',
|
||||
options_for_select(ApiUser::ROLES.map {|x| [t(x), x] }, @api_user.roles.try(:first)),
|
||||
options_for_select(ApiUser::ROLES.map {|x| [x, x] }, @api_user.roles.try(:first)),
|
||||
class: 'form-control selectize'
|
||||
.checkbox
|
||||
%label{for: 'api_user_active'}
|
||||
= f.check_box(:active)
|
||||
= t(:active)
|
||||
= t('.active')
|
||||
|
||||
%hr
|
||||
|
||||
|
@ -59,6 +59,8 @@
|
|||
.col-md-8.text-right
|
||||
= button_tag(t(:save), class: 'btn btn-primary')
|
||||
|
||||
:coffee
|
||||
Autocomplete.bindAdminRegistrarSearch()
|
||||
$("#api_user_password").removeAttr('required')
|
||||
:javascript
|
||||
window.addEventListener('load', function() {
|
||||
Autocomplete.bindAdminRegistrarSearch();
|
||||
$("#api_user_password").removeAttr('required');
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:create_new_api_user), new_admin_api_user_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:api_users)
|
||||
= link_to(t('.new_btn'), new_admin_api_user_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -13,7 +13,7 @@
|
|||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'registrar_name', t(:registrar_name))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'active', t(:active))
|
||||
= sort_link(@q, 'active', t('.active'))
|
||||
%tbody
|
||||
- @api_users.each do |x|
|
||||
%tr
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
= render 'shared/title', name: t(:create_new_api_user)
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
= render 'form'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:new), new_admin_blocked_domain_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:blocked_domains)
|
||||
= link_to(t('.new_btn'), new_admin_blocked_domain_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -28,8 +28,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_blocked_domains_path, class: 'btn btn-default')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -61,8 +60,3 @@
|
|||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @domains.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_blocked_domains_path}"
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_contact_versions_path, class: 'btn btn-default')
|
||||
%hr
|
||||
|
||||
|
||||
|
@ -78,9 +77,3 @@
|
|||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @versions.total_count)
|
||||
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_contact_versions_path}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:add_new_status), '#', class: 'btn btn-primary js-add-status')
|
||||
= link_to(t(:back_to_contact), [:admin, @contact], class: 'btn btn-default')
|
||||
= link_to(t('.new_status_btn'), '#', class: 'btn btn-primary js-add-status')
|
||||
= link_to(t('.back_btn'), [:admin, @contact], class: 'btn btn-default')
|
||||
= render 'shared/title', name: "#{t(:edit)}: #{@contact.name}"
|
||||
|
||||
= render 'form', contact: @contact
|
||||
|
|
|
@ -70,8 +70,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_contacts_path, class: 'btn btn-default')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -106,8 +105,3 @@
|
|||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @contacts.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_contacts_path}"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar_name), :registrar_name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:valid_to), :valid_to
|
||||
%th{class: 'col-xs-3'}= t(:roles)
|
||||
%th{class: 'col-xs-3'}= t('.roles')
|
||||
%tbody
|
||||
- domains.each do |x|
|
||||
%tr
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
|
||||
%br
|
||||
|
||||
%dt= t(:created)
|
||||
%dt= t('.created')
|
||||
%dd
|
||||
= l(@contact.created_at, format: :short)
|
||||
by
|
||||
= creator_link(@contact)
|
||||
|
||||
%dt= t(:updated)
|
||||
%dt= t('.updated')
|
||||
%dd
|
||||
= l(@contact.updated_at, format: :short)
|
||||
by
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_domain_versions_path, class: 'btn btn-default')
|
||||
%hr
|
||||
|
||||
|
||||
|
@ -84,9 +83,3 @@
|
|||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @versions.total_count)
|
||||
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_domain_versions_path}"
|
||||
|
|
|
@ -47,8 +47,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_domains_path, class: 'btn btn-default')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -80,8 +79,3 @@
|
|||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @domains.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_domains_path}"
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
%dt= t(:valid_to)
|
||||
%dd= l(@domain.valid_to)
|
||||
|
||||
%dt= t(:outzone_at)
|
||||
%dt= t('.outzone_time')
|
||||
%dd= l(@domain.outzone_at)
|
||||
|
||||
%dt= t(:delete_at)
|
||||
%dt= t('.delete_time')
|
||||
%dd= l(@domain.delete_at)
|
||||
|
||||
%dt= t(:force_delete_at)
|
||||
%dt= t('.force_delete_time')
|
||||
%dd= l(@domain.force_delete_at)
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
%table.table.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-1'}= t(:timestap)
|
||||
%th{class: 'col-xs-1'}= t('.time')
|
||||
%th{class: 'col-xs-2'}= t(:statuses)
|
||||
%th{class: 'col-xs-1'}= t(:period)
|
||||
%th{class: 'col-xs-2'}= t(:registrant)
|
||||
%th{class: 'col-xs-2'}= t(:admin)
|
||||
%th{class: 'col-xs-2'}= t('.admin_contact')
|
||||
%th{class: 'col-xs-2'}= t(:tech)
|
||||
%th{class: 'col-xs-2'}= t(:nameservers)
|
||||
%th{class: 'col-xs-2'}= t(:dnskeys)
|
||||
|
@ -36,10 +36,15 @@
|
|||
= render 'admin/domains/partials/version',
|
||||
domain: version.reify, version: version.previous
|
||||
|
||||
:coffee
|
||||
$(document).on 'click', '.js-pending, .js-event', (e) ->
|
||||
e.preventDefault()
|
||||
:javascript
|
||||
window.addEventListener('load', function() {
|
||||
$(document).on('click', '.js-pending, .js-event', function(e) {
|
||||
return e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on 'mousedown', '.js-pending, .js-event', (e) ->
|
||||
target = $(e.target)
|
||||
target.parents('tr').nextUntil('tr.small' ,'tr.' + this.className).toggle()
|
||||
$(document).on('mousedown', '.js-pending, .js-event', function(e) {
|
||||
var target;
|
||||
target = $(e.target);
|
||||
return target.parents('tr').nextUntil('tr.small', 'tr.' + this.className).toggle();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render 'shared/title', name: t(:epp_logs)
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -41,8 +41,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_epp_logs_path, class: 'btn btn-default')
|
||||
.row
|
||||
.col-md-12
|
||||
%hr
|
||||
|
@ -70,8 +69,3 @@
|
|||
.row
|
||||
.col-md-12
|
||||
= paginate @epp_logs
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_epp_logs_path}"
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
= f.label :valid_from, t(:valid)
|
||||
.input-group
|
||||
= f.text_field(:valid_from, value: f.object.valid_from.try(:to_s, :dshort),
|
||||
class: 'form-control js-datepicker')
|
||||
class: 'form-control datepicker')
|
||||
%span.input-group-addon -
|
||||
= f.text_field(:valid_to, value: f.object.valid_to.try(:to_s, :dshort),
|
||||
class: 'form-control js-datepicker')
|
||||
class: 'form-control datepicker')
|
||||
|
||||
%hr
|
||||
.row
|
||||
|
|
|
@ -68,16 +68,16 @@
|
|||
#epp-users.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t(:api_users)
|
||||
= t('.api_users')
|
||||
.pull-right
|
||||
= link_to(t(:create_new_api_user), new_admin_registrar_api_user_path(@registrar), class: 'btn btn-default btn-xs')
|
||||
= link_to(t('.new_api_use_btn'), new_admin_registrar_api_user_path(@registrar), class: 'btn btn-default btn-xs')
|
||||
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}= t(:username)
|
||||
%th{class: 'col-xs-6'}= t(:active)
|
||||
%th{class: 'col-xs-6'}= t('.active')
|
||||
%tbody
|
||||
- @registrar.api_users.each do |x|
|
||||
%tr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render 'shared/title', name: t(:repp_logs)
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -39,8 +39,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_repp_logs_path, class: 'btn btn-default')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -67,8 +66,3 @@
|
|||
.row
|
||||
.col-md-12
|
||||
= paginate @repp_logs
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_repp_logs_path}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:new), new_admin_reserved_domain_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:reserved_domains)
|
||||
= link_to(t('.new_btn'), new_admin_reserved_domain_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t('.title')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -28,8 +28,7 @@
|
|||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
= link_to(t('.reset_btn'), admin_reserved_domains_path, class: 'btn btn-default')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -65,8 +64,3 @@
|
|||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @domains.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_reserved_domains_path}"
|
||||
|
|
|
@ -31,16 +31,22 @@
|
|||
- value = f.object.new_record? ? '' : f.object.status_notes[s]
|
||||
= text_field_tag "#{model}[status_notes_array][]", value, class: 'form-control'
|
||||
|
||||
:coffee
|
||||
$("#js-statuses").nestedAttributes
|
||||
bindAddTo: $(".js-add-status")
|
||||
afterAdd: (el) ->
|
||||
if el.find('.js-disabled-value')
|
||||
el.find('.js-disabled-value').remove()
|
||||
el.find('.js-select').show()
|
||||
el.find('.hide-when-new').hide()
|
||||
el.find('.js-destroy-status').show()
|
||||
:javascript
|
||||
window.addEventListener('load', function() {
|
||||
$("#js-statuses").nestedAttributes({
|
||||
bindAddTo: $(".js-add-status"),
|
||||
afterAdd: function(el) {
|
||||
if (el.find('.js-disabled-value')) {
|
||||
el.find('.js-disabled-value').remove();
|
||||
el.find('.js-select').show();
|
||||
el.find('.hide-when-new').hide();
|
||||
return el.find('.js-destroy-status').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on 'click', '.js-destroy-status', (e) ->
|
||||
e.preventDefault()
|
||||
$(this).parents('.panel').remove()
|
||||
$(document).on('click', '.js-destroy-status', function(e) {
|
||||
e.preventDefault();
|
||||
return $(this).parents('.panel').remove();
|
||||
});
|
||||
});
|
||||
|
|
36
app/views/layouts/admin.haml
Normal file
36
app/views/layouts/admin.haml
Normal file
|
@ -0,0 +1,36 @@
|
|||
!!! 5
|
||||
%html{lang: I18n.locale.to_s}
|
||||
%head
|
||||
%meta{charset: "utf-8"}/
|
||||
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
|
||||
- if content_for? :head_title
|
||||
= yield :head_title
|
||||
- else
|
||||
%title= t(:admin_head_title)
|
||||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%span.sr-only Toggle navigation
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to admin_dashboard_path, class: 'navbar-brand' do
|
||||
= ENV['app_name']
|
||||
- if unstable_env.present?
|
||||
.text-center
|
||||
%small{style: 'color: #0074B3;'}= unstable_env
|
||||
|
||||
= render 'menu'
|
||||
.container
|
||||
= render 'shared/flash'
|
||||
= yield
|
||||
|
||||
.footer.text-right
|
||||
Version
|
||||
= CURRENT_COMMIT_HASH
|
||||
= javascript_include_tag 'admin-manifest', async: true
|
|
@ -1,85 +0,0 @@
|
|||
!!! 5
|
||||
%html{lang: I18n.locale.to_s}
|
||||
%head
|
||||
%meta{charset: "utf-8"}/
|
||||
%meta{content: "IE=edge", "http-equiv" => "X-UA-Compatible"}/
|
||||
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
|
||||
%meta{content: "Full stack top-level domain (TLD) management.", name: "description"}/
|
||||
%meta{content: "Gitlab LTD", name: "author"}/
|
||||
- if content_for? :head_title
|
||||
= yield :head_title
|
||||
- else
|
||||
%title= t(:admin_head_title)
|
||||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all', 'data-turbolinks-track' => true
|
||||
= javascript_include_tag 'admin-manifest', 'data-turbolinks-track' => true
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
/ Static navbar
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%span.sr-only Toggle navigation
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to admin_dashboard_path, class: 'navbar-brand' do
|
||||
= ENV['app_name']
|
||||
- if unstable_env.present?
|
||||
.text-center
|
||||
%small{style: 'color: #0074B3;'}= unstable_env
|
||||
|
||||
.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, Pricelist
|
||||
%li= link_to t(:pricelists), admin_pricelists_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(:domains_history), admin_domain_versions_path
|
||||
%li= link_to t(:contacts_history), admin_contact_versions_path
|
||||
%li.divider
|
||||
%li.dropdown-header= t(:system)
|
||||
%li= link_to t(:settings), admin_settings_path
|
||||
%li= link_to t(:zonefile), admin_zonefile_settings_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(:domains_history), admin_domain_versions_path
|
||||
%li= link_to t(:epp_logs), admin_epp_logs_path(created_after: 'today')
|
||||
%li= link_to t(:repp_logs), 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'
|
||||
|
||||
.container
|
||||
= render 'shared/flash'
|
||||
= yield
|
||||
|
||||
.footer.text-right
|
||||
Version
|
||||
= CURRENT_COMMIT_HASH
|
29
app/views/layouts/devise.haml
Normal file
29
app/views/layouts/devise.haml
Normal file
|
@ -0,0 +1,29 @@
|
|||
!!! 5
|
||||
%html{lang: I18n.locale.to_s}
|
||||
%head
|
||||
%meta{charset: "utf-8"}/
|
||||
- if content_for? :head_title
|
||||
= yield :head_title
|
||||
- else
|
||||
%title= t(:admin_head_title)
|
||||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%span.sr-only Toggle navigation
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to admin_dashboard_path, class: 'navbar-brand' do
|
||||
= ENV['app_name']
|
||||
- if unstable_env.present?
|
||||
.text-center
|
||||
%small{style: 'color: #0074B3;'}= unstable_env
|
||||
|
||||
.container
|
||||
= render 'shared/flash'
|
||||
= yield
|
5
config/locales/admin/account_activities.en.yml
Normal file
5
config/locales/admin/account_activities.en.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
en:
|
||||
admin:
|
||||
account_activities:
|
||||
index:
|
||||
reset_btn: Reset
|
8
config/locales/admin/admin_users.en.yml
Normal file
8
config/locales/admin/admin_users.en.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
en:
|
||||
admin:
|
||||
admin_users:
|
||||
index:
|
||||
title: Admin users
|
||||
new_btn: New admin user
|
||||
new:
|
||||
title: New admin user
|
13
config/locales/admin/api_users.en.yml
Normal file
13
config/locales/admin/api_users.en.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
en:
|
||||
admin:
|
||||
api_users:
|
||||
index:
|
||||
new_btn: New API user
|
||||
title: API users
|
||||
active: Active
|
||||
|
||||
new:
|
||||
title: New API user
|
||||
|
||||
form:
|
||||
active: Active
|
7
config/locales/admin/blocked_domains.en.yml
Normal file
7
config/locales/admin/blocked_domains.en.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
en:
|
||||
admin:
|
||||
blocked_domains:
|
||||
index:
|
||||
title: Blocked domains
|
||||
new_btn: New blocked domain
|
||||
reset_btn: Reset
|
5
config/locales/admin/contact_versions.en.yml
Normal file
5
config/locales/admin/contact_versions.en.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
en:
|
||||
admin:
|
||||
contact_versions:
|
||||
index:
|
||||
reset_btn: Reset
|
17
config/locales/admin/contacts.en.yml
Normal file
17
config/locales/admin/contacts.en.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
en:
|
||||
admin:
|
||||
contacts:
|
||||
index:
|
||||
reset_btn: Reset
|
||||
|
||||
edit:
|
||||
new_status_btn: Add new status
|
||||
back_btn: Back to contact
|
||||
|
||||
partials:
|
||||
general:
|
||||
created: Created
|
||||
updated: Updated
|
||||
|
||||
domains:
|
||||
roles: Roles
|
5
config/locales/admin/domain_versions.en.yml
Normal file
5
config/locales/admin/domain_versions.en.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
en:
|
||||
admin:
|
||||
domain_versions:
|
||||
archive:
|
||||
reset_btn: Reset
|
15
config/locales/admin/domains.en.yml
Normal file
15
config/locales/admin/domains.en.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
en:
|
||||
admin:
|
||||
domains:
|
||||
index:
|
||||
reset_btn: Reset
|
||||
|
||||
versions:
|
||||
time: Time
|
||||
admin_contact: Admin contact
|
||||
|
||||
partials:
|
||||
general:
|
||||
outzone_time: Outzone time
|
||||
delete_time: Delete time
|
||||
force_delete_time: Force delete time
|
6
config/locales/admin/epp_logs.en.yml
Normal file
6
config/locales/admin/epp_logs.en.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
admin:
|
||||
epp_logs:
|
||||
index:
|
||||
title: EPP log
|
||||
reset_btn: Reset
|
14
config/locales/admin/menu.en.yml
Normal file
14
config/locales/admin/menu.en.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
en:
|
||||
admin:
|
||||
menu:
|
||||
users: Users
|
||||
api_users: API users
|
||||
admin_users: Admin users
|
||||
archive: Archive
|
||||
domain_history: Domain history
|
||||
contact_history: Contact history
|
||||
blocked_domains: Blocked domains
|
||||
reserved_domains: Reserved domains
|
||||
epp_log: EPP log
|
||||
repp_log: REPP log
|
||||
que: Que
|
7
config/locales/admin/registrars.en.yml
Normal file
7
config/locales/admin/registrars.en.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
en:
|
||||
admin:
|
||||
registrars:
|
||||
show:
|
||||
new_api_use_btn: New API user
|
||||
active: Active
|
||||
api_users: API users
|
6
config/locales/admin/repp_logs.en.yml
Normal file
6
config/locales/admin/repp_logs.en.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
admin:
|
||||
repp_logs:
|
||||
index:
|
||||
title: REPP log
|
||||
reset_btn: Reset
|
7
config/locales/admin/reserved_domains.en.yml
Normal file
7
config/locales/admin/reserved_domains.en.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
en:
|
||||
admin:
|
||||
reserved_domains:
|
||||
index:
|
||||
title: Reserved domains
|
||||
new_btn: New reserved domain
|
||||
reset_btn: Reset
|
|
@ -407,13 +407,10 @@ en:
|
|||
failed_to_delete_registrar: 'Failed to delete registrar'
|
||||
|
||||
users: 'Users'
|
||||
create_new_user: 'Create new user'
|
||||
admin: 'Admin'
|
||||
user_details: 'User details'
|
||||
edit_user: 'Edit user'
|
||||
back_to_user: 'Back to user'
|
||||
|
||||
create_new_api_user: 'Create new API user'
|
||||
certificate_signing_req: 'Certificate signing request'
|
||||
csr: 'CSR'
|
||||
crt: 'CRT'
|
||||
|
@ -459,11 +456,8 @@ en:
|
|||
ds_digest_type: 'DS digest type'
|
||||
zonefile_settings: 'Zonefile settings'
|
||||
background_jobs: Background jobs
|
||||
domain_history: Domain history
|
||||
domains_history: Domains history
|
||||
admin_users: Admin users
|
||||
role: 'Role'
|
||||
admin: 'Administrator'
|
||||
user: 'User'
|
||||
customer_service: 'Customer service'
|
||||
keyrelays: 'Keyrelays'
|
||||
|
@ -484,8 +478,6 @@ en:
|
|||
action_failed_due_to_server_error: 'Action failed due to server error'
|
||||
pending_transfer_was_not_found: 'Pending transfer was not found'
|
||||
transfer_can_be_rejected_only_by_current_registrar: 'Transfer can be rejected only by current registrar'
|
||||
epp_logs: 'EPP logs'
|
||||
epp_log: 'EPP log'
|
||||
request_command: 'Request command'
|
||||
request_object: 'Request object'
|
||||
api_user: 'API user'
|
||||
|
@ -497,8 +489,6 @@ en:
|
|||
request_method: 'Request method'
|
||||
response_code: 'Response code'
|
||||
request_params: 'Request params'
|
||||
repp_log: 'REPP log'
|
||||
repp_logs: 'REPP logs'
|
||||
could_not_determine_object_type_check_xml_format_and_namespaces: 'Could not determine object type. Check XML format and namespaces.'
|
||||
unknown_expiry_relative_pattern: 'Expiry relative must be compatible to ISO 8601'
|
||||
unknown_expiry_absolute_pattern: 'Expiry absolute must be compatible to ISO 8601'
|
||||
|
@ -850,7 +840,6 @@ en:
|
|||
webserver_missing_client_cert_directive: 'Webserver missing client cert directive'
|
||||
webserver_client_cert_directive_should_be_required: 'Webserver client cert directive should be required'
|
||||
tech: Tech contact
|
||||
admin: Admin contact
|
||||
pricelists: Pricelists
|
||||
new_pricelist: New Pricelist
|
||||
valid: Valid
|
||||
|
@ -884,7 +873,6 @@ en:
|
|||
registry_state: 'State / Province'
|
||||
registry_zip: 'Postcode'
|
||||
registry_country_code: 'Country'
|
||||
blocked_domains: 'Blocked domains'
|
||||
billing_failure_credit_balance_low: 'Billing failure - credit balance low'
|
||||
create: 'Create'
|
||||
activity_type: 'Activity type'
|
||||
|
@ -892,7 +880,6 @@ en:
|
|||
receipt_date_until: 'Receipt date until'
|
||||
add_credit: 'Add credit'
|
||||
export_csv: 'Export CSV'
|
||||
reserved_domains: 'Reserved domains'
|
||||
invalid_yaml: 'Invalid YAML'
|
||||
reserved_pw: 'Reserved pw'
|
||||
no_transfers_found: 'No transfers found'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue