Keyrelay list on domain, translations refactor

This commit is contained in:
Martin Lensment 2014-12-19 18:28:24 +02:00
parent c15b4d48b9
commit ee060fca1a
56 changed files with 439 additions and 356 deletions

View file

@ -19,11 +19,11 @@ class Admin::DomainsController < AdminController
add_prefix_to_statuses add_prefix_to_statuses
if @domain.update(domain_params) if @domain.update(domain_params)
flash[:notice] = I18n.t('shared.domain_updated') flash[:notice] = I18n.t('domain_updated')
redirect_to [:admin, @domain] redirect_to [:admin, @domain]
else else
@domain.domain_statuses.build if @domain.domain_statuses.empty? @domain.domain_statuses.build if @domain.domain_statuses.empty?
flash.now[:alert] = I18n.t('shared.failed_to_update_domain') flash.now[:alert] = I18n.t('failed_to_update_domain')
render 'edit' render 'edit'
end end
end end

View file

@ -15,10 +15,10 @@ class Admin::EppUsersController < AdminController
@epp_user = EppUser.new(epp_user_params) @epp_user = EppUser.new(epp_user_params)
if @epp_user.save if @epp_user.save
flash[:notice] = I18n.t('shared.record_created') flash[:notice] = I18n.t('record_created')
redirect_to [:admin, @epp_user] redirect_to [:admin, @epp_user]
else else
flash.now[:alert] = I18n.t('shared.failed_to_create_record') flash.now[:alert] = I18n.t('failed_to_create_record')
render 'new' render 'new'
end end
end end
@ -29,20 +29,20 @@ class Admin::EppUsersController < AdminController
def update def update
if @epp_user.update(epp_user_params) if @epp_user.update(epp_user_params)
flash[:notice] = I18n.t('shared.record_updated') flash[:notice] = I18n.t('record_updated')
redirect_to [:admin, @epp_user] redirect_to [:admin, @epp_user]
else else
flash.now[:alert] = I18n.t('shared.failed_to_update_record') flash.now[:alert] = I18n.t('failed_to_update_record')
render 'edit' render 'edit'
end end
end end
def destroy def destroy
if @epp_user.destroy if @epp_user.destroy
flash[:notice] = I18n.t('shared.record_deleted') flash[:notice] = I18n.t('record_deleted')
redirect_to admin_epp_users_path redirect_to admin_epp_users_path
else else
flash.now[:alert] = I18n.t('shared.failed_to_delete_record') flash.now[:alert] = I18n.t('failed_to_delete_record')
render 'show' render 'show'
end end
end end

View file

@ -0,0 +1,7 @@
class Admin::KeyrelaysController < AdminController
load_and_authorize_resource
def show
end
end

View file

@ -18,10 +18,10 @@ class Admin::RegistrarsController < AdminController
@registrar = Registrar.new(registrar_params) @registrar = Registrar.new(registrar_params)
if @registrar.save if @registrar.save
flash[:notice] = I18n.t('shared.registrar_added') flash[:notice] = I18n.t('registrar_added')
redirect_to [:admin, @registrar] redirect_to [:admin, @registrar]
else else
flash.now[:alert] = I18n.t('shared.failed_to_add_registrar') flash.now[:alert] = I18n.t('failed_to_add_registrar')
render 'new' render 'new'
end end
end end
@ -30,20 +30,20 @@ class Admin::RegistrarsController < AdminController
def update def update
if @registrar.update(registrar_params) if @registrar.update(registrar_params)
flash[:notice] = I18n.t('shared.registrar_updated') flash[:notice] = I18n.t('registrar_updated')
redirect_to [:admin, @registrar] redirect_to [:admin, @registrar]
else else
flash.now[:alert] = I18n.t('shared.failed_to_update_registrar') flash.now[:alert] = I18n.t('failed_to_update_registrar')
render 'edit' render 'edit'
end end
end end
def destroy def destroy
if @registrar.destroy if @registrar.destroy
flash[:notice] = I18n.t('shared.registrar_deleted') flash[:notice] = I18n.t('registrar_deleted')
redirect_to admin_registrars_path redirect_to admin_registrars_path
else else
flash.now[:alert] = I18n.t('shared.failed_to_delete_registrar') flash.now[:alert] = I18n.t('failed_to_delete_registrar')
render 'show' render 'show'
end end
end end

View file

@ -11,7 +11,7 @@ class Admin::SettingsController < AdminController
Setting[k] = v Setting[k] = v
end end
flash[:notice] = I18n.t('shared.records_updated') flash[:notice] = I18n.t('records_updated')
redirect_to [:admin, :settings] redirect_to [:admin, :settings]
end end
@ -19,10 +19,10 @@ class Admin::SettingsController < AdminController
def update def update
if @setting_group.update(setting_group_params) if @setting_group.update(setting_group_params)
flash[:notice] = I18n.t('shared.setting_updated') flash[:notice] = I18n.t('setting_updated')
redirect_to [:admin, @setting_group] redirect_to [:admin, @setting_group]
else else
flash[:alert] = I18n.t('shared.failed_to_update_setting') flash[:alert] = I18n.t('failed_to_update_setting')
render 'show' render 'show'
end end
end end

View file

@ -15,10 +15,10 @@ class Admin::UsersController < AdminController
@user = User.new(user_params) @user = User.new(user_params)
if @user.save if @user.save
flash[:notice] = I18n.t('shared.record_created') flash[:notice] = I18n.t('record_created')
redirect_to [:admin, @user] redirect_to [:admin, @user]
else else
flash.now[:alert] = I18n.t('shared.failed_to_create_record') flash.now[:alert] = I18n.t('failed_to_create_record')
render 'new' render 'new'
end end
end end
@ -29,20 +29,20 @@ class Admin::UsersController < AdminController
def update def update
if @user.update(user_params) if @user.update(user_params)
flash[:notice] = I18n.t('shared.record_updated') flash[:notice] = I18n.t('record_updated')
redirect_to [:admin, @user] redirect_to [:admin, @user]
else else
flash.now[:alert] = I18n.t('shared.failed_to_update_record') flash.now[:alert] = I18n.t('failed_to_update_record')
render 'edit' render 'edit'
end end
end end
def destroy def destroy
if @user.destroy if @user.destroy
flash[:notice] = I18n.t('shared.record_deleted') flash[:notice] = I18n.t('record_deleted')
redirect_to admin_users_path redirect_to admin_users_path
else else
flash.now[:alert] = I18n.t('shared.failed_to_delete_record') flash.now[:alert] = I18n.t('failed_to_delete_record')
render 'show' render 'show'
end end
end end

View file

@ -11,10 +11,10 @@ class Admin::ZonefileSettingsController < ApplicationController
def update def update
if @zonefile_setting.update(zonefile_setting_params) if @zonefile_setting.update(zonefile_setting_params)
flash[:notice] = I18n.t('shared.record_updated') flash[:notice] = I18n.t('record_updated')
redirect_to admin_zonefile_settings_path redirect_to admin_zonefile_settings_path
else else
flash.now[:alert] = I18n.t('shared.failed_to_update_record') flash.now[:alert] = I18n.t('failed_to_update_record')
render 'edit' render 'edit'
end end
end end

View file

@ -8,7 +8,7 @@ class SessionsController < Devise::SessionsController
return redirect_to :back, alert: 'No user' if @user.blank? return redirect_to :back, alert: 'No user' if @user.blank?
flash[:notice] = I18n.t('shared.welcome') flash[:notice] = I18n.t('welcome')
sign_in_and_redirect @user, event: :authentication sign_in_and_redirect @user, event: :authentication
# end # end
end end

View file

@ -118,7 +118,7 @@ module Epp::DomainsHelper
end end
if parsed_frame.css('dsData').count > 0 && parsed_frame.css('create > keyData').count > 0 if parsed_frame.css('dsData').count > 0 && parsed_frame.css('create > keyData').count > 0
epp_errors << { code: '2306', msg: I18n.t('shared.ds_data_and_key_data_must_not_exists_together') } epp_errors << { code: '2306', msg: I18n.t('ds_data_and_key_data_must_not_exists_together') }
ret = false ret = false
end end
ret ret

View file

@ -22,6 +22,7 @@ class Ability
can :manage, DomainVersion can :manage, DomainVersion
can :manage, User can :manage, User
can :manage, EppUser can :manage, EppUser
can :manage, Keyrelay
can :index, :delayed_job can :index, :delayed_job
can :create, :zonefile can :create, :zonefile
can :access, :settings_menu can :access, :settings_menu

View file

@ -336,7 +336,7 @@ class Epp::EppDomain < Domain
def approve_pending_transfer(current_user) def approve_pending_transfer(current_user)
pt = pending_transfer pt = pending_transfer
if current_user.registrar != pt.transfer_from if current_user.registrar != pt.transfer_from
add_epp_error('2304', nil, nil, I18n.t('shared.transfer_can_be_approved_only_by_current_registrar')) add_epp_error('2304', nil, nil, I18n.t('transfer_can_be_approved_only_by_current_registrar'))
return false return false
end end

View file

@ -1,6 +1,6 @@
.row .row
.col-sm-12 .col-sm-12
%h2.text-center-xs= t('shared.contacts') %h2.text-center-xs= t('contacts')
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -22,13 +22,13 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'name', t('shared.name')) = sort_link(@q, 'name', t('name'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'code', t('shared.code')) = sort_link(@q, 'code', t('code'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'ident', t('shared.identity_code')) = sort_link(@q, 'ident', t('identity_code'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'email', t('shared.email')) = sort_link(@q, 'email', t('email'))
%tbody %tbody
- @contacts.each do |x| - @contacts.each do |x|
%tr %tr

View file

@ -1,28 +1,28 @@
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.address') %h3.panel-title= t('address')
.panel-body .panel-body
- unless @contact.address.nil? - unless @contact.address.nil?
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.country') %dt= t('country')
%dd= @contact.address.country %dd= @contact.address.country
%dt= t('shared.city') %dt= t('city')
%dd= @contact.address.city %dd= @contact.address.city
%dt= t('shared.street') %dt= t('street')
%dd= @contact.address.street %dd= @contact.address.street
- if @contact.address.street2 - if @contact.address.street2
%dt= t('shared.street') %dt= t('street')
%dd= @contact.address.street2 %dd= @contact.address.street2
- if @contact.address.street3 - if @contact.address.street3
%dt= t('shared.street') %dt= t('street')
%dd= @contact.address.street3 %dd= @contact.address.street3
%dt= t('shared.zip') %dt= t('zip')
%dd= @contact.address.zip %dd= @contact.address.zip

View file

@ -1,12 +1,12 @@
#contacts.panel.panel-default #contacts.panel.panel-default
.panel-heading= t('shared.domains') .panel-heading= t('domains')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-4'}= t('shared.domain_name') %th{class: 'col-xs-4'}= t('domain_name')
%th{class: 'col-xs-4'}= t('shared.registrar') %th{class: 'col-xs-4'}= t('registrar')
%th{class: 'col-xs-4'}= t('shared.valid_to') %th{class: 'col-xs-4'}= t('valid_to')
%tbody %tbody
- @contact.domains_owned.each do |x| - @contact.domains_owned.each do |x|
%tr %tr

View file

@ -1,32 +1,32 @@
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.general') %h3.panel-title= t('general')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.name') %dt= t('name')
%dd= @contact.name %dd= @contact.name
%dt= t('shared.org_name') %dt= t('org_name')
%dd= @contact.org_name %dd= @contact.org_name
%dt= t('shared.code') %dt= t('code')
%dd= @contact.code %dd= @contact.code
%dt= t('shared.ident') %dt= t('ident')
%dd= @contact.ident %dd= @contact.ident
%dt= t('shared.ident_type') %dt= t('ident_type')
%dd= @contact.ident_type %dd= @contact.ident_type
%dt= t('shared.email') %dt= t('email')
%dd= @contact.email %dd= @contact.email
%dt= t('shared.phone') %dt= t('phone')
%dd= @contact.phone %dd= @contact.phone
- if @contact.fax - if @contact.fax
%dt= t('shared.fax') %dt= t('fax')
%dd= @contact.fax %dd= @contact.fax
%dt= t('shared.password') %dt= t('password')
%dd= @contact.auth_info %dd= @contact.auth_info

View file

@ -1,7 +1,7 @@
.row .row
.col-sm-12 .col-sm-12
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.contact_details')}" = "#{t('contact_details')}"
%hr %hr
.row .row
.col-md-6= render 'admin/contacts/partials/general' .col-md-6= render 'admin/contacts/partials/general'

View file

@ -1,6 +1,6 @@
.row .row
.col-sm-12 .col-sm-12
%h2.text-center-xs= t('shared.jobs') %h2.text-center-xs= t('jobs')
%hr %hr
.row .row
@ -9,11 +9,11 @@
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-2'}= t('shared.priority') %th{class: 'col-xs-2'}= t('priority')
%th{class: 'col-xs-2'}= t('shared.attempts') %th{class: 'col-xs-2'}= t('attempts')
%th{class: 'col-xs-2'}= t('shared.last_error') %th{class: 'col-xs-2'}= t('last_error')
%th{class: 'col-xs-1'}= t('shared.run_at') %th{class: 'col-xs-1'}= t('run_at')
%th{class: 'col-xs-1'}= t('shared.created_at') %th{class: 'col-xs-1'}= t('created_at')
%tbody %tbody
- @jobs.each do |job| - @jobs.each do |job|
%tr %tr

View file

@ -1,6 +1,6 @@
.row .row
.col-sm-12 .col-sm-12
%h2.text-center-xs= t('shared.domains') %h2.text-center-xs= t('domains')
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -9,7 +9,7 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-1'} %th{class: 'col-xs-1'}
= t('shared.name') = t('name')
%th{class: 'col-xs-1'} %th{class: 'col-xs-1'}
= sort_link(@q, 'whodunnit') = sort_link(@q, 'whodunnit')
%th{class: 'col-xs-1'} %th{class: 'col-xs-1'}

View file

@ -12,12 +12,12 @@
%table.table-hover.table-bordered.table-condensed %table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-2'}= t(:'shared.domain_info') %th{class: 'col-xs-2'}= t(:'domain_info')
%th{class: 'col-xs-2'}= t(:'shared.owner_contact') %th{class: 'col-xs-2'}= t(:'owner_contact')
%th{class: 'col-xs-2'}= t(:'shared.admin_contacts') %th{class: 'col-xs-2'}= t(:'admin_contacts')
%th{class: 'col-xs-2'}= t(:'shared.tech_contacts') %th{class: 'col-xs-2'}= t(:'tech_contacts')
%th{class: 'col-xs-2'}= t(:'shared.nameservers') %th{class: 'col-xs-2'}= t(:'nameservers')
%th{class: 'col-xs-1'}= t(:'shared.changes_info') %th{class: 'col-xs-1'}= t(:'changes_info')
%tbody %tbody
- @versions.each do |version| - @versions.each do |version|

View file

@ -7,14 +7,14 @@
%ul.nav.nav-tabs{:role => "tablist", id: 'tabs'} %ul.nav.nav-tabs{:role => "tablist", id: 'tabs'}
- li_class = @domain.statuses_tab_valid? ? nil : 'error-tab' - li_class = @domain.statuses_tab_valid? ? nil : 'error-tab'
%li{class: li_class} %li{class: li_class}
%a{"data-toggle" => "tab", :href => "#statuses-tab", :role => "tab"}= t('shared.statuses') %a{"data-toggle" => "tab", :href => "#statuses-tab", :role => "tab"}= t('statuses')
/ Tab panes / Tab panes
.tab-content{style:'margin-top: 20px;'} .tab-content{style:'margin-top: 20px;'}
#general-tab.tab-pane.active #general-tab.tab-pane.active
= render 'admin/domains/form_partials/statuses', f: f = render 'admin/domains/form_partials/statuses', f: f
.row .row
.col-md-12.text-right .col-md-12.text-right
= button_tag(t('shared.save'), class: 'btn btn-primary') = button_tag(t('save'), class: 'btn btn-primary')
:javascript :javascript
$(function() { $(function() {

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.edit_domain')}" = "#{t('edit_domain')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.back_to_domain'), [:admin, @domain], class: 'btn btn-default') = link_to(t('back_to_domain'), [:admin, @domain], class: 'btn btn-default')
%hr %hr
= render 'form' = render 'form'

View file

@ -2,10 +2,10 @@
= f.fields_for :domain_statuses, @server_statuses do |status_fields| = f.fields_for :domain_statuses, @server_statuses do |status_fields|
.panel.panel-default .panel.panel-default
.panel-heading.clearfix .panel-heading.clearfix
.pull-left= t('shared.status') .pull-left= t('status')
.pull-right .pull-right
= link_to(t('shared.add_another'), '#', class: 'btn btn-primary btn-xs add-domain-status') = link_to(t('add_another'), '#', class: 'btn btn-primary btn-xs add-domain-status')
= link_to(t('shared.delete'), '#', class: 'btn btn-danger btn-xs destroy') = link_to(t('delete'), '#', class: 'btn btn-danger btn-xs destroy')
.panel-body .panel-body
.errors .errors
= render 'shared/errors', object: status_fields.object = render 'shared/errors', object: status_fields.object

View file

@ -1,6 +1,6 @@
.row .row
.col-sm-12 .col-sm-12
%h2.text-center-xs= t('shared.domains') %h2.text-center-xs= t('domains')
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -24,11 +24,11 @@
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'name') = sort_link(@q, 'name')
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t('shared.registrar')) = sort_link(@q, 'registrar_name', t('registrar'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'owner_contact_name', t('shared.owner')) = sort_link(@q, 'owner_contact_name', t('owner'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'valid_to', t('shared.valid_to')) = sort_link(@q, 'valid_to', t('valid_to'))
%tbody %tbody
- @domains.each do |x| - @domains.each do |x|
%tr %tr

View file

@ -1,14 +1,14 @@
- panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default' - panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default'
.panel{class: panel_class} .panel{class: panel_class}
.panel-heading.clearfix .panel-heading.clearfix
= t('shared.admin_contacts') = t('admin_contacts')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-4'}= t('shared.name') %th{class: 'col-xs-4'}= t('name')
%th{class: 'col-xs-4'}= t('shared.code') %th{class: 'col-xs-4'}= t('code')
%th{class: 'col-xs-4'}= t('shared.email') %th{class: 'col-xs-4'}= t('email')
%tbody %tbody
- @domain.domain_contacts.admin.each do |x| - @domain.domain_contacts.admin.each do |x|
%tr %tr

View file

@ -1,15 +1,15 @@
- panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default' - panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default'
#dnskeys.panel{class: panel_class} #dnskeys.panel{class: panel_class}
.panel-heading.clearfix .panel-heading.clearfix
= t('shared.dnskeys') = t('dnskeys')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-1'}= t('shared.flag') %th{class: 'col-xs-1'}= t('flag')
%th{class: 'col-xs-1'}= t('shared.protocol') %th{class: 'col-xs-1'}= t('protocol')
%th{class: 'col-xs-1'}= t('shared.algorithm') %th{class: 'col-xs-1'}= t('algorithm')
%th{class: 'col-xs-9'}= t('shared.public_key') %th{class: 'col-xs-9'}= t('public_key')
%tbody %tbody
- @domain.dnskeys.each do |x| - @domain.dnskeys.each do |x|
%tr %tr

View file

@ -1,22 +1,22 @@
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.general') %h3.panel-title= t('general')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.name') %dt= t('name')
%dd= @domain.name %dd= @domain.name
%dt= t('shared.registered_at') %dt= t('registered_at')
%dd= l(@domain.registered_at) %dd= l(@domain.registered_at)
%dt= t('shared.registrar') %dt= t('registrar')
%dd= link_to(@domain.registrar, root_path) %dd= link_to(@domain.registrar, root_path)
%dt= t('shared.password') %dt= t('password')
%dd= @domain.auth_info %dd= @domain.auth_info
%dt= t('shared.valid_from') %dt= t('valid_from')
%dd= l(@domain.valid_from) %dd= l(@domain.valid_from)
%dt= t('shared.valid_to') %dt= t('valid_to')
%dd= l(@domain.valid_to) %dd= l(@domain.valid_to)

View file

@ -0,0 +1,20 @@
.panel{class: 'panel-default'}
.panel-heading.clearfix
= t('keyrelays')
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-4'}= t('uploaded_at')
%th{class: 'col-xs-2'}= t('expiry_relative')
%th{class: 'col-xs-2'}= t('expiry_absolute')
%th{class: 'col-xs-2'}= t('requester')
%th{class: 'col-xs-2'}= t('accepter')
%tbody
- @domain.keyrelays.includes([:requester, :accepter]).each do |x|
%tr
%td= link_to(x.pa_date, [:admin, x])
%td= x.expiry_relative
%td= x.expiry_absolute
%td= link_to(x.requester, [:admin, x.requester])
%td= link_to(x.accepter, [:admin, x.accepter])

View file

@ -1,14 +1,14 @@
- panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default' - panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default'
#nameservers.panel{class: panel_class} #nameservers.panel{class: panel_class}
.panel-heading.clearfix .panel-heading.clearfix
= t('shared.nameservers') = t('nameservers')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-4'}= t('shared.hostname') %th{class: 'col-xs-4'}= t('hostname')
%th{class: 'col-xs-4'}= t('shared.ipv4') %th{class: 'col-xs-4'}= t('ipv4')
%th{class: 'col-xs-4'}= t('shared.ipv6') %th{class: 'col-xs-4'}= t('ipv6')
%tbody %tbody
- @domain.nameservers.each do |x| - @domain.nameservers.each do |x|
%tr %tr

View file

@ -1,19 +1,19 @@
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.owner') %h3.panel-title= t('owner')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.name') %dt= t('name')
%dd= link_to(@domain.owner_contact, [:admin, @domain.owner_contact]) %dd= link_to(@domain.owner_contact, [:admin, @domain.owner_contact])
%dt= t('shared.code') %dt= t('code')
%dd= @domain.owner_contact_code %dd= @domain.owner_contact_code
%dt= t('shared.identity_code') %dt= t('identity_code')
%dd= @domain.owner_contact_ident %dd= @domain.owner_contact_ident
%dt= t('shared.email') %dt= t('email')
%dd= @domain.owner_contact_email %dd= @domain.owner_contact_email
%dt= t('shared.phone') %dt= t('phone')
%dd= @domain.owner_contact_phone %dd= @domain.owner_contact_phone

View file

@ -1,13 +1,13 @@
- panel_class = @domain.errors.messages[:domain_statuses] ? 'panel-danger' : 'panel-default' - panel_class = @domain.errors.messages[:domain_statuses] ? 'panel-danger' : 'panel-default'
#domain_statuses.panel{class: panel_class} #domain_statuses.panel{class: panel_class}
.panel-heading.clearfix .panel-heading.clearfix
= t('shared.statuses') = t('statuses')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-6'}= t('shared.status') %th{class: 'col-xs-6'}= t('status')
%th{class: 'col-xs-6'}= t('shared.description') %th{class: 'col-xs-6'}= t('description')
%tbody %tbody
- @domain.domain_statuses.each do |x| - @domain.domain_statuses.each do |x|
%tr %tr

View file

@ -1,14 +1,14 @@
- panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default' - panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default'
#tech_contacts.panel{class: panel_class} #tech_contacts.panel{class: panel_class}
.panel-heading.clearfix .panel-heading.clearfix
= t('shared.tech_contacts') = t('tech_contacts')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-4'}= t('shared.name') %th{class: 'col-xs-4'}= t('name')
%th{class: 'col-xs-4'}= t('shared.code') %th{class: 'col-xs-4'}= t('code')
%th{class: 'col-xs-4'}= t('shared.email') %th{class: 'col-xs-4'}= t('email')
%tbody %tbody
- @domain.domain_contacts.tech.each do |x| - @domain.domain_contacts.tech.each do |x|
%tr %tr

View file

@ -1,11 +1,11 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.domain_details')}" = "#{t('domain_details')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.edit_statuses'), edit_admin_domain_path(@domain), class: 'btn btn-primary') = link_to(t('edit_statuses'), edit_admin_domain_path(@domain), class: 'btn btn-primary')
= link_to(t(:'shared.history'), admin_domain_version_path(@domain.id), method: :get, class: 'btn btn-primary') = link_to(t(:'history'), admin_domain_version_path(@domain.id), method: :get, class: 'btn btn-primary')
/= link_to(t('generate_zonefile'), zonefile_admin_domain_path(@domain), class: 'btn btn-primary') /= link_to(t('generate_zonefile'), zonefile_admin_domain_path(@domain), class: 'btn btn-primary')
@ -23,3 +23,5 @@
.col-md-12= render 'admin/domains/partials/nameservers' .col-md-12= render 'admin/domains/partials/nameservers'
.row .row
.col-md-12= render 'admin/domains/partials/dnskeys' .col-md-12= render 'admin/domains/partials/dnskeys'
.row
.col-md-12= render 'admin/domains/partials/keyrelays'

View file

@ -4,7 +4,7 @@
= "#{t('zonefile')}" = "#{t('zonefile')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.back_to_domain'), admin_domain_path(@domain), class: 'btn btn-default') = link_to(t('back_to_domain'), admin_domain_path(@domain), class: 'btn btn-default')
%hr %hr
.row .row
.col-md-12 .col-md-12

View file

@ -16,8 +16,8 @@
= f.text_field(:password, class: 'form-control') = f.text_field(:password, class: 'form-control')
.form-group .form-group
.form-group.has-feedback.js-typeahead-container .form-group.has-feedback.js-typeahead-container
= f.label :registrar_typeahead, t('shared.registrar') = f.label :registrar_typeahead, t('registrar')
= f.text_field(:registrar_typeahead, class: 'form-control js-registrar-typeahead', placeholder: t('shared.registrar'), autocomplete: 'off') = f.text_field(:registrar_typeahead, class: 'form-control js-registrar-typeahead', placeholder: t('registrar'), autocomplete: 'off')
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden %span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove %span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
= f.hidden_field(:registrar_id, class: 'js-registrar-id') = f.hidden_field(:registrar_id, class: 'js-registrar-id')
@ -25,16 +25,16 @@
.checkbox .checkbox
%label{for: 'epp_user_active'} %label{for: 'epp_user_active'}
= f.check_box(:active) = f.check_box(:active)
= t('shared.active') = t('active')
.col-md-6.text-left .col-md-6.text-left
.form-group .form-group
= f.label :csr, t('shared.certificate_signing_req') = f.label :csr, t('certificate_signing_req')
= f.text_area :csr, class: 'form-control' = f.text_area :csr, class: 'form-control'
%hr %hr
.row .row
.col-md-12.text-right .col-md-12.text-right
= button_tag(t('shared.save'), class: 'btn btn-primary') = button_tag(t('save'), class: 'btn btn-primary')
:javascript :javascript
Autocomplete.bindAdminRegistrarSearch(); Autocomplete.bindAdminRegistrarSearch();

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.edit_epp_user')}" = "#{t('edit_epp_user')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.back_to_epp_user'), [:admin, @epp_user], class: 'btn btn-default') = link_to(t('back_to_epp_user'), [:admin, @epp_user], class: 'btn btn-default')
%hr %hr
= render 'form' = render 'form'

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs= t('shared.epp_users') %h2.text-center-xs= t('epp_users')
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.create_new_epp_user'), new_admin_epp_user_path, class: 'btn btn-primary') = link_to(t('create_new_epp_user'), new_admin_epp_user_path, class: 'btn btn-primary')
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -14,9 +14,9 @@
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'username') = sort_link(@q, 'username')
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'registrar', t('shared.registrar')) = sort_link(@q, 'registrar', t('registrar'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'active', t('shared.active')) = sort_link(@q, 'active', t('active'))
%tbody %tbody
- @epp_users.each do |x| - @epp_users.each do |x|
%tr %tr

View file

@ -1,3 +1,3 @@
%h2= t('shared.create_new_epp_user') %h2= t('create_new_epp_user')
%hr %hr
= render 'form' = render 'form'

View file

@ -1,11 +1,11 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.epp_user_details')}" = "#{t('epp_user_details')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.edit'), edit_admin_epp_user_path(@epp_user), class: 'btn btn-primary') = link_to(t('edit'), edit_admin_epp_user_path(@epp_user), class: 'btn btn-primary')
= link_to(t('shared.delete'), admin_epp_user_path(@epp_user), method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger') = link_to(t('delete'), admin_epp_user_path(@epp_user), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
%hr %hr
- if @epp_user.errors.any? - if @epp_user.errors.any?
@ -18,26 +18,26 @@
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.general') %h3.panel-title= t('general')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.username') %dt= t('username')
%dd= @epp_user.username %dd= @epp_user.username
%dt= t('shared.password') %dt= t('password')
%dd= @epp_user.password %dd= @epp_user.password
%dt= t('shared.active') %dt= t('active')
%dd= @epp_user.active %dd= @epp_user.active
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.certificates') %h3.panel-title= t('certificates')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.csr') %dt= t('csr')
%dd= @epp_user.csr %dd= @epp_user.csr
%dt= t('shared.crt') %dt= t('crt')
%dd= @epp_user.crt %dd= @epp_user.crt

View file

@ -0,0 +1,44 @@
.row
.col-sm-12
%h2.text-center-xs
= t('keyrelay_details')
%hr
.row
.col-md-12
.panel.panel-default
.panel-heading
%h3.panel-title= t('keyrelay')
.panel-body{style: 'word-wrap: break-word;'}
%dl.dl-horizontal
%dt= t('uploaded_at')
%dd= @keyrelay.pa_date
%dt= t('domain')
%dd= link_to(@keyrelay.domain, [:admin, @keyrelay.domain])
%dt= t('flag')
%dd= @keyrelay.key_data_flags
%dt= t('protocol')
%dd= @keyrelay.key_data_protocol
%dt= t('algorithm')
%dd= @keyrelay.key_data_alg
%dt= t('public_key')
%dd= @keyrelay.key_data_public_key
%dt= t('password')
%dd= @keyrelay.auth_info_pw
%dt= t('expiry_relative')
%dd= @keyrelay.expiry_relative
%dt= t('expiry_absolute')
%dd= @keyrelay.expiry_absolute
%dt= t('requester')
%dd= link_to(@keyrelay.requester, [:admin, @keyrelay.requester])
%dt= t('accepter')
%dd= link_to(@keyrelay.accepter, [:admin, @keyrelay.accepter])

View file

@ -31,4 +31,4 @@
%hr %hr
.row .row
.col-md-12.text-right .col-md-12.text-right
= button_tag(t('shared.save'), class: 'btn btn-primary') = button_tag(t('save'), class: 'btn btn-primary')

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.edit_registrar')}" = "#{t('edit_registrar')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.back_to_registrar'), [:admin, @registrar], class: 'btn btn-default') = link_to(t('back_to_registrar'), [:admin, @registrar], class: 'btn btn-default')
%hr %hr
= render 'form' = render 'form'

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs= t('shared.registrars') %h2.text-center-xs= t('registrars')
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.add'), new_admin_registrar_path, class: 'btn btn-primary') = link_to(t('add'), new_admin_registrar_path, class: 'btn btn-primary')
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -14,7 +14,7 @@
%th{class: 'col-xs-6'} %th{class: 'col-xs-6'}
= sort_link(@q, 'name') = sort_link(@q, 'name')
%th{class: 'col-xs-6'} %th{class: 'col-xs-6'}
= sort_link(@q, 'reg_no', t('shared.reg_no')) = sort_link(@q, 'reg_no', t('reg_no'))
%tbody %tbody
- @registrars.each do |x| - @registrars.each do |x|
%tr %tr

View file

@ -1,3 +1,3 @@
%h2= t('shared.new_registrar') %h2= t('new_registrar')
%hr %hr
= render 'form' = render 'form'

View file

@ -1,11 +1,11 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.registrar_details')}" = "#{t('registrar_details')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.edit'), edit_admin_registrar_path(@registrar), class: 'btn btn-primary') = link_to(t('edit'), edit_admin_registrar_path(@registrar), class: 'btn btn-primary')
= link_to(t('shared.delete'), admin_registrar_path(@registrar), method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger') = link_to(t('delete'), admin_registrar_path(@registrar), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
%hr %hr
- if @registrar.errors.any? - if @registrar.errors.any?
@ -18,44 +18,44 @@
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.general') %h3.panel-title= t('general')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.name') %dt= t('name')
%dd= @registrar.name %dd= @registrar.name
%dt= t('shared.reg_no') %dt= t('reg_no')
%dd= @registrar.reg_no %dd= @registrar.reg_no
%dt= t('shared.vat_no') %dt= t('vat_no')
%dd= @registrar.vat_no %dd= @registrar.vat_no
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.address') %h3.panel-title= t('address')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.country') %dt= t('country')
%dd= @registrar.country %dd= @registrar.country
%dt= t('shared.address') %dt= t('address')
%dd= @registrar.address %dd= @registrar.address
%dt= t('shared.billing_address') %dt= t('billing_address')
%dd= @registrar.billing_address %dd= @registrar.billing_address
.row .row
.col-md-12 .col-md-12
#epp-users.panel.panel-default #epp-users.panel.panel-default
.panel-heading.clearfix .panel-heading.clearfix
= t('shared.epp_users') = t('epp_users')
.table-responsive .table-responsive
%table.table.table-hover.table-bordered.table-condensed %table.table.table-hover.table-bordered.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-6'}= t('shared.username') %th{class: 'col-xs-6'}= t('username')
%th{class: 'col-xs-6'}= t('shared.active') %th{class: 'col-xs-6'}= t('active')
%tbody %tbody
- @registrar.epp_users.each do |x| - @registrar.epp_users.each do |x|
%tr %tr

View file

@ -1,4 +1,4 @@
%h2= t('shared.settings') %h2= t('settings')
%hr %hr
= form_tag [:admin, :settings] do = form_tag [:admin, :settings] do
.row .row
@ -8,9 +8,9 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-9'} %th{class: 'col-xs-9'}
= t('shared.setting') = t('setting')
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= t('shared.value') = t('value')
%tbody %tbody
- @settings.each do |x| - @settings.each do |x|
%tr %tr
@ -23,4 +23,4 @@
%td= text_field_tag("[settings][#{x.var}]", x.value) %td= text_field_tag("[settings][#{x.var}]", x.value)
.row .row
.col-md-12.text-right .col-md-12.text-right
%button.btn.btn-primary=t('shared.save') %button.btn.btn-primary=t('save')

View file

@ -32,4 +32,4 @@
%hr %hr
.row .row
.col-md-12.text-right .col-md-12.text-right
= button_tag(t('shared.save'), class: 'btn btn-primary') = button_tag(t('save'), class: 'btn btn-primary')

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.edit_user')}" = "#{t('edit_user')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.back_to_user'), [:admin, @user], class: 'btn btn-default') = link_to(t('back_to_user'), [:admin, @user], class: 'btn btn-default')
%hr %hr
= render 'form' = render 'form'

View file

@ -1,9 +1,9 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs= t('shared.users') %h2.text-center-xs= t('users')
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.create_new_user'), new_admin_user_path, class: 'btn btn-primary') = link_to(t('create_new_user'), new_admin_user_path, class: 'btn btn-primary')
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -14,9 +14,9 @@
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'username') = sort_link(@q, 'username')
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'email', t('shared.email')) = sort_link(@q, 'email', t('email'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'identity_code', t('shared.identity_code')) = sort_link(@q, 'identity_code', t('identity_code'))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'role', t('role')) = sort_link(@q, 'role', t('role'))
%tbody %tbody

View file

@ -1,3 +1,3 @@
%h2= t('shared.create_new_user') %h2= t('create_new_user')
%hr %hr
= render 'form' = render 'form'

View file

@ -1,11 +1,11 @@
.row .row
.col-sm-6 .col-sm-6
%h2.text-center-xs %h2.text-center-xs
= "#{t('shared.user_details')}" = "#{t('user_details')}"
.col-sm-6 .col-sm-6
%h2.text-right.text-center-xs %h2.text-right.text-center-xs
= link_to(t('shared.edit'), edit_admin_user_path(@user), class: 'btn btn-primary') = link_to(t('edit'), edit_admin_user_path(@user), class: 'btn btn-primary')
= link_to(t('shared.delete'), admin_user_path(@user), method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger') = link_to(t('delete'), admin_user_path(@user), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
%hr %hr
- if @user.errors.any? - if @user.errors.any?
@ -18,25 +18,25 @@
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.general') %h3.panel-title= t('general')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.username') %dt= t('username')
%dd= @user.username %dd= @user.username
%dt= t('shared.password') %dt= t('password')
%dd= @user.password %dd= @user.password
%dt= t('shared.identity_code') %dt= t('identity_code')
%dd= @user.identity_code %dd= @user.identity_code
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('shared.address') %h3.panel-title= t('address')
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('shared.email') %dt= t('email')
%dd= @user.email %dd= @user.email
%dt= t('role') %dt= t('role')

View file

@ -47,4 +47,4 @@
.row .row
.col-md-12.text-right .col-md-12.text-right
%button.btn.btn-primary=t('shared.save') %button.btn.btn-primary=t('save')

View file

@ -23,28 +23,28 @@
= link_to APP_CONFIG['app_name'], root_path, class: 'navbar-brand' = link_to APP_CONFIG['app_name'], root_path, class: 'navbar-brand'
.navbar-collapse.collapse .navbar-collapse.collapse
%ul.nav.navbar-nav %ul.nav.navbar-nav
%li= link_to t('shared.domains'), admin_domains_path %li= link_to t('domains'), admin_domains_path
%li= link_to t('shared.contacts'), admin_contacts_path %li= link_to t('contacts'), admin_contacts_path
%li= link_to t('shared.registrars'), admin_registrars_path %li= link_to t('registrars'), admin_registrars_path
- if can?(:access, :settings_menu) - if can?(:access, :settings_menu)
%li.dropdown %li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"} %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
= t('shared.settings') = t('settings')
%span.caret %span.caret
%ul.dropdown-menu{role: "menu"} %ul.dropdown-menu{role: "menu"}
%li.dropdown-header= t('shared.system') %li.dropdown-header= t('system')
%li= link_to t('shared.settings'), admin_settings_path %li= link_to t('settings'), admin_settings_path
%li= link_to t('zonefile'), admin_zonefile_settings_path %li= link_to t('zonefile'), admin_zonefile_settings_path
%li= link_to t(:domains_history), admin_domain_versions_path %li= link_to t(:domains_history), admin_domain_versions_path
%li= link_to t(:background_jobs), admin_delayed_jobs_path %li= link_to t(:background_jobs), admin_delayed_jobs_path
%li.divider %li.divider
%li.dropdown-header= t('shared.users') %li.dropdown-header= t('users')
%li= link_to t(:admin_users), admin_users_path %li= link_to t(:admin_users), admin_users_path
%li= link_to t(:epp_users), admin_epp_users_path %li= link_to t(:epp_users), admin_epp_users_path
%ul.nav.navbar-nav.navbar-right %ul.nav.navbar-nav.navbar-right
%li= link_to t('shared.log_out', user: current_user), '/logout' %li= link_to t('log_out', user: current_user), '/logout'
/ /.nav-collapse / /.nav-collapse
.container .container

View file

@ -13,7 +13,7 @@
- if can? :view, :registrar - if can? :view, :registrar
= t(:registrar) = t(:registrar)
- else - else
= t('shared.eedirekt') = t('eedirekt')
%body %body
/ Static navbar / Static navbar
.navbar.navbar-default.navbar-static-top{role: "navigation"} .navbar.navbar-default.navbar-static-top{role: "navigation"}
@ -27,39 +27,39 @@
- if can? :view, :registrar - if can? :view, :registrar
= link_to t(:registrar), client_domains_path, class: 'navbar-brand' = link_to t(:registrar), client_domains_path, class: 'navbar-brand'
- else - else
= link_to t('shared.eedirekt'), client_domains_path, class: 'navbar-brand' = link_to t('eedirekt'), client_domains_path, class: 'navbar-brand'
.navbar-collapse.collapse .navbar-collapse.collapse
%ul.nav.navbar-nav %ul.nav.navbar-nav
- active_class = ['client/domains', 'client/domain_transfers'].include?(params[:controller]) ? 'active' :nil - active_class = ['client/domains', 'client/domain_transfers'].include?(params[:controller]) ? 'active' :nil
%li.dropdown{class: active_class} %li.dropdown{class: active_class}
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"} %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
= t('shared.domains') = t('domains')
%span.caret %span.caret
%ul.dropdown-menu{role: "menu"} %ul.dropdown-menu{role: "menu"}
%li %li
= link_to t('shared.domain_list'), client_domains_path = link_to t('domain_list'), client_domains_path
%li %li
= link_to t('shared.domain_transfers_list'), client_domain_transfers_path = link_to t('domain_transfers_list'), client_domain_transfers_path
- active_class = ['client/contacts'].include?(params[:controller]) ? 'active' :nil - active_class = ['client/contacts'].include?(params[:controller]) ? 'active' :nil
%li.dropdown{class: active_class} %li.dropdown{class: active_class}
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"} %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
= t('shared.contacts') = t('contacts')
%span.caret %span.caret
%ul.dropdown-menu{role: "menu"} %ul.dropdown-menu{role: "menu"}
%li %li
= link_to t('shared.contact_list'), client_contacts_path = link_to t('contact_list'), client_contacts_path
-# %li.dropdown -# %li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"} %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
= t('shared.history') = t('history')
%span.caret %span.caret
%ul.dropdown-menu{role: "menu"} %ul.dropdown-menu{role: "menu"}
%li %li
= link_to t(:domains_history'), client_domain_versions_path = link_to t(:domains_history'), client_domain_versions_path
%li %li
= link_to t('shared.contacts_history'), client_contact_versions_path = link_to t('contacts_history'), client_contact_versions_path
%ul.nav.navbar-nav.navbar-right %ul.nav.navbar-nav.navbar-right
@ -73,7 +73,7 @@
- next if x == current_registrar - next if x == current_registrar
%li %li
= link_to x, switch_registrar_sessions_path(registrar_id: x) = link_to x, switch_registrar_sessions_path(registrar_id: x)
%li= link_to t('shared.log_out', user: current_user), '/logout' %li= link_to t('log_out', user: current_user), '/logout'
/ /.nav-collapse / /.nav-collapse
.container .container
- display = (flash.empty?) ? 'none' : 'block' - display = (flash.empty?) ? 'none' : 'block'

View file

@ -250,171 +250,170 @@ en:
attribute_op_is_invalid: 'Attribute op is invalid' attribute_op_is_invalid: 'Attribute op is invalid'
shared: code: 'Code'
code: 'Code' value: 'Value'
value: 'Value' action: 'Action'
action: 'Action' edit: 'Edit'
edit: 'Edit' save: 'Save'
save: 'Save' log_out: 'Log out (%{user})'
log_out: 'Log out (%{user})' system: 'System'
system: 'System' settings: 'Settings'
settings: 'Settings' domains: 'Domains'
domains: 'Domains' epp_users: 'EPP Users'
epp_users: 'EPP Users' registrars: 'Registrars'
registrars: 'Registrars' valid_to: 'Valid to'
valid_to: 'Valid to' name: 'Name'
name: 'Name' transfer_can_be_approved_only_by_current_registrar: 'Transfer can be approved only by current domain registrar'
transfer_can_be_approved_only_by_current_registrar: 'Transfer can be approved only by current domain registrar' registrar: 'Registrar'
registrar: 'Registrar' owner: 'Owner'
owner: 'Owner' domain_details: 'Domain details'
domain_details: 'Domain details' registered_at: 'Registered at'
registered_at: 'Registered at' password: 'Password'
password: 'Password' valid_from: 'Valid from'
valid_from: 'Valid from' general: 'General'
general: 'General' contacts: 'Contacts'
contacts: 'Contacts' tech_contacts: 'Technical contacts'
tech_contacts: 'Technical contacts' admin_contacts: 'Admin contacts'
admin_contacts: 'Admin contacts' identity_code: 'Identity code'
identity_code: 'Identity code' nameservers: 'Nameservers'
nameservers: 'Nameservers' hostname: 'Hostname'
hostname: 'Hostname' ipv4: 'IPv4'
ipv4: 'IPv4' ipv6: 'IPv6'
ipv6: 'IPv6' statuses: 'Statuses'
statuses: 'Statuses' description: 'Description'
description: 'Description' delete: 'Delete'
delete: 'Delete' are_you_sure: 'Are you sure?'
are_you_sure: 'Are you sure?' back: 'Back'
back: 'Back' new_domain: 'New domain'
new_domain: 'New domain' registrar_name: 'Registrar name'
registrar_name: 'Registrar name' contact_code: 'Contact code'
contact_code: 'Contact code' add: 'Add'
add: 'Add' domain: 'Domain'
domain: 'Domain' nameserver: 'Nameserver'
nameserver: 'Nameserver' back_to_domain: 'Back to domain'
back_to_domain: 'Back to domain' edit_domain: 'Edit domain'
edit_domain: 'Edit domain' contact_was_not_found: 'Contact was not found!'
contact_was_not_found: 'Contact was not found!' contact_already_exists: 'Contact already exists on this domain!'
contact_already_exists: 'Contact already exists on this domain!' failed_to_add_contact: 'Failed to add contact!'
failed_to_add_contact: 'Failed to add contact!' contact_added: 'Contact added!'
contact_added: 'Contact added!' contact_detached: 'Contact detached!'
contact_detached: 'Contact detached!' failed_to_detach_contact: 'Failed to detach contact!'
failed_to_detach_contact: 'Failed to detach contact!' new_domain_status: 'New domain status'
new_domain_status: 'New domain status' status_added: 'Status added!'
status_added: 'Status added!' failed_to_add_status: 'Failed to add status!'
failed_to_add_status: 'Failed to add status!' edit_domain_status: 'Edit domain status'
edit_domain_status: 'Edit domain status' status_updated: 'Status updated!'
status_updated: 'Status updated!' failed_to_update_status: 'Failed to update status!'
failed_to_update_status: 'Failed to update status!' status_deleted: 'Status deleted!'
status_deleted: 'Status deleted!' failed_to_delete_status: 'Failed to delete status!'
failed_to_delete_status: 'Failed to delete status!' tech_contact: 'Tech contact'
tech_contact: 'Tech contact' new_domain_contact: 'New contact'
new_domain_contact: 'New contact' domain_status_prohibits_deleting: 'Domain status prohibits deleting'
domain_status_prohibits_deleting: 'Domain status prohibits deleting' domain_deleted: 'Domain deleted!'
domain_deleted: 'Domain deleted!' failed_to_delete_domain: 'Failed to delete domain!'
failed_to_delete_domain: 'Failed to delete domain!' email: 'Email'
email: 'Email' fax: 'Fax'
fax: 'Fax' contact_details: 'Contact details'
contact_details: 'Contact details' ident: 'Ident'
ident: 'Ident' ident_type: 'Ident type'
ident_type: 'Ident type' address: 'Address'
address: 'Address' country: 'Country'
country: 'Country' city: 'City'
city: 'City' street: 'Street'
street: 'Street' zip: 'Zip'
zip: 'Zip' org_name: 'Organisation name'
org_name: 'Organisation name' failed_to_add_domain: 'Failed to add domain!'
failed_to_add_domain: 'Failed to add domain!' domain_added: 'Domain added!'
domain_added: 'Domain added!' new_contact: 'New contact'
new_contact: 'New contact' add_another: 'Add another'
add_another: 'Add another' domain_updated: 'Domain updated!'
domain_updated: 'Domain updated!' failed_to_update_domain: 'Failed to update domain'
failed_to_update_domain: 'Failed to update domain' failed_to_create_contact: 'Failed to create contact'
failed_to_create_contact: 'Failed to create contact' contact_deleted: 'Contact deleted'
contact_deleted: 'Contact deleted' failed_to_delete_contact: 'Failed to delete contact'
failed_to_delete_contact: 'Failed to delete contact' edit_contact: 'Edit contact'
edit_contact: 'Edit contact' failed_to_update_contact: 'Failed to update contact'
failed_to_update_contact: 'Failed to update contact' contact_updated: 'Contact updated'
contact_updated: 'Contact updated' search: 'Search'
search: 'Search' reg_no: 'Reg. no'
reg_no: 'Reg. no' status: 'Status'
status: 'Status' eedirekt: 'EEDirekt'
eedirekt: 'EEDirekt' contact: 'Contact'
contact: 'Contact'
domain_transfer_requested: 'Domain transfer requested!' domain_transfer_requested: 'Domain transfer requested!'
domain_transfer_approved: 'Domain transfer approved!' domain_transfer_approved: 'Domain transfer approved!'
failed_to_approve_domain_transfer: 'Failed to approve domain transfer' failed_to_approve_domain_transfer: 'Failed to approve domain transfer'
approve: 'Approve' approve: 'Approve'
domain_already_belongs_to_the_querying_registrar: 'Domain already belongs to the querying registrar' domain_already_belongs_to_the_querying_registrar: 'Domain already belongs to the querying registrar'
other_registrar_has_already_requested_to_transfer_this_domain: 'Other registrar has already requested to transfer this domain.' other_registrar_has_already_requested_to_transfer_this_domain: 'Other registrar has already requested to transfer this domain.'
transfer_domain: 'Transfer domain' transfer_domain: 'Transfer domain'
failed_to_request_domain_transfer: 'Failed to request domain transfer' #not used atm failed_to_request_domain_transfer: 'Failed to request domain transfer' #not used atm
domain_transfer: 'Domain transfer' domain_transfer: 'Domain transfer'
request_domain_transfer: 'Request domain transfer' request_domain_transfer: 'Request domain transfer'
domain_valid_to: 'Domain valid to' domain_valid_to: 'Domain valid to'
accept_time: 'Accept time' accept_time: 'Accept time'
transfer_from: 'Transfer from' transfer_from: 'Transfer from'
transferred_at: 'Transferred at' transferred_at: 'Transferred at'
domain_transfers_list: 'Domain transfers list' domain_transfers_list: 'Domain transfers list'
domain_transfers: 'Domain transfers' domain_transfers: 'Domain transfers'
password_invalid: 'Password invalid!' password_invalid: 'Password invalid!'
domain_was_not_found: 'Domain was not found!' domain_was_not_found: 'Domain was not found!'
domain_list: 'Domain list' domain_list: 'Domain list'
create_new_domain: 'Create new domain' create_new_domain: 'Create new domain'
welcome: 'Welcome!' welcome: 'Welcome!'
edit_statuses: 'Edit statuses' edit_statuses: 'Edit statuses'
contact_list: 'Contact list' contact_list: 'Contact list'
create_new_contact: 'Create new contact' create_new_contact: 'Create new contact'
domain_pw: 'Domain password' domain_pw: 'Domain password'
history: 'History' history: 'History'
new_registrar: 'New registrar' new_registrar: 'New registrar'
registrar_added: 'Registrar added!' registrar_added: 'Registrar added!'
failed_to_add_registrar: 'Failed to add registrar' failed_to_add_registrar: 'Failed to add registrar'
registrar_details: 'Registrar details' registrar_details: 'Registrar details'
vat_no: 'Vat no' vat_no: 'Vat no'
edit_registrar: 'Edit registrar' edit_registrar: 'Edit registrar'
back_to_registrar: 'Back to registrar' back_to_registrar: 'Back to registrar'
registrar_updated: 'Registrar updated' registrar_updated: 'Registrar updated'
failed_to_update_registrar: 'Failed to update registrar' failed_to_update_registrar: 'Failed to update registrar'
registrar_deleted: 'Registrar deleted' registrar_deleted: 'Registrar deleted'
failed_to_delete_registrar: 'Failed to delete registrar' failed_to_delete_registrar: 'Failed to delete registrar'
users: 'Users' users: 'Users'
create_new_user: 'Create new user' create_new_user: 'Create new user'
admin: 'Admin' admin: 'Admin'
user_details: 'User details' user_details: 'User details'
edit_user: 'Edit user' edit_user: 'Edit user'
back_to_user: 'Back to user' back_to_user: 'Back to user'
create_new_epp_user: 'Create new EPP user' create_new_epp_user: 'Create new EPP user'
certificate_signing_req: 'Certificate signing request' certificate_signing_req: 'Certificate signing request'
csr: 'CSR' csr: 'CSR'
crt: 'CRT' crt: 'CRT'
epp_user_details: 'EPP user details' epp_user_details: 'EPP user details'
edit_epp_user: 'Edit EPP user' edit_epp_user: 'Edit EPP user'
back_to_epp_user: 'Back to EPP user' back_to_epp_user: 'Back to EPP user'
dnskey: 'DNS key' dnskey: 'DNS key'
dnskeys: 'DNS Keys' dnskeys: 'DNS Keys'
flag: 'Flag' flag: 'Flag'
protocol: 'Protocol' protocol: 'Protocol'
algorithm: 'Algorithm' algorithm: 'Algorithm'
public_key: 'Public key' public_key: 'Public key'
record_created: 'Record created' record_created: 'Record created'
failed_to_create_record: 'Failed to create record' failed_to_create_record: 'Failed to create record'
record_updated: 'Record updated' record_updated: 'Record updated'
records_updated: 'Records updated' records_updated: 'Records updated'
failed_to_update_record: 'Failed to update record' failed_to_update_record: 'Failed to update record'
record_deleted: 'Record deleted' record_deleted: 'Record deleted'
failed_to_delete_record: 'Failed to delete record' failed_to_delete_record: 'Failed to delete record'
authentication_error: 'Authentication error' authentication_error: 'Authentication error'
ds_data_and_key_data_must_not_exists_together: 'dsData and keyData objects must not exists together' ds_data_and_key_data_must_not_exists_together: 'dsData and keyData objects must not exists together'
setting: 'Setting' setting: 'Setting'
registrar: 'Registrar' registrar: 'Registrar'
transfer_requested: 'Transfer requested.' transfer_requested: 'Transfer requested.'
@ -443,3 +442,10 @@ en:
admin: 'Administrator' admin: 'Administrator'
user: 'User' user: 'User'
customer_service: 'Customer service' customer_service: 'Customer service'
keyrelays: 'Keyrelays'
uploaded_at: 'Uploaded at'
expiry_relative: 'Expiry relative'
expiry_absolute: 'Expiry absolute'
requester: 'Requester'
accepter: 'Accepter'
keyrelay_details: 'Keyrelay details'

View file

@ -7,6 +7,8 @@ Rails.application.routes.draw do
## ADMIN ROUTES ## ADMIN ROUTES
namespace(:admin) do namespace(:admin) do
resources :keyrelays
resources :zonefiles resources :zonefiles
resources :zonefile_settings resources :zonefile_settings

View file

@ -19,6 +19,7 @@ describe User do
it { should be_able_to(:manage, DomainVersion.new) } it { should be_able_to(:manage, DomainVersion.new) }
it { should be_able_to(:manage, User.new) } it { should be_able_to(:manage, User.new) }
it { should be_able_to(:manage, EppUser.new) } it { should be_able_to(:manage, EppUser.new) }
it { should be_able_to(:manage, Keyrelay.new) }
it { should be_able_to(:index, :delayed_job) } it { should be_able_to(:index, :delayed_job) }
it { should be_able_to(:create, :zonefile) } it { should be_able_to(:create, :zonefile) }
it { should be_able_to(:access, :settings_menu) } it { should be_able_to(:access, :settings_menu) }