Refatored to use shared/title partial

This commit is contained in:
Priit Tark 2015-04-16 16:29:04 +03:00
parent 4c660df43e
commit 8d4124585c
73 changed files with 402 additions and 411 deletions

View file

@ -26,10 +26,6 @@ h1, h2, h3, h4, h1 a, h2 a, h3 a, h4 a
font-weight: normal font-weight: normal
font-family: 'EtelkaLightProBold' font-family: 'EtelkaLightProBold'
h1
font-size: 22px
text-transform: uppercase
body, body,
button, button,
input, input,

View file

@ -1,4 +1,4 @@
class Admin::EppLogsController < ApplicationController class Admin::EppLogsController < AdminController
load_and_authorize_resource class: ApiLog::EppLog load_and_authorize_resource class: ApiLog::EppLog
def index def index

View file

@ -1,4 +1,4 @@
class Admin::ReppLogsController < ApplicationController class Admin::ReppLogsController < AdminController
load_and_authorize_resource class: ApiLog::ReppLog load_and_authorize_resource class: ApiLog::ReppLog
def index def index

View file

@ -1,4 +1,4 @@
class Admin::ZonefileSettingsController < ApplicationController class Admin::ZonefileSettingsController < AdminController
load_and_authorize_resource load_and_authorize_resource
before_action :set_zonefile_setting, only: [:update, :edit] before_action :set_zonefile_setting, only: [:update, :edit]
def index def index

View file

@ -1,4 +1,9 @@
class AdminController < ApplicationController class AdminController < ApplicationController
layout 'admin/application' layout 'admin/application'
before_action :authenticate_user! before_action :authenticate_user!
helper_method :head_title_sufix
def head_title_sufix
t(:admin_head_title_sufix)
end
end end

View file

@ -8,4 +8,9 @@ class RegistrarController < ApplicationController
def depp_controller? def depp_controller?
false false
end end
helper_method :head_title_sufix
def head_title_sufix
t(:registrar_head_title_sufix)
end
end end

View file

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

View file

@ -1,10 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:create_new_user), new_admin_admin_user_path, class: 'btn btn-primary')
%h2.text-center-xs= t('admin_users') = render 'shared/title', name: t(:admin_users)
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('create_new_user'), new_admin_admin_user_path, class: 'btn btn-primary')
%hr
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive
@ -14,11 +11,11 @@
%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('email')) = sort_link(@q, 'email', t(:email))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'identity_code', t('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
- @admin_users.each do |x| - @admin_users.each do |x|
%tr %tr

View file

@ -1,3 +1,3 @@
%h2= t('create_new_user') = render 'shared/title', name: t(:create_new_user)
%hr
= render 'form' = render 'form'

View file

@ -1,45 +1,40 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:edit), edit_admin_admin_user_path(@admin_user), class: 'btn btn-primary')
%h2.text-center-xs = link_to(t(:delete), admin_admin_user_path(@admin_user),
= "#{t('user_details')}" method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger')
.col-sm-6 = render 'shared/title', name: @admin_user.name
%h2.text-right.text-center-xs
= link_to(t('edit'), edit_admin_admin_user_path(@admin_user), class: 'btn btn-primary')
= link_to(t('delete'), admin_admin_user_path(@admin_user), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
%hr
- if @admin_user.errors.any? - if @admin_user.errors.any?
- @admin_user.errors.each do |attr, err| - @admin_user.errors.each do |attr, err|
= err = err
%br %br
- if @admin_user.errors.any? - if @admin_user.errors.any?
%hr
.row .row
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('general') %h3.panel-title= t(:general)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('username') %dt= t(:username)
%dd= @admin_user.username %dd= @admin_user.username
%dt= t('password') %dt= t(:password)
%dd= @admin_user.password %dd= @admin_user.password
%dt= t('identity_code') %dt= t(:identity_code)
%dd= @admin_user.identity_code %dd= @admin_user.identity_code
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('address') %h3.panel-title= t(:address)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('email') %dt= t(:email)
%dd= @admin_user.email %dd= @admin_user.email
%dt= t('role') %dt= t(:role)
- if @admin_user.roles - if @admin_user.roles
%dd= t(@admin_user.roles.first) %dd= t(@admin_user.roles.first)
- else - else

View file

@ -1,9 +1,5 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back_to_api_user), [:admin, @api_user], class: 'btn btn-default')
%h2.text-center-xs = render 'shared/title', name: "#{t(:edit)}: #{@api_user.name}"
= "#{t('edit_api_user')}"
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back_to_api_user'), [:admin, @api_user], class: 'btn btn-default')
%hr
= render 'form' = render 'form'

View file

@ -1,10 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:create_new_api_user), new_admin_api_user_path, class: 'btn btn-primary')
%h2.text-center-xs= t('api_users') = render 'shared/title', name: t(:api_users)
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('create_new_api_user'), new_admin_api_user_path, class: 'btn btn-primary')
%hr
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive
@ -14,9 +11,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_name', t('registrar')) = sort_link(@q, 'registrar_name', t(:registrar))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'active', t('active')) = sort_link(@q, 'active', t(:active))
%tbody %tbody
- @api_users.each do |x| - @api_users.each do |x|
%tr %tr

View file

@ -1,3 +1,3 @@
%h2= t('create_new_api_user') = render 'shared/title', name: t(:create_new_api_user)
%hr
= render 'form' = render 'form'

View file

@ -1,13 +1,9 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:edit), edit_admin_api_user_path(@api_user), class: 'btn btn-primary')
%h2.text-center-xs = link_to(t(:delete), admin_api_user_path(@api_user),
= "#{t('api_user_details')}" method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger')
.col-sm-6 = render 'shared/title', @api_user.name
%h2.text-right.text-center-xs
= link_to(t('edit'), edit_admin_api_user_path(@api_user), class: 'btn btn-primary')
= link_to(t('delete'), admin_api_user_path(@api_user), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
%hr
- if @api_user.errors.any? - if @api_user.errors.any?
- @api_user.errors.each do |attr, err| - @api_user.errors.each do |attr, err|
= err = err
@ -18,32 +14,33 @@
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('general') %h3.panel-title= t(:general)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('username') %dt= t(:username)
%dd= @api_user.username %dd= @api_user.username
%dt= t('password') %dt= t(:password)
%dd= @api_user.password %dd= @api_user.password
%dt= t('active') %dt= t(:active)
%dd= @api_user.active %dd= @api_user.active
.row .row
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
.panel-heading.clearfix .panel-heading.clearfix
.pull-left .pull-left
= t('certificates') = t(:certificates)
.pull-right .pull-right
= link_to(t('upload_csr'), new_admin_api_user_certificate_path(@api_user), class: 'btn btn-primary btn-xs') = link_to(t(:upload_csr),
new_admin_api_user_certificate_path(@api_user), class: 'btn btn-primary btn-xs')
.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-10'}= t('subject') %th{class: 'col-xs-10'}= t(:subject)
%th{class: 'col-xs-2'}= t('status') %th{class: 'col-xs-2'}= t(:status)
%tbody %tbody
- @api_user.certificates.each do |x| - @api_user.certificates.each do |x|
- if x.csr - if x.csr

View file

@ -1,10 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:import), new_admin_bank_statement_path, class: 'btn btn-primary')
%h2.text-center-xs= t('bank_statements') = render 'shared/title', name: t(:bank_statements)
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('import'), new_admin_bank_statement_path, class: 'btn btn-primary')
%hr
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive

View file

@ -1,11 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back_to_bank_statements), admin_bank_statements_path, class: 'btn btn-primary')
%h2.text-center-xs= t('import_th6_bank_statement') = render 'shared/title', name: t(:import_th6_bank_statement)
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back_to_bank_statements'), admin_bank_statements_path, class: 'btn btn-primary')
%hr
= form_for([:admin, @bank_statement], multipart: true) do |f| = form_for([:admin, @bank_statement], multipart: true) do |f|
= render 'shared/full_errors', object: @bank_statement = render 'shared/full_errors', object: @bank_statement
@ -17,5 +13,4 @@
%hr %hr
.row .row
.col-md-12.text-right .col-md-12.text-right
= button_tag(t('save'), class: 'btn btn-primary') = button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,11 +1,9 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:bind_invoices), bind_invoices_admin_bank_statement_path,
%h2.text-center-xs= t('bank_statement') class: 'btn btn-primary', method: :post)
.col-sm-6 = link_to(t(:back_to_bank_statements), admin_bank_statements_path, class: 'btn btn-default')
%h2.text-right.text-center-xs = render 'shared/title', name: t(:bank_statement)
= link_to(t('bind_invoices'), bind_invoices_admin_bank_statement_path, class: 'btn btn-primary', method: :post)
= link_to(t('back_to_bank_statements'), admin_bank_statements_path, class: 'btn btn-default')
%hr
%row %row
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
@ -13,29 +11,29 @@
%h3.panel-title= t(:details) %h3.panel-title= t(:details)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('bank_code') %dt= t(:bank_code)
%dd= @bank_statement.bank_code %dd= @bank_statement.bank_code
%dt= t('iban') %dt= t(:iban)
%dd= @bank_statement.iban %dd= @bank_statement.iban
%dt= t('status') %dt= t(:status)
- sc = 'text-success' if @bank_statement.fully_binded? - sc = 'text-success' if @bank_statement.fully_binded?
- sc = 'text-warning' if @bank_statement.partially_binded? - sc = 'text-warning' if @bank_statement.partially_binded?
- sc = 'text-danger' if @bank_statement.not_binded? - sc = 'text-danger' if @bank_statement.not_binded?
%dd{class: sc}= t(@bank_statement.status) %dd{class: sc}= t(@bank_statement.status)
%dt= t('queried_at') %dt= t(:queried_at)
%dd= l(@bank_statement.queried_at) %dd= l(@bank_statement.queried_at)
%dt= t('imported_at') %dt= t(:imported_at)
%dd= l(@bank_statement.created_at) %dd= l(@bank_statement.created_at)
- if @bank_statement.import_file_path - if @bank_statement.import_file_path
%dt= t('import_file') %dt= t(:import_file)
%dd= link_to(t('download'), download_import_file_admin_bank_statement_path(@bank_statement)) %dd= link_to(t(:download), download_import_file_admin_bank_statement_path(@bank_statement))
%h2.text-center-xs= t('bank_transactions') %h2.text-center-xs= t(:bank_transactions)
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -52,7 +50,7 @@
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'currency') = sort_link(@q, 'currency')
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'account_activity_id', t('status')) = sort_link(@q, 'account_activity_id', t(:status))
%tbody %tbody
- @bank_transactions.each do |x| - @bank_transactions.each do |x|
%tr %tr
@ -61,7 +59,7 @@
%td= x.sum %td= x.sum
%td= x.currency %td= x.currency
- c = x.binded? ? 'text-success' : 'text-danger' - c = x.binded? ? 'text-success' : 'text-danger'
%td{class: c}= x.binded? ? t('binded') : t('not_binded') %td{class: c}= x.binded? ? t(:binded) : t(:not_binded)
.row .row
.col-md-12 .col-md-12
= paginate @bank_transactions = paginate @bank_transactions

View file

@ -1,5 +1,5 @@
%h2= t('upload_csr') = render 'shared/title', name: t(:upload_csr)
%hr
= form_for([:admin, @api_user, @certificate], multipart: true) do |f| = form_for([:admin, @api_user, @certificate], multipart: true) do |f|
- if @certificate.errors.any? - if @certificate.errors.any?
- @certificate.errors.each do |attr, err| - @certificate.errors.each do |attr, err|
@ -11,10 +11,10 @@
.row .row
.col-md-12.text-left .col-md-12.text-left
.form-group .form-group
= f.label :csr, t('certificate_signing_req') = f.label :csr, t(:certificate_signing_req)
= f.file_field :csr = f.file_field :csr
%hr %hr
.row .row
.col-md-12.text-right .col-md-12.text-right
= button_tag(t('save'), class: 'btn btn-primary') = button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,12 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back_to_api_user), [:admin, @api_user], class: 'btn btn-default')
%h2.text-center-xs = render 'shared/title', name: t(:certificates)
= t('certificates')
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back_to_api_user'), [:admin, @api_user], class: 'btn btn-default')
%hr
- if @certificate.errors.any? - if @certificate.errors.any?
- @certificate.errors.each do |attr, err| - @certificate.errors.each do |attr, err|
= err = err

View file

@ -1,7 +1,5 @@
.row = render 'shared/title', name: t(:contacts)
.col-sm-12
%h2.text-center-xs= t(:contacts)
%hr
.row .row
.col-md-12 .col-md-12
= search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f| = search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f|

View file

@ -1,8 +1,5 @@
.row = render 'shared/title', name: @contact.name
.col-sm-12
%h2.text-center-xs
= @contact.name
%hr
.row .row
.col-md-6= render 'admin/contacts/partials/general' .col-md-6= render 'admin/contacts/partials/general'
.col-md-6= render 'admin/contacts/partials/address' .col-md-6= render 'admin/contacts/partials/address'

View file

@ -1,19 +1,16 @@
.row = render 'shared/title', name: t(:jobs)
.col-sm-12
%h2.text-center-xs= t('jobs')
%hr
.row .row
.col-md-12 .col-md-12
.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-2'}= t('priority') %th{class: 'col-xs-2'}= t(:priority)
%th{class: 'col-xs-2'}= t('attempts') %th{class: 'col-xs-2'}= t(:attempts)
%th{class: 'col-xs-2'}= t('last_error') %th{class: 'col-xs-2'}= t(:last_error)
%th{class: 'col-xs-1'}= t('run_at') %th{class: 'col-xs-1'}= t(:run_at)
%th{class: 'col-xs-1'}= t('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 @@
- content_for :actions do - content_for :actions do
= link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default') = link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default')
= render 'admin/shared/title', name: "#{t(:history)}: #{@domain.name}" = render 'shared/title', name: "#{t(:history)}: #{@domain.name}"
.row .row
.col-md-12 .col-md-12

View file

@ -1,5 +1,5 @@
- content_for :actions do - content_for :actions do
= link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default') = link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default')
= render 'admin/shared/title', name: "#{t(:edit)}: #{@domain.name}" = render 'shared/title', name: "#{t(:edit)}: #{@domain.name}"
= render 'form' = render 'form'

View file

@ -1,7 +1,5 @@
.row = render 'shared/title', name: t(:domains)
.col-sm-12
%h2.text-center-xs= t(:domains)
%hr
.row .row
.col-md-12 .col-md-12
= search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f| = search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f|

View file

@ -1,13 +1,8 @@
.row - content_for :actions do
.col-sm-6
%h2.text-center-xs
= "#{t('domain_details')}"
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t(: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(:history), admin_domain_domain_versions_path(@domain.id), method: :get, class: 'btn btn-primary') = link_to(t(:history), admin_domain_domain_versions_path(@domain.id), method: :get, class: 'btn btn-primary')
= render 'shared/title', name: @domain.name
%hr
.row .row
.col-md-6= render 'admin/domains/partials/general' .col-md-6= render 'admin/domains/partials/general'
.col-md-6= render 'admin/domains/partials/owner' .col-md-6= render 'admin/domains/partials/owner'

View file

@ -1,11 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back_to_domain), admin_domain_path(@domain), class: 'btn btn-default')
%h2.text-center-xs = render 'shared/title', name: t(:zonefile)
= "#{t('zonefile')}"
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back_to_domain'), admin_domain_path(@domain), class: 'btn btn-default')
%hr
.row .row
.col-md-12 .col-md-12
= preserve do = preserve do

View file

@ -1,6 +1,5 @@
.row = render 'shared/title', name: t(:epp_logs)
.col-sm-12
%h2.text-center-xs= t('epp_logs')
.row .row
.col-md-12 .col-md-12
%hr %hr
@ -9,39 +8,39 @@
.col-md-3 .col-md-3
.form-group .form-group
= f.label :request_command = f.label :request_command
= f.select :request_command_eq, [[t('choose'),''], 'hello', 'login', 'logout', 'info', 'create', 'update', 'delete', 'check', 'renew', 'transfer', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t('choose') = f.select :request_command_eq, [[t(:choose),''], 'hello', 'login', 'logout', 'info', 'create', 'update', 'delete', 'check', 'renew', 'transfer', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label :request_object = f.label :request_object
= f.select :request_object_eq, [[t('choose'),''], 'contact', 'domain', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t('choose') = f.select :request_object_eq, [[t(:choose),''], 'contact', 'domain', 'poll', 'keyrelay'], {}, class: 'form-control selectize', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label :request_successful = f.label :request_successful
= f.select :request_successful_true, [[t('choose'), ''], 'true', 'false'], {}, class: 'form-control selectize', placeholder: t('choose') = f.select :request_successful_true, [[t(:choose), ''], 'true', 'false'], {}, class: 'form-control selectize', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label :api_user = f.label :api_user
= f.search_field :api_user_name_cont, class: 'form-control', placeholder: t('api_user'), autocomplete: 'off' = f.search_field :api_user_name_cont, class: 'form-control', placeholder: t(:api_user), autocomplete: 'off'
.row .row
.col-md-3 .col-md-3
.form-group .form-group
= f.label :registrar = f.label :registrar
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t('registrar'), autocomplete: 'off' = f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar), autocomplete: 'off'
.col-md-3 .col-md-3
.form-group .form-group
= f.label t(:created_after) = f.label t(:created_after)
= f.search_field :created_at_gteq, class: 'form-control', placeholder: t('created_after'), autocomplete: 'off' = f.search_field :created_at_gteq, class: 'form-control', placeholder: t(:created_after), autocomplete: 'off'
.col-md-3 .col-md-3
.form-group .form-group
= f.label t(:created_before) = f.label t(:created_before)
= f.search_field :created_at_lteq, class: 'form-control', placeholder: t('created_before'), autocomplete: 'off' = f.search_field :created_at_lteq, class: 'form-control', placeholder: t(:created_before), autocomplete: 'off'
.col-md-3{style: 'padding-top: 25px;'} .col-md-3{style: 'padding-top: 25px;'}
%button.btn.btn-primary %button.btn.btn-primary
&nbsp; &nbsp;
%span.glyphicon.glyphicon-search %span.glyphicon.glyphicon-search
&nbsp; &nbsp;
%button.btn.btn-default.js-reset-form %button.btn.btn-default.js-reset-form
= t('clear_fields') = t(:clear_fields)
.row .row
.col-md-12 .col-md-12
%hr %hr
@ -50,11 +49,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('request_command') %th{class: 'col-xs-2'}= t(:request_command)
%th{class: 'col-xs-2'}= t('request_object') %th{class: 'col-xs-2'}= t(:request_object)
%th{class: 'col-xs-2'}= t('request_successful') %th{class: 'col-xs-2'}= t(:request_successful)
%th{class: 'col-xs-2'}= t('api_user') %th{class: 'col-xs-2'}= t(:api_user)
%th{class: 'col-xs-2'}= t('registrar') %th{class: 'col-xs-2'}= t(:registrar)
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'created_at') = sort_link(@q, 'created_at')
%tbody %tbody

View file

@ -1,44 +1,40 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back), :back, class: 'btn btn-primary')
%h2.text-center-xs = render 'shared/title', name: t(:epp_log)
= t('epp_log')
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back'), :back, class: 'btn btn-primary')
%hr
.row .row
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('details') %h3.panel-title= t(:details)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('request_command') %dt= t(:request_command)
%dd= @epp_log.request_command %dd= @epp_log.request_command
%dt= t('request_object') %dt= t(:request_object)
%dd= @epp_log.request_object %dd= @epp_log.request_object
%dt= t('request_successful') %dt= t(:request_successful)
%dd= @epp_log.request_successful %dd= @epp_log.request_successful
%dt= t('api_user') %dt= t(:api_user)
%dd= @epp_log.api_user_name %dd= @epp_log.api_user_name
%dt= t('registrar') %dt= t(:registrar)
%dd= @epp_log.api_user_registrar %dd= @epp_log.api_user_registrar
%dt= t('ip') %dt= t(:ip)
%dd= @epp_log.ip %dd= @epp_log.ip
%dt= t('created_at') %dt= t(:created_at)
%dd= @epp_log.created_at %dd= @epp_log.created_at
.row .row
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('request') %h3.panel-title= t(:request)
.panel-body .panel-body
= preserve do = preserve do
%pre %pre
@ -50,7 +46,7 @@
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('response') %h3.panel-title= t(:response)
.panel-body .panel-body
= preserve do = preserve do
%pre %pre

View file

@ -1,13 +1,11 @@
.row = render 'shared/title', name: t(:keyrelays)
.col-sm-12
%h2.text-center-xs= t('keyrelays')
%hr
.row .row
.col-md-12 .col-md-12
= search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f| = search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f|
.col-md-11 .col-md-11
.form-group .form-group
= f.search_field :domain_name_cont, class: 'form-control', placeholder: t('domain_name') = f.search_field :domain_name_cont, class: 'form-control', placeholder: t(:domain_name)
.col-md-1.text-right.text-center-xs .col-md-1.text-right.text-center-xs
.form-group .form-group
%button.btn.btn-primary %button.btn.btn-primary
@ -22,15 +20,15 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-4'} %th{class: 'col-xs-4'}
= sort_link(@q, 'pa_date', t('uploaded_at')) = sort_link(@q, 'pa_date', t(:uploaded_at))
%th{class: 'col-xs-3'} %th{class: 'col-xs-3'}
= t('expiry') = t(:expiry)
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'requester_name', t('requester')) = sort_link(@q, 'requester_name', t(:requester))
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'accepter_name', t('accepter')) = sort_link(@q, 'accepter_name', t(:accepter))
%th{class: 'col-xs-1'} %th{class: 'col-xs-1'}
= t('status') = t(:status)
%tbody %tbody
- @keyrelays.each do |x| - @keyrelays.each do |x|
%tr %tr

View file

@ -1,62 +1,59 @@
.row = render 'shared/title', name: t(:keyrelay_details)
.col-sm-12
%h2.text-center-xs
= t('keyrelay_details')
%hr
.row .row
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('keyrelay') %h3.panel-title= t(:keyrelay)
.panel-body{style: 'word-wrap: break-word;'} .panel-body{style: 'word-wrap: break-word;'}
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('uploaded_at') %dt= t(:uploaded_at)
%dd= @keyrelay.pa_date %dd= @keyrelay.pa_date
%dt= t('domain') %dt= t(:domain)
%dd= link_to(@keyrelay.domain, [:admin, @keyrelay.domain]) %dd= link_to(@keyrelay.domain, [:admin, @keyrelay.domain])
%dt= t('status') %dt= t(:status)
%dd= @keyrelay.status %dd= @keyrelay.status
%dt= t('flag') %dt= t(:flag)
%dd= @keyrelay.key_data_flags %dd= @keyrelay.key_data_flags
%dt= t('protocol') %dt= t(:protocol)
%dd= @keyrelay.key_data_protocol %dd= @keyrelay.key_data_protocol
%dt= t('algorithm') %dt= t(:algorithm)
%dd= @keyrelay.key_data_alg %dd= @keyrelay.key_data_alg
%dt= t('public_key') %dt= t(:public_key)
%dd= @keyrelay.key_data_public_key %dd= @keyrelay.key_data_public_key
%dt= t('password') %dt= t(:password)
%dd= @keyrelay.auth_info_pw %dd= @keyrelay.auth_info_pw
%dt= t('expiry_relative') %dt= t(:expiry_relative)
%dd= @keyrelay.expiry_relative %dd= @keyrelay.expiry_relative
%dt= t('expiry_absolute') %dt= t(:expiry_absolute)
%dd= @keyrelay.expiry_absolute %dd= @keyrelay.expiry_absolute
%dt= t('requester') %dt= t(:requester)
%dd= link_to(@keyrelay.requester, [:admin, @keyrelay.requester]) %dd= link_to(@keyrelay.requester, [:admin, @keyrelay.requester])
%dt= t('accepter') %dt= t(:accepter)
%dd= link_to(@keyrelay.accepter, [:admin, @keyrelay.accepter]) %dd= link_to(@keyrelay.accepter, [:admin, @keyrelay.accepter])
.row .row
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
.panel-heading.clearfix .panel-heading.clearfix
= t('legal_documents') = t(:legal_documents)
.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-8'}= t('created_at') %th{class: 'col-xs-8'}= t(:created_at)
%th{class: 'col-xs-4'}= t('type') %th{class: 'col-xs-4'}= t(:type)
%tbody %tbody
- @keyrelay.legal_documents.each do |x| - @keyrelay.legal_documents.each do |x|
%tr %tr

View file

@ -1,5 +1,5 @@
- content_for :actions do - content_for :actions do
= link_to(t(:back_to_registrar), [:admin, @registrar], class: 'btn btn-default') = link_to(t(:back_to_registrar), [:admin, @registrar], class: 'btn btn-default')
= render 'admin/shared/title', name: "#{t(:edit)}: #{@registrar.name}" = render 'shared/title', name: "#{t(:edit)}: #{@registrar.name}"
= render 'form' = render 'form'

View file

@ -1,10 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:add), new_admin_registrar_path, class: 'btn btn-primary')
%h2.text-center-xs= t('registrars') = render 'shared/title', name: t(:registrars)
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('add'), new_admin_registrar_path, class: 'btn btn-primary')
%hr
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive
@ -14,7 +11,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('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('new_registrar') = render 'shared/title', name: t(:new_registrar)
%hr
= render 'form' = render 'form'

View file

@ -1,13 +1,9 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:edit), edit_admin_registrar_path(@registrar), class: 'btn btn-primary')
%h2.text-center-xs = link_to(t(:delete), admin_registrar_path(@registrar),
= "#{t('registrar_details')}" method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger')
.col-sm-6 = render 'shared/title', name: @registrar.name
%h2.text-right.text-center-xs
= link_to(t('edit'), edit_admin_registrar_path(@registrar), class: 'btn btn-primary')
= link_to(t('delete'), admin_registrar_path(@registrar), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
%hr
- if @registrar.errors.any? - if @registrar.errors.any?
- @registrar.errors.each do |attr, err| - @registrar.errors.each do |attr, err|
= err = err
@ -18,56 +14,56 @@
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('general') %h3.panel-title= t(:general)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('name') %dt= t(:name)
%dd= @registrar.name %dd= @registrar.name
%dt= t('reg_no') %dt= t(:reg_no)
%dd= @registrar.reg_no %dd= @registrar.reg_no
%dt= t('vat_no') %dt= t(:vat_no)
%dd= @registrar.vat_no %dd= @registrar.vat_no
%dt= t('reference_no') %dt= t(:reference_no)
%dd= @registrar.reference_no %dd= @registrar.reference_no
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('contact') %h3.panel-title= t(:contact)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('country') %dt= t(:country)
%dd= @registrar.country %dd= @registrar.country
%dt= t('address') %dt= t(:address)
%dd= @registrar.address %dd= @registrar.address
%dt= t('contact_phone') %dt= t(:contact_phone)
%dd= @registrar.phone %dd= @registrar.phone
%dt= t('contact_email') %dt= t(:contact_email)
%dd= @registrar.email %dd= @registrar.email
%dt= t('billing_address') %dt= t(:billing_address)
%dd= @registrar.billing_address %dd= @registrar.billing_address
%dt= t('billing_email') %dt= t(:billing_email)
%dd= @registrar.billing_email %dd= @registrar.billing_email
.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('api_users') = t(:api_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('username') %th{class: 'col-xs-6'}= t(:username)
%th{class: 'col-xs-6'}= t('active') %th{class: 'col-xs-6'}= t(:active)
%tbody %tbody
- @registrar.api_users.each do |x| - @registrar.api_users.each do |x|
%tr %tr

View file

@ -1,6 +1,5 @@
.row = render 'shared/title', name: t(:repp_logs)
.col-sm-12
%h2.text-center-xs= t('repp_logs')
.row .row
.col-md-12 .col-md-12
%hr %hr
@ -9,39 +8,39 @@
.col-md-3 .col-md-3
.form-group .form-group
= f.label :request_path = f.label :request_path
= f.select :request_path_eq, [[t('choose'),''], '/repp/v1/domains', '/repp/v1/contacts'], {}, class: 'form-control selectize', placeholder: t('choose') = f.select :request_path_eq, [[t(:choose),''], '/repp/v1/domains', '/repp/v1/contacts'], {}, class: 'form-control selectize', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label :request_method = f.label :request_method
= f.select :request_method_eq, [[t('choose'),''], 'GET', 'POST', 'PUT', 'DELETE'], {}, class: 'form-control selectize', placeholder: t('choose') = f.select :request_method_eq, [[t(:choose),''], 'GET', 'POST', 'PUT', 'DELETE'], {}, class: 'form-control selectize', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label :response_code = f.label :response_code
= f.search_field :response_code_eq, class: 'form-control', placeholder: t('response_code'), autocomplete: 'off' = f.search_field :response_code_eq, class: 'form-control', placeholder: t(:response_code), autocomplete: 'off'
.col-md-3 .col-md-3
.form-group .form-group
= f.label :api_user = f.label :api_user
= f.search_field :api_user_name_cont, class: 'form-control', placeholder: t('api_user'), autocomplete: 'off' = f.search_field :api_user_name_cont, class: 'form-control', placeholder: t(:api_user), autocomplete: 'off'
.row .row
.col-md-3 .col-md-3
.form-group .form-group
= f.label :registrar = f.label :registrar
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t('registrar'), autocomplete: 'off' = f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar), autocomplete: 'off'
.col-md-3 .col-md-3
.form-group .form-group
= f.label t(:created_after) = f.label t(:created_after)
= f.search_field :created_at_gteq, class: 'form-control', placeholder: t('created_after'), autocomplete: 'off' = f.search_field :created_at_gteq, class: 'form-control', placeholder: t(:created_after), autocomplete: 'off'
.col-md-3 .col-md-3
.form-group .form-group
= f.label t(:created_before) = f.label t(:created_before)
= f.search_field :created_at_lteq, class: 'form-control', placeholder: t('created_before'), autocomplete: 'off' = f.search_field :created_at_lteq, class: 'form-control', placeholder: t(:created_before), autocomplete: 'off'
.col-md-3{style: 'padding-top: 25px;'} .col-md-3{style: 'padding-top: 25px;'}
%button.btn.btn-primary %button.btn.btn-primary
&nbsp; &nbsp;
%span.glyphicon.glyphicon-search %span.glyphicon.glyphicon-search
&nbsp; &nbsp;
%button.btn.btn-default.js-reset-form %button.btn.btn-default.js-reset-form
= t('clear_fields') = t(:clear_fields)
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -49,11 +48,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('request_path') %th{class: 'col-xs-2'}= t(:request_path)
%th{class: 'col-xs-2'}= t('request_method') %th{class: 'col-xs-2'}= t(:request_method)
%th{class: 'col-xs-2'}= t('response_code') %th{class: 'col-xs-2'}= t(:response_code)
%th{class: 'col-xs-2'}= t('api_user') %th{class: 'col-xs-2'}= t(:api_user)
%th{class: 'col-xs-2'}= t('registrar') %th{class: 'col-xs-2'}= t(:registrar)
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= sort_link(@q, 'created_at') = sort_link(@q, 'created_at')
%tbody %tbody

View file

@ -1,44 +1,40 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back), :back, class: 'btn btn-primary')
%h2.text-center-xs = render 'shared/title', name: t(:repp_log)
= t('repp_log')
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back'), :back, class: 'btn btn-primary')
%hr
.row .row
.col-md-12 .col-md-12
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('details') %h3.panel-title= t(:details)
.panel-body .panel-body
%dl.dl-horizontal %dl.dl-horizontal
%dt= t('request_path') %dt= t(:request_path)
%dd= @repp_log.request_path %dd= @repp_log.request_path
%dt= t('request_method') %dt= t(:request_method)
%dd= @repp_log.request_method %dd= @repp_log.request_method
%dt= t('response_code') %dt= t(:response_code)
%dd= @repp_log.response_code %dd= @repp_log.response_code
%dt= t('api_user') %dt= t(:api_user)
%dd= @repp_log.api_user_name %dd= @repp_log.api_user_name
%dt= t('registrar') %dt= t(:registrar)
%dd= @repp_log.api_user_registrar %dd= @repp_log.api_user_registrar
%dt= t('ip') %dt= t(:ip)
%dd= @repp_log.ip %dd= @repp_log.ip
%dt= t('created_at') %dt= t(:created_at)
%dd= @repp_log.created_at %dd= @repp_log.created_at
.row .row
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('request_params') %h3.panel-title= t(:request_params)
.panel-body .panel-body
= preserve do = preserve do
%pre %pre
@ -46,7 +42,7 @@
.col-md-6 .col-md-6
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h3.panel-title= t('response') %h3.panel-title= t(:response)
.panel-body .panel-body
= preserve do = preserve do
%pre %pre

View file

@ -1,5 +1,5 @@
%h2= t('settings') = render 'shared/title', name: t(:settings)
%hr
= form_tag [:admin, :settings] do = form_tag [:admin, :settings] do
.row .row
.col-md-12 .col-md-12
@ -8,9 +8,9 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-9'} %th{class: 'col-xs-9'}
= t('setting') = t(:setting)
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= t('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('save') %button.btn.btn-primary=t(:save)

View file

@ -1,11 +0,0 @@
- content_for :window_title do
%title= name
.row
.col-sm-8
%h1.text-center-xs
= truncate(name, length: 40)
.col-sm-4
%h1.text-right.text-center-xs
= yield :actions
%hr

View file

@ -1,5 +1,5 @@
%h2= t('zonefile_settings') = render 'shared/title', name: t(:zonefile_settings)
%hr
= form_for [:admin, @zonefile_setting], html: { class: 'form-horizontal' } do |f| = form_for [:admin, @zonefile_setting], html: { class: 'form-horizontal' } do |f|
.row .row
.col-md-12 .col-md-12
@ -47,4 +47,4 @@
.row .row
.col-md-12.text-right .col-md-12.text-right
%button.btn.btn-primary=t('save') %button.btn.btn-primary= t(:save)

View file

@ -1,7 +1,5 @@
.row = render 'shared/title', name: t(:zonefile_settings)
.col-sm-12
%h2.text-center-xs= t('zonefile_settings')
%hr
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive
@ -9,12 +7,14 @@
%thead %thead
%tr %tr
%th{class: 'col-xs-10'} %th{class: 'col-xs-10'}
= t('origin') = t(:origin)
%th{class: 'col-xs-2'} %th{class: 'col-xs-2'}
= t('action') = t(:action)
%tbody %tbody
- @zonefile_settings.each do |x| - @zonefile_settings.each do |x|
%tr %tr
%td= link_to(x, edit_admin_zonefile_setting_path(x)) %td= link_to(x, edit_admin_zonefile_setting_path(x))
%td %td
= link_to(t('generate_zonefile'), admin_zonefiles_path(origin: x.origin), method: 'post', class: 'btn btn-xs btn-primary') = link_to(t(:generate_zonefile),
admin_zonefiles_path(origin: x.origin),
method: 'post', class: 'btn btn-xs btn-primary')

View file

@ -5,11 +5,14 @@
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}/ %meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
%meta{content: "Full stack top-level domain (TLD) management.", name: "description"}/ %meta{content: "Full stack top-level domain (TLD) management.", name: "description"}/
%meta{content: "Gitlab LTD", name: "author"}/ %meta{content: "Gitlab LTD", name: "author"}/
- if content_for? :head_title
= yield :head_title
- else
%title= t(:admin_head_title)
= csrf_meta_tags = csrf_meta_tags
= stylesheet_link_tag 'admin-manifest', media: 'all', 'data-turbolinks-track' => true = stylesheet_link_tag 'admin-manifest', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true = javascript_include_tag 'application', 'data-turbolinks-track' => true
= favicon_link_tag 'favicon.ico' = favicon_link_tag 'favicon.ico'
%title Eesti Interneti SA
%body{:style => env_style} %body{:style => env_style}
/ Static navbar / Static navbar
.navbar.navbar-inverse.navbar-static-top{role: "navigation"} .navbar.navbar-inverse.navbar-static-top{role: "navigation"}

View file

@ -6,11 +6,14 @@
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}/ %meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
%meta{content: "Full stack top-level domain (TLD) management.", name: "description"}/ %meta{content: "Full stack top-level domain (TLD) management.", name: "description"}/
%meta{content: "Gitlab LTD", name: "author"}/ %meta{content: "Gitlab LTD", name: "author"}/
- if content_for? :head_title
= yield :head_title
- else
%title= t(:registrar_head_title)
= csrf_meta_tags = csrf_meta_tags
= stylesheet_link_tag 'registrar-manifest', media: 'all', 'data-turbolinks-track' => true = stylesheet_link_tag 'registrar-manifest', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true = javascript_include_tag 'application', 'data-turbolinks-track' => true
= favicon_link_tag 'favicon.ico' = favicon_link_tag 'favicon.ico'
%title EIS Registrar Portal
%body %body
/ Fixed navbar / Fixed navbar
%nav.navbar.navbar-default.navbar-fixed-top %nav.navbar.navbar-default.navbar-fixed-top

View file

@ -1,22 +1,17 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back_to_billing), registrar_invoices_path, class: 'btn btn-default')
%h1.text-center-xs = render 'shared/title', name: t(:account_activity)
= t('account_activity')
.col-sm-6
%h1.text-right.text-center-xs
= link_to(t('back_to_billing'), registrar_invoices_path, class: 'btn btn-default')
%hr
.row .row
.col-md-12 .col-md-12
.table-responsive .table-responsive
%table.table.table-hover.table-condensed %table.table.table-hover.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-5'}= t('description') %th{class: 'col-xs-5'}= t(:description)
%th{class: 'col-xs-3'}= t('receipt_date') %th{class: 'col-xs-3'}= t(:receipt_date)
%th{class: 'col-xs-2'}= t('invoice') %th{class: 'col-xs-2'}= t(:invoice)
%th{class: 'col-xs-2'}= t('sum') %th{class: 'col-xs-2'}= t(:sum)
%tbody %tbody
- @account_activities.each do |x| - @account_activities.each do |x|
%tr %tr

View file

@ -1,5 +1,5 @@
- if @contact.persisted? - if @contact.persisted?
= render 'registrar/shared/title', name: "#{t(:delete)}: #{@contact.name}" = render 'shared/title', name: "#{t(:delete)}: #{@contact.name}"
= form_for(@contact, url: registrar_contact_path(@contact), = form_for(@contact, url: registrar_contact_path(@contact),
class: 'form-horizontal', multipart: true, method: :delete) do |f| class: 'form-horizontal', multipart: true, method: :delete) do |f|

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: "#{t(:edit)}: #{@contact.name}" = render 'shared/title', name: "#{t(:edit)}: #{@contact.name}"
= form_for(@contact, url: registrar_contact_path(@contact), = form_for(@contact, url: registrar_contact_path(@contact),
html: {class: 'form-horizontal js-contact-form'}) do |f| html: {class: 'form-horizontal js-contact-form'}) do |f|

View file

@ -1,6 +1,6 @@
- content_for :actions do - content_for :actions do
= link_to(t(:new), new_registrar_contact_path, class: 'btn btn-primary') = link_to(t(:new), new_registrar_contact_path, class: 'btn btn-primary')
= render 'registrar/shared/title', name: t(:contacts) = render 'shared/title', name: t(:contacts)
- if @response - if @response
.table-responsive .table-responsive

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:contacts_info) = render 'shared/title', name: t(:contacts_info)
.row .row
.col-md-12 .col-md-12

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:new_contact) = render 'shared/title', name: t(:new_contact)
= form_for(@contact, url: registrar_contacts_path, = form_for(@contact, url: registrar_contacts_path,
html: {class: 'form-horizontal js-contact-form'}) do |f| html: {class: 'form-horizontal js-contact-form'}) do |f|

View file

@ -2,7 +2,7 @@
- content_for :actions do - content_for :actions do
= link_to(t(:edit), edit_registrar_contact_path(@contact.id), class: 'btn btn-primary') = link_to(t(:edit), edit_registrar_contact_path(@contact.id), class: 'btn btn-primary')
= link_to(t(:delete), delete_registrar_contact_path(@contact.id), class: 'btn btn-default') = link_to(t(:delete), delete_registrar_contact_path(@contact.id), class: 'btn btn-default')
= render 'registrar/shared/title', name: truncate(@contact.name) = render 'shared/title', name: @contact.name
.row .row
.col-md-6= render 'registrar/contacts/partials/general' .col-md-6= render 'registrar/contacts/partials/general'

View file

@ -1,12 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back_to_billing), registrar_invoices_path, class: 'btn btn-default')
%h1.text-center-xs = render 'shared/title', name: t(:add_deposit)
= t(:add_deposit)
.col-sm-6
%h1.text-right.text-center-xs
= link_to(t('back_to_billing'), registrar_invoices_path, class: 'btn btn-default')
%hr
= form_for([:registrar, @deposit], method: :post) do |f| = form_for([:registrar, @deposit], method: :post) do |f|
.row .row
.col-md-4.col-md-offset-4 .col-md-4.col-md-offset-4

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:check_domain) = render 'shared/title', name: t(:check_domain)
.row .row
.col-md-12 .col-md-12

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:check_domain) = render 'shared/title', name: t(:check_domain)
.row .row
.col-md-12 .col-md-12

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: "#{t(:delete)}: #{params[:domain_name]}" = render 'shared/title', name: "#{t(:delete)}: #{params[:domain_name]}"
= form_tag(destroy_registrar_domains_path, class: 'form-horizontal', multipart: true, method: :delete) do = form_tag(destroy_registrar_domains_path, class: 'form-horizontal', multipart: true, method: :delete) do
.col-md-8 .col-md-8

View file

@ -1,2 +1,3 @@
= render 'registrar/shared/title', name: "#{t(:edit)}: #{params[:domain_name]}" = render 'shared/title', name: "#{t(:edit)}: #{params[:domain_name]}"
= render 'form' = render 'form'

View file

@ -2,7 +2,7 @@
= link_to(t(:new), new_registrar_domain_path, class: 'btn btn-primary') = link_to(t(:new), new_registrar_domain_path, class: 'btn btn-primary')
= link_to(t(:transfer), transfer_registrar_domains_path, class: 'btn btn-default') = link_to(t(:transfer), transfer_registrar_domains_path, class: 'btn btn-default')
= link_to(t(:keyrelay), registrar_keyrelay_path, class: 'btn btn-default') = link_to(t(:keyrelay), registrar_keyrelay_path, class: 'btn btn-default')
= render 'registrar/shared/title', name: t(:domains) = render 'shared/title', name: t(:domains)
.row .row
.col-md-12{style: 'margin-bottom: -15px;'} .col-md-12{style: 'margin-bottom: -15px;'}

View file

@ -5,7 +5,7 @@
class: 'btn btn-default') class: 'btn btn-default')
= link_to(t(:delete), delete_registrar_domains_path(domain_name: params[:domain_name]), = link_to(t(:delete), delete_registrar_domains_path(domain_name: params[:domain_name]),
class: 'btn btn-default') class: 'btn btn-default')
= render 'registrar/shared/title', name: truncate(@data.css('name').text) = render 'shared/title', name: truncate(@data.css('name').text)
.row .row
.col-sm-12 .col-sm-12

View file

@ -1,3 +1,3 @@
= render 'registrar/shared/title', name: t(:new_domain) = render 'shared/title', name: t(:new_domain)
= render 'form' = render 'form'

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:renew_domain) = render 'shared/title', name: t(:renew_domain)
.row .row
.col-md-8 .col-md-8

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:renew_domain) = render 'shared/title', name: t(:renew_domain)
.row .row
.col-md-8 .col-md-8

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:transfer_domain) = render 'shared/title', name: t(:transfer_domain)
.row .row
.col-md-12 .col-md-12

View file

@ -1,4 +1,4 @@
= render 'registrar/shared/title', name: t(:transfer_domain) = render 'shared/title', name: t(:transfer_domain)
.row .row
.col-md-8 .col-md-8

View file

@ -1,16 +1,13 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:account_activity), registrar_account_activities_path, class: 'btn btn-default')
%h1.text-center-xs = link_to(t(:add_deposit), new_registrar_deposit_path, class: 'btn btn-default')
= t('your_account') = render 'shared/title', name: t(:your_account)
.col-sm-6
%h1.text-right.text-center-xs
= link_to(t('account_activity'), registrar_account_activities_path, class: 'btn btn-default')
= link_to(t('add_deposit'), new_registrar_deposit_path, class: 'btn btn-default')
%hr = t(:your_current_account_balance_is,
= t('your_current_account_balance_is', balance: current_user.registrar.cash_account.balance, currency: current_user.registrar.cash_account.currency) balance: current_user.registrar.cash_account.balance,
currency: current_user.registrar.cash_account.currency)
%h1= t('invoices') %h1= t(:invoices)
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -18,18 +15,18 @@
%table.table.table-hover.table-condensed %table.table.table-hover.table-condensed
%thead %thead
%tr %tr
%th{class: 'col-xs-3'}= t('invoice') %th{class: 'col-xs-3'}= t(:invoice)
%th{class: 'col-xs-3'}= t('receipt_date') %th{class: 'col-xs-3'}= t(:receipt_date)
%th{class: 'col-xs-3'}= t('due_date') %th{class: 'col-xs-3'}= t(:due_date)
%th{class: 'col-xs-3'}= t('total') %th{class: 'col-xs-3'}= t(:total)
%tbody %tbody
- @invoices.each do |x| - @invoices.each do |x|
%tr %tr
%td= link_to(t('invoice_no', no: x.id), [:registrar, x]) %td= link_to(t(:invoice_no, no: x.id), [:registrar, x])
- if x.receipt_date - if x.receipt_date
%td= l(x.receipt_date) %td= l(x.receipt_date)
- else - else
%td{class: 'text-danger'}= t('unpaid') %td{class: 'text-danger'}= t(:unpaid)
%td= l(x.due_date) %td= l(x.due_date)
%td= x.sum %td= x.sum
.row .row

View file

@ -1,11 +1,7 @@
.row - content_for :actions do
.col-sm-6 = link_to(t(:back), :back, class: 'btn btn-default')
%h1.text-center-xs = render 'shared/title', name: t(:invoice_no, no: @invoice.id)
= t('invoice_no', no: @invoice.id)
.col-sm-6
%h1.text-right.text-center-xs
= link_to(t('back'), :back, class: 'btn btn-default')
%hr
.row .row
.col-md-6= render 'registrar/invoices/partials/details' .col-md-6= render 'registrar/invoices/partials/details'
.row .row

View file

@ -1,7 +1,5 @@
.row = render 'shared/title', name: t(:keyrelay)
.col-sm-8
%h2.text-center-xs= t(:keyrelay)
%hr
.row .row
.col-md-8 .col-md-8
= form_tag registrar_keyrelay_path, class: 'form-horizontal', method: :post, multipart: true do = form_tag registrar_keyrelay_path, class: 'form-horizontal', method: :post, multipart: true do
@ -52,4 +50,4 @@
.form-group .form-group
.col-md-10.text-right .col-md-10.text-right
%button.btn.btn-primary= t('upload_key') %button.btn.btn-primary= t(:upload_key)

View file

@ -1,11 +0,0 @@
- content_for :window_title do
%title= name
.row
.col-sm-6
%h1.text-center-xs
= truncate(name)
.col-sm-6
%h1.text-right.text-center-xs
= yield :actions
%hr

View file

@ -1,11 +1,12 @@
= render 'registrar/shared/title', name: t(:xml_console) = render 'shared/title', name: t(:xml_console)
.row .row
.col-md-8 .col-md-8
= form_tag(registrar_xml_console_path) do = form_tag(registrar_xml_console_path) do
.form-group .form-group
= text_area_tag(:payload, params[:payload], class: 'form-control', rows: 15, style: 'font-family:monospace; font-size: 11px;') = text_area_tag(:payload, params[:payload], class: 'form-control', rows: 15, style: 'font-family:monospace; font-size: 11px;')
= button_tag t('send_epp_request'), class: 'btn btn-default' = button_tag t(:send_epp_request), class: 'btn btn-default'
.col-md-4 .col-md-4
%h4 Domain %h4 Domain
%a.js-load-xml{href: 'javascript:void(0)', data: {obj: 'domain', epp_action: 'create'}} %a.js-load-xml{href: 'javascript:void(0)', data: {obj: 'domain', epp_action: 'create'}}

View file

@ -0,0 +1,11 @@
- content_for :head_title do
%title= "#{truncate(name, length: 60)}#{head_title_sufix}"
.row
.col-sm-6
%h1.text-center-xs
= truncate(name, length: 35)
.col-sm-6
%h1.text-right.text-center-xs
= yield :actions
%hr

View file

@ -713,3 +713,7 @@ en:
is a computer that saves and forwards via a general-access data communications network such data that is connected with the domain name and corresponding IP addresses. Your IT helpdesk or Internet service provider will have the necessary information about the domain name servers. is a computer that saves and forwards via a general-access data communications network such data that is connected with the domain name and corresponding IP addresses. Your IT helpdesk or Internet service provider will have the necessary information about the domain name servers.
account_activity: 'Account activity' account_activity: 'Account activity'
receipt_date: 'Receipt date' receipt_date: 'Receipt date'
registrar_head_title_sufix: ' - EIS Registrar Portal'
admin_head_title_sufix: ' - Estonian Internet Foundation'
registrar_head_title: 'EIS Registrar Portal'
admin_head_title: 'Estonian Internet Foundation'

View file

@ -0,0 +1,27 @@
require 'rails_helper'
feature 'EPP log', type: :feature do
background { create_settings }
before :all do
@user = Fabricate(:admin_user, username: 'user1', identity_code: '37810013087')
@contact = Fabricate(:contact, name: 'Mr John')
end
context 'as unknown user' do
it 'should redirect to login path' do
visit admin_epp_logs_url
current_path.should == '/admin/login'
end
end
context 'as logged in user' do
it 'should show index' do
sign_in @user
visit admin_epp_logs_url
page.should have_content('REPP logs')
end
end
end

View file

@ -0,0 +1,27 @@
require 'rails_helper'
feature 'Repp log', type: :feature do
background { create_settings }
before :all do
@user = Fabricate(:admin_user, username: 'user1', identity_code: '37810013087')
@contact = Fabricate(:contact, name: 'Mr John')
end
context 'as unknown user' do
it 'should redirect to login path' do
visit admin_repp_logs_url
current_path.should == '/admin/login'
end
end
context 'as logged in user' do
it 'should show index' do
sign_in @user
visit admin_repp_logs_url
page.should have_content('REPP logs')
end
end
end

View file

@ -0,0 +1,27 @@
require 'rails_helper'
feature 'Zonefile settings', type: :feature do
background { create_settings }
before :all do
@user = Fabricate(:admin_user, username: 'user1', identity_code: '37810013087')
@contact = Fabricate(:contact, name: 'Mr John')
end
context 'as unknown user' do
it 'should redirect to login path' do
visit admin_zonefile_settings_url
current_path.should == '/admin/login'
end
end
context 'as logged in user' do
it 'should show index of contacts' do
sign_in @user
visit admin_zonefile_settings_url
page.should have_content('Zonefile settings')
end
end
end

View file

@ -158,7 +158,7 @@ describe Contact do
contact = @domain.contacts.first contact = @domain.contacts.first
contact.save contact.save
contact.statuses.map(&:value).should == %w(ok linked) contact.statuses.map(&:value).sort.should == %w(linked ok)
end end
it 'should not have linked status when no domain' do it 'should not have linked status when no domain' do
@ -167,7 +167,7 @@ describe Contact do
contact = @domain.contacts.first contact = @domain.contacts.first
contact.save contact.save
contact.statuses.map(&:value).should == %w(ok linked) contact.statuses.map(&:value).sort.should == %w(linked ok)
contact.domains.first.destroy contact.domains.first.destroy
contact.reload contact.reload