mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
Merge branch '105842700-registrants_portal' into staging
This commit is contained in:
commit
754fb7c9e5
8 changed files with 3 additions and 275 deletions
|
@ -1,9 +0,0 @@
|
||||||
class Registrant::RegistrantsController < RegistrantController
|
|
||||||
|
|
||||||
def show
|
|
||||||
@contact = Registrant.find(params[:id])
|
|
||||||
@current_user = current_user
|
|
||||||
authorize! :read, @contact
|
|
||||||
@contact.valid?
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -66,10 +66,7 @@
|
||||||
- @domains.each do |x|
|
- @domains.each do |x|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(x, registrant_domain_path(x))
|
%td= link_to(x, registrant_domain_path(x))
|
||||||
%td
|
%td= link_to(x.registrant.name, registrant_contact_path(x.registrant)) if x.registrant
|
||||||
- if x.registrant
|
|
||||||
= link_to(x.registrant, [:registrant, x.registrant]) if x.registrant
|
|
||||||
|
|
||||||
%td= l(x.valid_to, format: :short)
|
%td= l(x.valid_to, format: :short)
|
||||||
%td= link_to(x.registrar, registrant_registrar_path(x.registrar)) if x.registrar
|
%td= link_to(x.registrar, registrant_registrar_path(x.registrar)) if x.registrar
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
.panel-body
|
.panel-body
|
||||||
%dl.dl-horizontal
|
%dl.dl-horizontal
|
||||||
%dt= t(:name)
|
%dt= t(:name)
|
||||||
%dd= link_to(@domain.registrant, [:registrant, @domain.registrant])
|
%dd= link_to(@domain.registrant.name, registrant_contact_path(@domain.registrant))
|
||||||
|
|
||||||
%dt= t(:id)
|
%dt= t(:id)
|
||||||
%dd= @domain.registrant_code
|
%dd= @domain.registrant_code
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
= render 'shared/title', name: t(:contacts)
|
|
||||||
|
|
||||||
.row
|
|
||||||
.col-md-12
|
|
||||||
= search_form_for [:registrar, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
|
||||||
.row
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label :name
|
|
||||||
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:id)
|
|
||||||
= f.search_field :code_eq, class: 'form-control', placeholder: t(:id)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:ident)
|
|
||||||
= f.search_field :ident_matches, class: 'form-control', placeholder: t(:ident)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= label_tag t(:ident_type)
|
|
||||||
= select_tag '[q][ident_type_eq]', options_for_select(Contact::IDENT_TYPES, params[:q][:ident_type_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' }
|
|
||||||
.row
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:email)
|
|
||||||
= f.search_field :email_matches, class: 'form-control', placeholder: t(:email)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= label_tag t(:country)
|
|
||||||
= select_tag '[q][country_code_eq]', SortedCountry.all_options(params[:q][:country_code_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' }
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:is_registrant)
|
|
||||||
%div
|
|
||||||
= f.check_box :registrant_domains_id_not_null
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= label_tag t(:contact_type)
|
|
||||||
= select_tag '[q][domain_contacts_type_in]', options_for_select([['admin', 'AdminDomainContact'], ['tech', 'TechDomainContact']], params[:q][:domain_contacts_type_in]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
|
||||||
.row
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:registrar)
|
|
||||||
= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:created_at_from)
|
|
||||||
= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control datepicker', placeholder: t(:created_at_from)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:created_at_until)
|
|
||||||
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= f.label t(:updated_at)
|
|
||||||
= f.search_field :updated_at_gteq, value: params[:q][:updated_at_gteq], class: 'form-control datepicker', placeholder: t(:updated_at)
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
.form-group
|
|
||||||
= label_tag t(:status)
|
|
||||||
= select_tag :statuses_contains, options_for_select(Contact::STATUSES, params[:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
|
||||||
.col-md-3
|
|
||||||
.form-group
|
|
||||||
= label_tag t(:results_per_page)
|
|
||||||
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
|
||||||
.col-md-3{style: 'padding-top: 25px;'}
|
|
||||||
%button.btn.btn-primary
|
|
||||||
|
|
||||||
%span.glyphicon.glyphicon-search
|
|
||||||
|
|
||||||
%button.btn.btn-default.js-reset-form
|
|
||||||
= t(:clear_fields)
|
|
||||||
%hr
|
|
||||||
.row
|
|
||||||
.col-md-12
|
|
||||||
.table-responsive
|
|
||||||
%table.table.table-hover.table-bordered.table-condensed
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'name', t(:name))
|
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'code', t(:id))
|
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'ident', t(:ident))
|
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'email', t(:created_at))
|
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'registrar_name', t(:registrar))
|
|
||||||
%tbody
|
|
||||||
- @contacts.each do |contact|
|
|
||||||
%tr
|
|
||||||
%td= link_to(contact, registrar_contact_path(contact))
|
|
||||||
%td= contact.code
|
|
||||||
%td= ident_for(contact)
|
|
||||||
%td= l(contact.created_at, format: :short)
|
|
||||||
%td
|
|
||||||
- if contact.registrar
|
|
||||||
= link_to(contact.registrar, registrar_registrar_path(contact.registrar))
|
|
||||||
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= paginate @contacts
|
|
||||||
.col-md-6.text-right
|
|
||||||
.pagination
|
|
||||||
= t(:result_count, count: @contacts.total_count)
|
|
||||||
|
|
||||||
:coffee
|
|
||||||
$(".js-reset-form").on "click", (e) ->
|
|
||||||
e.preventDefault();
|
|
||||||
window.location = "#{registrar_contacts_path}"
|
|
|
@ -1,30 +0,0 @@
|
||||||
- domains = contact.all_registrant_domains(page: params[:domain_page], per: 20, params: params, registrant: current_user)
|
|
||||||
#contacts.panel.panel-default
|
|
||||||
.panel-heading
|
|
||||||
.pull-left
|
|
||||||
= t(:domains)
|
|
||||||
.pull-right
|
|
||||||
= form_tag request.path, method: :get do
|
|
||||||
= select_tag :domain_filter, options_for_select(%w(Registrant AdminDomainContact TechDomainContact), selected: params[:domain_filter]),
|
|
||||||
include_blank: true, class: 'form-control2 selectize2'
|
|
||||||
%button.btn.btn-primary
|
|
||||||
%span.glyphicon.glyphicon-search
|
|
||||||
.clearfix
|
|
||||||
|
|
||||||
.table-responsive
|
|
||||||
%table.table.table-hover.table-bordered.table-condensed
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
|
|
||||||
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar), :registrar_name
|
|
||||||
%th{class: 'col-xs-3'}=custom_sort_link t(:valid_to), :valid_to
|
|
||||||
%th{class: 'col-xs-3'}= t(:roles)
|
|
||||||
%tbody
|
|
||||||
- domains.each do |x|
|
|
||||||
%tr
|
|
||||||
%td= link_to(x.name, [:registrant, x])
|
|
||||||
%td= link_to(x.registrar, [:registrant, x.registrar])
|
|
||||||
%td= l(x.valid_to, format: :short)
|
|
||||||
%td= x.roles.join(", ")
|
|
||||||
|
|
||||||
= paginate domains, param_name: :domain_page
|
|
|
@ -1,21 +0,0 @@
|
||||||
- panel_class = contact.errors.messages[:statuses] ? 'panel-danger' : 'panel-default'
|
|
||||||
#contact_statuses.panel{class: panel_class}
|
|
||||||
.panel-heading.clearfix
|
|
||||||
= t(:statuses)
|
|
||||||
.table-responsive
|
|
||||||
%table.table.table-hover.table-bordered.table-condensed
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{class: 'col-xs-6'}= t(:status)
|
|
||||||
%th{class: 'col-xs-6'}= t(:notes)
|
|
||||||
%tbody
|
|
||||||
- contact.statuses.each do |status|
|
|
||||||
%tr
|
|
||||||
%td= status
|
|
||||||
%td= contact.status_notes[status]
|
|
||||||
|
|
||||||
- if contact.errors.messages[:statuses]
|
|
||||||
%tfoot
|
|
||||||
- @domain.errors.messages[:statuses].each do |s|
|
|
||||||
%tr
|
|
||||||
%td{colspan: 4}= s
|
|
|
@ -1,80 +0,0 @@
|
||||||
= render 'shared/title', name: @contact.name
|
|
||||||
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
.panel.panel-default
|
|
||||||
.panel-heading
|
|
||||||
%h3.panel-title= t(:general)
|
|
||||||
.panel-body
|
|
||||||
%dl.dl-horizontal
|
|
||||||
%dt= t(:id)
|
|
||||||
%dd= @contact.code
|
|
||||||
|
|
||||||
%dt= t(:authinfo_pw)
|
|
||||||
%dd
|
|
||||||
= text_field_tag :auth_info, @contact.auth_info, readonly: true, class: 'partially-hidden'
|
|
||||||
|
|
||||||
%br
|
|
||||||
|
|
||||||
%dt= t(:ident)
|
|
||||||
%dd= ident_for(@contact)
|
|
||||||
|
|
||||||
%dt= t(:email)
|
|
||||||
%dd= @contact.email
|
|
||||||
|
|
||||||
%dt= t(:phone)
|
|
||||||
%dd= @contact.phone
|
|
||||||
|
|
||||||
- if @contact.fax
|
|
||||||
%dt= t(:fax)
|
|
||||||
%dd= @contact.fax
|
|
||||||
|
|
||||||
%br
|
|
||||||
|
|
||||||
%dt= t(:created)
|
|
||||||
%dd
|
|
||||||
= l(@contact.created_at, format: :short)
|
|
||||||
by
|
|
||||||
= @contact.name
|
|
||||||
|
|
||||||
%dt= t(:updated)
|
|
||||||
%dd
|
|
||||||
= l(@contact.updated_at, format: :short)
|
|
||||||
by
|
|
||||||
= @contact.name
|
|
||||||
|
|
||||||
%dt= t(:registrar)
|
|
||||||
%dd
|
|
||||||
- if @contact.registrar.present?
|
|
||||||
= link_to(@contact.registrar, registrant_registrar_path(@contact.registrar)) if @contact.registrar
|
|
||||||
|
|
||||||
.col-md-6
|
|
||||||
.panel.panel-default
|
|
||||||
.panel-heading
|
|
||||||
%h3.panel-title= t(:contact)
|
|
||||||
.panel-body
|
|
||||||
%dl.dl-horizontal
|
|
||||||
%dl.dl-horizontal
|
|
||||||
- if @contact.org_name.present?
|
|
||||||
%dt= t(:org_name)
|
|
||||||
%dd= @contact.org_name
|
|
||||||
|
|
||||||
%dt= t(:street)
|
|
||||||
%dd= @contact.street.to_s.gsub("\n", '<br>').html_safe
|
|
||||||
|
|
||||||
%dt= t(:city)
|
|
||||||
%dd= @contact.city
|
|
||||||
|
|
||||||
%dt= t(:zip)
|
|
||||||
%dd= @contact.zip
|
|
||||||
|
|
||||||
%dt= t(:state)
|
|
||||||
%dd= @contact.state
|
|
||||||
|
|
||||||
%dt= t(:country)
|
|
||||||
%dd= @contact.country
|
|
||||||
|
|
||||||
.row
|
|
||||||
.col-md-12= render 'registrant/registrants/partials/statuses', contact: @contact
|
|
||||||
.row
|
|
||||||
.col-md-12= render 'registrant/registrants/partials/domains', contact: @contact
|
|
|
@ -160,28 +160,11 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :registrants
|
|
||||||
resources :contacts
|
resources :contacts
|
||||||
|
|
||||||
resources :whois
|
resources :whois
|
||||||
# resources :contacts do
|
|
||||||
# member do
|
|
||||||
# get 'delete'
|
|
||||||
# end
|
|
||||||
|
|
||||||
# collection do
|
|
||||||
# get 'check'
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
# resource :poll do
|
|
||||||
# collection do
|
|
||||||
# post 'confirm_keyrelay'
|
|
||||||
# post 'confirm_transfer'
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# ADMIN ROUTES
|
# ADMIN ROUTES
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :keyrelays
|
resources :keyrelays
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue