mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Merge fixes
This commit is contained in:
parent
4f51ac3876
commit
46b1ad300f
8 changed files with 85 additions and 309 deletions
|
@ -26,34 +26,35 @@
|
|||
- if unstable_env.present?
|
||||
.text-center
|
||||
%small{style: 'color: #0074B3;'}= unstable_env
|
||||
.navbar-collapse.collapse
|
||||
%ul.nav.navbar-nav.public-nav
|
||||
- active_class = %w(depp/domains depp/check depp/renew depp/tranfer depp/keyrelays).include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:domains), depp.domains_path
|
||||
- if current_user
|
||||
.navbar-collapse.collapse
|
||||
%ul.nav.navbar-nav.public-nav
|
||||
- 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
|
||||
%li{class: active_class}= link_to t(:contacts), depp.contacts_path
|
||||
- if can? :view, Depp::Contact
|
||||
- active_class = ['registrar/contacts'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:contacts), registrar_contacts_path
|
||||
|
||||
- if can? :show, Invoice
|
||||
- active_class = ['registrar/invoices'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t('accounting'), main_app.registrar_invoices_path
|
||||
- if can? :show, Invoice
|
||||
- active_class = ['registrar/invoices'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t('accounting'), registrar_invoices_path
|
||||
|
||||
- active_class = ['depp/xml_consoles'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:xml_console), depp.xml_console_path
|
||||
- if can? :view, :registrar_xml_console
|
||||
- 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
|
||||
%li= link_to t('log_out', user: current_user), '/registrar/logout'
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
- if user_signed_in?
|
||||
%li= link_to t('log_out', user: current_user), '/registrar/logout'
|
||||
/ /.nav-collapse
|
||||
/ Begin page content
|
||||
.container
|
||||
- if params[:controller].start_with?('depp/')
|
||||
= render 'depp/shared/flash'
|
||||
= render 'depp/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]
|
||||
= render 'registrar/shared/flash'
|
||||
- if depp_controller?
|
||||
= render 'registrar/shared/epp_results'
|
||||
|
||||
= yield
|
||||
%footer.footer
|
||||
.container
|
||||
|
|
|
@ -3,23 +3,22 @@
|
|||
= render 'registrar/shared/title', name: t(:contacts)
|
||||
|
||||
- if @response
|
||||
.panel.panel-default
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed.domify
|
||||
%thead
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-condensed
|
||||
%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
|
||||
%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
|
||||
%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')
|
||||
%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
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
.general-tab.panel.panel-default
|
||||
.form-group
|
||||
= 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]
|
||||
.panel-body
|
||||
.form-group
|
||||
= label_tag :domain_period, t('period'), class: 'col-md-2 control-label'
|
||||
.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' }
|
||||
= 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)
|
||||
|
||||
.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')
|
||||
- unless params[:domain_name]
|
||||
.form-group
|
||||
= label_tag :domain_period, t('period'), class: 'col-md-2 control-label'
|
||||
.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
|
||||
|
||||
- if @response
|
||||
.panel.panel-default
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed.domify
|
||||
%thead
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-condensed
|
||||
%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
|
||||
%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
|
||||
%td= link_to(x['name'], info_registrar_domains_path(domain_name: x['name']))
|
||||
%td
|
||||
= Time.zone.parse(x['valid_from']).try(:to_date)
|
||||
\-
|
||||
= Time.zone.parse(x['valid_to']).try(:to_date)
|
||||
%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']),
|
||||
%td= link_to(x['name'], info_registrar_domains_path(domain_name: x['name']))
|
||||
%td
|
||||
= Time.zone.parse(x['valid_from']).try(:to_date)
|
||||
\-
|
||||
= Time.zone.parse(x['valid_to']).try(:to_date)
|
||||
%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')
|
||||
|
||||
= paginate @paginatable_array
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- display = (flash.empty?) ? 'none' : 'block'
|
||||
- display = (flash[:notice] || flash[:alert]) ? 'block' : 'none'
|
||||
#flash{style: "display: #{display};"}
|
||||
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
||||
.alert{class: type}= flash[:notice] || flash[:alert]
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
- content_for :window_title do
|
||||
%title= name
|
||||
|
||||
.row.title-row
|
||||
.row
|
||||
.col-sm-6
|
||||
%h1= name
|
||||
%h1.text-center-xs
|
||||
= name
|
||||
.col-sm-6
|
||||
.top-actions
|
||||
%h1.text-right.text-center-xs
|
||||
= yield :actions
|
||||
%hr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue