mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Merge fixes
This commit is contained in:
parent
4f51ac3876
commit
46b1ad300f
8 changed files with 85 additions and 309 deletions
|
@ -1,226 +0,0 @@
|
||||||
html
|
|
||||||
font-size: 100%
|
|
||||||
overflow-y: scroll
|
|
||||||
-webkit-text-size-adjust: 100%
|
|
||||||
-ms-text-size-adjust: 100%
|
|
||||||
|
|
||||||
body
|
|
||||||
background: url(image_path('bg.jpg'))
|
|
||||||
|
|
||||||
h1
|
|
||||||
font-size: 26px
|
|
||||||
margin-bottom: 16px
|
|
||||||
|
|
||||||
a
|
|
||||||
color: #008fd7
|
|
||||||
text-decoration: none
|
|
||||||
|
|
||||||
a:hover,
|
|
||||||
a:active
|
|
||||||
color: #008fd7
|
|
||||||
outline: 0
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h1 a, h2 a, h3 a, h4 a
|
|
||||||
color: #272f34
|
|
||||||
text-decoration: none
|
|
||||||
font-weight: normal
|
|
||||||
font-family: 'EtelkaLightProBold'
|
|
||||||
|
|
||||||
h1
|
|
||||||
font-size: 22px
|
|
||||||
text-transform: uppercase
|
|
||||||
|
|
||||||
body,
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
select,
|
|
||||||
textarea
|
|
||||||
font-family: 'EtelkaLightProRegular', Arial, Helvetica, sans-serif
|
|
||||||
color: #5d6064
|
|
||||||
font-size: 13px
|
|
||||||
|
|
||||||
abbr[title]
|
|
||||||
border-bottom: 1px dotted
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong
|
|
||||||
font-weight: normal
|
|
||||||
font-family: 'EtelkaLightProBold'
|
|
||||||
|
|
||||||
blockquote
|
|
||||||
margin: 1em 40px
|
|
||||||
|
|
||||||
dfn
|
|
||||||
font-style: italic
|
|
||||||
|
|
||||||
mark
|
|
||||||
background: #ff0
|
|
||||||
color: #000
|
|
||||||
|
|
||||||
pre,
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
samp
|
|
||||||
font-family: monospace, serif
|
|
||||||
_font-family: 'courier new', monospace
|
|
||||||
font-size: 1em
|
|
||||||
|
|
||||||
pre
|
|
||||||
white-space: pre
|
|
||||||
white-space: pre-wrap
|
|
||||||
word-wrap: break-word
|
|
||||||
|
|
||||||
q
|
|
||||||
quotes: none
|
|
||||||
|
|
||||||
q:before,
|
|
||||||
q:after
|
|
||||||
content: ''
|
|
||||||
content: none
|
|
||||||
|
|
||||||
small
|
|
||||||
font-size: 75%
|
|
||||||
|
|
||||||
sub,
|
|
||||||
sup
|
|
||||||
font-size: 75%
|
|
||||||
line-height: 0
|
|
||||||
position: relative
|
|
||||||
vertical-align: baseline
|
|
||||||
|
|
||||||
sup
|
|
||||||
top: -0.5em
|
|
||||||
|
|
||||||
sub
|
|
||||||
bottom: -0.25em
|
|
||||||
|
|
||||||
.title-row
|
|
||||||
margin-bottom: 22px
|
|
||||||
|
|
||||||
.app-nav
|
|
||||||
padding-top: 7px
|
|
||||||
|
|
||||||
.general-tab
|
|
||||||
padding-top: 30px
|
|
||||||
padding-right: 20px
|
|
||||||
border-top: 0px
|
|
||||||
|
|
||||||
.container
|
|
||||||
border-radius: 3px
|
|
||||||
width: 860px
|
|
||||||
body > .container
|
|
||||||
background: #F8F8F8
|
|
||||||
margin-bottom: 50px
|
|
||||||
min-height: 600px
|
|
||||||
padding: 30px 30px 56px 30px
|
|
||||||
|
|
||||||
.container.version
|
|
||||||
background: transparent
|
|
||||||
margin-top: -116px
|
|
||||||
min-height: 0px
|
|
||||||
text-align: right
|
|
||||||
font-size: 12px
|
|
||||||
color: gray
|
|
||||||
|
|
||||||
.container.subnav
|
|
||||||
background: transparent
|
|
||||||
min-height: 0
|
|
||||||
padding: 0 46px 0 0
|
|
||||||
margin-bottom: 0
|
|
||||||
ul.nav
|
|
||||||
li a
|
|
||||||
background: #E7E7E7
|
|
||||||
height: 33px
|
|
||||||
line-height: 12px
|
|
||||||
color: gray
|
|
||||||
&:hover
|
|
||||||
color: #333
|
|
||||||
li.active a
|
|
||||||
background: #F8F8F8
|
|
||||||
font-weight: bold
|
|
||||||
color: #333
|
|
||||||
|
|
||||||
|
|
||||||
.subactions
|
|
||||||
h4
|
|
||||||
margin-bottom: 20px
|
|
||||||
margin-top: 10px
|
|
||||||
min-height: 600px
|
|
||||||
|
|
||||||
.sidebar
|
|
||||||
min-height: 400px
|
|
||||||
|
|
||||||
.content
|
|
||||||
margin-right: 240px
|
|
||||||
margin-left: 0
|
|
||||||
|
|
||||||
h4
|
|
||||||
margin: 0
|
|
||||||
|
|
||||||
.top-actions
|
|
||||||
margin-top: 12px
|
|
||||||
margin-bottom: 16px
|
|
||||||
float: right
|
|
||||||
|
|
||||||
.navbar-brand
|
|
||||||
line-height: 12px
|
|
||||||
padding-top: 20px
|
|
||||||
padding-bottom: 5px
|
|
||||||
|
|
||||||
.navbar-brand small
|
|
||||||
display: block
|
|
||||||
font-size: 10px
|
|
||||||
|
|
||||||
.footer
|
|
||||||
color: #777
|
|
||||||
padding-top: 70px
|
|
||||||
padding-bottom: 10px
|
|
||||||
font-size: 10px
|
|
||||||
|
|
||||||
.domify
|
|
||||||
td
|
|
||||||
vertical-align: middle !important
|
|
||||||
|
|
||||||
body.login
|
|
||||||
padding-top: 40px
|
|
||||||
padding-bottom: 40px
|
|
||||||
|
|
||||||
.form-signin
|
|
||||||
.form-signin-heading,
|
|
||||||
.form-signin
|
|
||||||
.checkbox
|
|
||||||
margin-bottom: 10px
|
|
||||||
|
|
||||||
.form-signin
|
|
||||||
max-width: 330px
|
|
||||||
padding: 15px
|
|
||||||
margin: 0 auto
|
|
||||||
|
|
||||||
input[type="text"]
|
|
||||||
margin-bottom: 8px
|
|
||||||
|
|
||||||
input[type="password"]
|
|
||||||
margin-bottom: 10px
|
|
||||||
|
|
||||||
.btn-lg
|
|
||||||
margin-top: 28px
|
|
||||||
|
|
||||||
.checkbox
|
|
||||||
font-weight: normal
|
|
||||||
|
|
||||||
.form-control
|
|
||||||
position: relative
|
|
||||||
height: auto
|
|
||||||
-webkit-box-sizing: border-box
|
|
||||||
-moz-box-sizing: border-box
|
|
||||||
box-sizing: border-box
|
|
||||||
padding: 10px
|
|
||||||
font-size: 16px
|
|
||||||
|
|
||||||
.form-control:focus
|
|
||||||
z-index: 2
|
|
||||||
|
|
||||||
// fix label position for medium screen
|
|
||||||
@media (min-width: 768px) and (max-width: 991px)
|
|
||||||
.form-horizontal .control-label
|
|
||||||
text-align: left
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
||||||
before_action :init_domain, except: :new
|
before_action :init_domain, except: :new
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -7,7 +7,7 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
||||||
|
|
||||||
res = depp_current_user.repp_request('domains', { details: true, limit: limit, offset: offset })
|
res = depp_current_user.repp_request('domains', { details: true, limit: limit, offset: offset })
|
||||||
if res.code == '200'
|
if res.code == '200'
|
||||||
@response = res.parsed_body.with_indifferent_access
|
@response = res.parsed_body.with_indifferent_access
|
||||||
@contacts = @response ? @response[:contacts] : []
|
@contacts = @response ? @response[:contacts] : []
|
||||||
|
|
||||||
@paginatable_array = Kaminari.paginate_array(
|
@paginatable_array = Kaminari.paginate_array(
|
||||||
|
@ -24,7 +24,7 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
||||||
render 'info'
|
render 'info'
|
||||||
else
|
else
|
||||||
flash[:alert] = t('domain_not_found')
|
flash[:alert] = t('domain_not_found')
|
||||||
redirect_to domains_path and return
|
redirect_to registrar_domains_path and return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
|
||||||
@data = @domain.create(@domain_params)
|
@data = @domain.create(@domain_params)
|
||||||
|
|
||||||
if response_ok?
|
if response_ok?
|
||||||
redirect_to info_domains_path(domain_name: @domain_params[:name])
|
redirect_to info_registrar_domains_path(domain_name: @domain_params[:name])
|
||||||
else
|
else
|
||||||
render 'new'
|
render 'new'
|
||||||
end
|
end
|
||||||
|
|
|
@ -26,34 +26,35 @@
|
||||||
- if unstable_env.present?
|
- if unstable_env.present?
|
||||||
.text-center
|
.text-center
|
||||||
%small{style: 'color: #0074B3;'}= unstable_env
|
%small{style: 'color: #0074B3;'}= unstable_env
|
||||||
.navbar-collapse.collapse
|
- if current_user
|
||||||
%ul.nav.navbar-nav.public-nav
|
.navbar-collapse.collapse
|
||||||
- active_class = %w(depp/domains depp/check depp/renew depp/tranfer depp/keyrelays).include?(params[:controller]) ? 'active' :nil
|
%ul.nav.navbar-nav.public-nav
|
||||||
%li{class: active_class}= link_to t(:domains), depp.domains_path
|
- if can? :view, Depp::Domain
|
||||||
|
- active_class = %w(registrar/domains registrar/check registrar/renew registrar/tranfer registrar/keyrelays).include?(params[:controller]) ? 'active' :nil
|
||||||
|
%li{class: active_class}= link_to t(:domains), registrar_domains_path
|
||||||
|
|
||||||
- active_class = ['depp/contacts'].include?(params[:controller]) ? 'active' :nil
|
- if can? :view, Depp::Contact
|
||||||
%li{class: active_class}= link_to t(:contacts), depp.contacts_path
|
- active_class = ['registrar/contacts'].include?(params[:controller]) ? 'active' :nil
|
||||||
|
%li{class: active_class}= link_to t(:contacts), registrar_contacts_path
|
||||||
|
|
||||||
- if can? :show, Invoice
|
- if can? :show, Invoice
|
||||||
- active_class = ['registrar/invoices'].include?(params[:controller]) ? 'active' :nil
|
- active_class = ['registrar/invoices'].include?(params[:controller]) ? 'active' :nil
|
||||||
%li{class: active_class}= link_to t('accounting'), main_app.registrar_invoices_path
|
%li{class: active_class}= link_to t('accounting'), registrar_invoices_path
|
||||||
|
|
||||||
- active_class = ['depp/xml_consoles'].include?(params[:controller]) ? 'active' :nil
|
- if can? :view, :registrar_xml_console
|
||||||
%li{class: active_class}= link_to t(:xml_console), depp.xml_console_path
|
- active_class = ['registrar/xml_consoles'].include?(params[:controller]) ? 'active' :nil
|
||||||
|
%li{class: active_class}= link_to t(:xml_console), registrar_xml_console_path
|
||||||
|
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
%li= link_to t('log_out', user: current_user), '/registrar/logout'
|
- if user_signed_in?
|
||||||
|
%li= link_to t('log_out', user: current_user), '/registrar/logout'
|
||||||
/ /.nav-collapse
|
/ /.nav-collapse
|
||||||
/ Begin page content
|
/ Begin page content
|
||||||
.container
|
.container
|
||||||
- if params[:controller].start_with?('depp/')
|
= render 'registrar/shared/flash'
|
||||||
= render 'depp/shared/flash'
|
- if depp_controller?
|
||||||
= render 'depp/shared/epp_results'
|
= render 'registrar/shared/epp_results'
|
||||||
- else
|
|
||||||
- display = (flash.empty?) ? 'none' : 'block'
|
|
||||||
#flash{style: "display: #{display};"}
|
|
||||||
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
|
||||||
.alert{class: type}= flash[:notice] || flash[:alert]
|
|
||||||
= yield
|
= yield
|
||||||
%footer.footer
|
%footer.footer
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -3,23 +3,22 @@
|
||||||
= render 'registrar/shared/title', name: t(:contacts)
|
= render 'registrar/shared/title', name: t(:contacts)
|
||||||
|
|
||||||
- if @response
|
- if @response
|
||||||
.panel.panel-default
|
.table-responsive
|
||||||
.table-responsive
|
%table.table.table-hover.table-condensed
|
||||||
%table.table.table-hover.table-bordered.table-condensed.domify
|
%thead
|
||||||
%thead
|
%tr
|
||||||
|
%th{class: 'col-xs-3'}= t(:name)
|
||||||
|
%th{class: 'col-xs-3'}= t(:code)
|
||||||
|
%th{class: 'col-xs-3'}= t(:ident)
|
||||||
|
%th{class: 'col-xs-3'}= t(:actions)
|
||||||
|
%tbody
|
||||||
|
- @contacts.each do |c|
|
||||||
%tr
|
%tr
|
||||||
%th{class: 'col-xs-3'}= t(:name)
|
%td= link_to(c[:name], registrar_contact_path(id: c[:code]))
|
||||||
%th{class: 'col-xs-3'}= t(:code)
|
%td= c[:code]
|
||||||
%th{class: 'col-xs-3'}= t(:ident)
|
%td= c[:ident]
|
||||||
%th{class: 'col-xs-3'}= t(:actions)
|
%td
|
||||||
%tbody
|
= link_to(t(:edit), edit_registrar_contact_path(c[:code]), class: 'btn btn-primary btn-xs')
|
||||||
- @contacts.each do |c|
|
= link_to(t(:delete), delete_registrar_contact_path(c[:code]), class: 'btn btn-default btn-xs')
|
||||||
%tr
|
|
||||||
%td= link_to(c[:name], registrar_contact_path(id: c[:code]))
|
|
||||||
%td= c[:code]
|
|
||||||
%td= c[:ident]
|
|
||||||
%td
|
|
||||||
= link_to(t(:edit), edit_registrar_contact_path(c[:code]), class: 'btn btn-primary btn-xs')
|
|
||||||
= link_to(t(:delete), delete_registrar_contact_path(c[:code]), class: 'btn btn-default btn-xs')
|
|
||||||
|
|
||||||
= paginate @paginatable_array
|
= paginate @paginatable_array
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
.general-tab.panel.panel-default
|
.general-tab.panel.panel-default
|
||||||
.form-group
|
.panel-body
|
||||||
= label_tag :domain_name, t('name'), class: 'col-md-2 control-label'
|
|
||||||
.col-md-10
|
|
||||||
- readonly = params[:domain_name] ? true : false
|
|
||||||
= text_field_tag('domain[name]', @domain_params[:name], class: 'form-control', readonly: readonly)
|
|
||||||
|
|
||||||
- unless params[:domain_name]
|
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag :domain_period, t('period'), class: 'col-md-2 control-label'
|
= label_tag :domain_name, t('name'), class: 'col-md-2 control-label'
|
||||||
.col-md-5
|
.col-md-10
|
||||||
= text_field_tag('domain[period]', @domain_params[:period], class: 'form-control')
|
- readonly = params[:domain_name] ? true : false
|
||||||
.col-md-5
|
= text_field_tag('domain[name]', @domain_params[:name], class: 'form-control', readonly: readonly)
|
||||||
= select_tag 'domain[period_unit]', options_for_select(['y', 'm', 'd'], @domain_params[:period_unit]), { class: 'form-control' }
|
|
||||||
|
|
||||||
.form-group
|
- unless params[:domain_name]
|
||||||
= label_tag :domain_registrant, t('registrant'), class: 'col-md-2 control-label'
|
.form-group
|
||||||
.col-md-10
|
= label_tag :domain_period, t('period'), class: 'col-md-2 control-label'
|
||||||
= text_field_tag('domain[registrant]', @domain_params[:registrant], class: 'form-control', placeholder: t('contact_code'), autocomplete: 'off')
|
.col-md-5
|
||||||
|
= text_field_tag('domain[period]', @domain_params[:period], class: 'form-control')
|
||||||
|
.col-md-5
|
||||||
|
= select_tag 'domain[period_unit]', options_for_select(['y', 'm', 'd'], @domain_params[:period_unit]), { class: 'form-control' }
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= label_tag :domain_registrant, t('registrant'), class: 'col-md-2 control-label'
|
||||||
|
.col-md-10
|
||||||
|
= text_field_tag('domain[registrant]', @domain_params[:registrant], class: 'form-control', placeholder: t('contact_code'), autocomplete: 'off')
|
||||||
|
|
|
@ -20,28 +20,27 @@
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
- if @response
|
- if @response
|
||||||
.panel.panel-default
|
.table-responsive
|
||||||
.table-responsive
|
%table.table.table-hover.table-condensed
|
||||||
%table.table.table-hover.table-bordered.table-condensed.domify
|
%thead
|
||||||
%thead
|
%tr
|
||||||
|
%th{class: 'col-xs-3'}= t(:name)
|
||||||
|
%th{class: 'col-xs-6'}= t(:valid)
|
||||||
|
%th{class: 'col-xs-3'}= t(:actions)
|
||||||
|
%tbody
|
||||||
|
- @response['domains'].each do |x|
|
||||||
%tr
|
%tr
|
||||||
%th{class: 'col-xs-3'}= t(:name)
|
%td= link_to(x['name'], info_registrar_domains_path(domain_name: x['name']))
|
||||||
%th{class: 'col-xs-6'}= t(:valid)
|
%td
|
||||||
%th{class: 'col-xs-3'}= t(:actions)
|
= Time.zone.parse(x['valid_from']).try(:to_date)
|
||||||
%tbody
|
\-
|
||||||
- @response['domains'].each do |x|
|
= Time.zone.parse(x['valid_to']).try(:to_date)
|
||||||
%tr
|
%td
|
||||||
%td= link_to(x['name'], info_registrar_domains_path(domain_name: x['name']))
|
= link_to(t(:edit), edit_registrar_domains_path(domain_name: x['name']),
|
||||||
%td
|
class: 'btn btn-primary btn-xs')
|
||||||
= Time.zone.parse(x['valid_from']).try(:to_date)
|
= link_to(t(:renew), renew_registrar_domains_path(domain_name: x['name']),
|
||||||
\-
|
class: 'btn btn-default btn-xs')
|
||||||
= Time.zone.parse(x['valid_to']).try(:to_date)
|
= link_to(t(:delete), delete_registrar_domains_path(domain_name: x['name']),
|
||||||
%td
|
|
||||||
= link_to(t(:edit), edit_registrar_domains_path(domain_name: x['name']),
|
|
||||||
class: 'btn btn-primary btn-xs')
|
|
||||||
= link_to(t(:renew), renew_registrar_domains_path(domain_name: x['name']),
|
|
||||||
class: 'btn btn-default btn-xs')
|
|
||||||
= link_to(t(:delete), delete_registrar_domains_path(domain_name: x['name']),
|
|
||||||
class: 'btn btn-default btn-xs')
|
class: 'btn btn-default btn-xs')
|
||||||
|
|
||||||
= paginate @paginatable_array
|
= paginate @paginatable_array
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- display = (flash.empty?) ? 'none' : 'block'
|
- display = (flash[:notice] || flash[:alert]) ? 'block' : 'none'
|
||||||
#flash{style: "display: #{display};"}
|
#flash{style: "display: #{display};"}
|
||||||
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
||||||
.alert{class: type}= flash[:notice] || flash[:alert]
|
.alert{class: type}= flash[:notice] || flash[:alert]
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
- content_for :window_title do
|
- content_for :window_title do
|
||||||
%title= name
|
%title= name
|
||||||
|
|
||||||
.row.title-row
|
.row
|
||||||
.col-sm-6
|
.col-sm-6
|
||||||
%h1= name
|
%h1.text-center-xs
|
||||||
|
= name
|
||||||
.col-sm-6
|
.col-sm-6
|
||||||
.top-actions
|
%h1.text-right.text-center-xs
|
||||||
= yield :actions
|
= yield :actions
|
||||||
|
%hr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue