mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Improve registrant area
This commit is contained in:
parent
43a70863cf
commit
638167e3cb
14 changed files with 119 additions and 80 deletions
|
@ -1,6 +1,7 @@
|
||||||
html
|
html
|
||||||
position: relative
|
position: relative
|
||||||
min-height: 100%
|
min-height: 100%
|
||||||
|
overflow-y: scroll
|
||||||
|
|
||||||
body
|
body
|
||||||
padding-bottom: 130px
|
padding-bottom: 130px
|
||||||
|
@ -30,9 +31,6 @@ h1, h2, h3, h4
|
||||||
color: white !important
|
color: white !important
|
||||||
background-size: 100%
|
background-size: 100%
|
||||||
|
|
||||||
.semifooter
|
|
||||||
padding: 42px 0 80px 0
|
|
||||||
|
|
||||||
.confirmation
|
.confirmation
|
||||||
padding: 40px 0 20px 0
|
padding: 40px 0 20px 0
|
||||||
.column-keys
|
.column-keys
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
class Registrant::ContactsController < RegistrantController
|
class Registrant::ContactsController < RegistrantController
|
||||||
helper_method :domain_ids
|
helper_method :domain_ids
|
||||||
|
helper_method :domain
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@contact = Contact.where(id: contacts).find_by(id: params[:id])
|
@contact = Contact.where(id: contacts).find_by(id: params[:id])
|
||||||
|
@ -26,4 +27,8 @@ class Registrant::ContactsController < RegistrantController
|
||||||
BusinessRegistryCache.fetch_by_ident_and_cc(ident, ident_cc).associated_domain_ids
|
BusinessRegistryCache.fetch_by_ident_and_cc(ident, ident_cc).associated_domain_ids
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def domain
|
||||||
|
Domain.find(params[:domain_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><%= link_to t('registrant.domains.index.header'), registrant_domains_path %></li>
|
||||||
|
<li><%= link_to domain, registrant_domain_path(domain) %></li>
|
||||||
|
<li><%= t 'registrant.contacts.contact_index' %></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><%= @contact.name %></h1>
|
<h1><%= @contact.name %></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= link_to domain, registrant_domain_path(domain) %></td>
|
<td><%= link_to domain, registrant_domain_path(domain) %></td>
|
||||||
<td><%= link_to domain.registrant.name, registrant_contact_path(domain.registrant) %></td>
|
<td>
|
||||||
|
<%= link_to domain.registrant.name,
|
||||||
|
registrant_domain_contact_path(domain, domain.registrant) %>
|
||||||
|
</td>
|
||||||
<td><%= l domain.expire_time %></td>
|
<td><%= l domain.expire_time %></td>
|
||||||
<td><%= link_to domain.registrar, registrant_registrar_path(domain.registrar) %></td>
|
<td><%= link_to domain.registrar, registrant_registrar_path(domain.registrar) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
- panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default'
|
|
||||||
.panel{class: panel_class}
|
|
||||||
.panel-heading.clearfix
|
|
||||||
= t('.title')
|
|
||||||
.table-responsive
|
|
||||||
%table.table.table-hover.table-bordered.table-condensed
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{class: 'col-xs-4'}= t(:name)
|
|
||||||
%th{class: 'col-xs-4'}= t(:id)
|
|
||||||
%th{class: 'col-xs-4'}= t(:email)
|
|
||||||
%tbody
|
|
||||||
- @domain.admin_contacts.each do |ac|
|
|
||||||
%tr
|
|
||||||
%td= link_to(ac, registrant_contact_path(ac))
|
|
||||||
%td= ac.code
|
|
||||||
%td= ac.email
|
|
||||||
- if @domain.errors.messages[:admin_contacts]
|
|
||||||
%tfoot
|
|
||||||
- @domain.errors.messages[:admin_contacts].each do |x|
|
|
||||||
%tr
|
|
||||||
%td{colspan: 4}= x
|
|
40
app/views/registrant/domains/partials/_contacts.html.erb
Normal file
40
app/views/registrant/domains/partials/_contacts.html.erb
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<% panel_class = errors ? 'panel-danger' : 'panel-default' %>
|
||||||
|
<div class="<%= panel_class %> panel">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<%= header %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-bordered table-condensed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-xs-4"><%= Contact.human_attribute_name :name %></th>
|
||||||
|
<th class="col-xs-4"><%= Contact.human_attribute_name :code %></th>
|
||||||
|
<th class="col-xs-4"><%= Contact.human_attribute_name :email %></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<% contacts.each do |contact| %>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<%= link_to contact, registrant_domain_contact_path(domain, contact) %>
|
||||||
|
</td>
|
||||||
|
<td><%= contact.code %></td>
|
||||||
|
<td><%= contact.email %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<% if errors %>
|
||||||
|
<tfoot>
|
||||||
|
<% errors.each do |error| %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"><%= error %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tfoot>
|
||||||
|
<% end %>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,19 +0,0 @@
|
||||||
.panel.panel-default
|
|
||||||
.panel-heading
|
|
||||||
%h3.panel-title= t('.title')
|
|
||||||
.panel-body
|
|
||||||
%dl.dl-horizontal
|
|
||||||
%dt= t(:name)
|
|
||||||
%dd= link_to(@domain.registrant.name, registrant_contact_path(@domain.registrant))
|
|
||||||
|
|
||||||
%dt= t(:id)
|
|
||||||
%dd= @domain.registrant_code
|
|
||||||
|
|
||||||
%dt= t(:identity_code)
|
|
||||||
%dd= @domain.registrant_ident
|
|
||||||
|
|
||||||
%dt= t(:email)
|
|
||||||
%dd= @domain.registrant_email
|
|
||||||
|
|
||||||
%dt= t(:phone)
|
|
||||||
%dd= @domain.registrant_phone
|
|
28
app/views/registrant/domains/partials/_registrant.html.erb
Normal file
28
app/views/registrant/domains/partials/_registrant.html.erb
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<%= t '.header' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<dl class="dl-horizontal">
|
||||||
|
<dt><%= Registrant.human_attribute_name :name %></dt>
|
||||||
|
<dd><%= registrant.name %></dd>
|
||||||
|
|
||||||
|
<dt><%= Registrant.human_attribute_name :code %></dt>
|
||||||
|
<dd><%= registrant.code %></dd>
|
||||||
|
|
||||||
|
<dt><%= Registrant.human_attribute_name :ident %></dt>
|
||||||
|
<dd><%= registrant.ident %></dd>
|
||||||
|
|
||||||
|
<dt><%= Registrant.human_attribute_name :email %></dt>
|
||||||
|
<dd><%= registrant.email %></dd>
|
||||||
|
|
||||||
|
<dt><%= Registrant.human_attribute_name :phone %></dt>
|
||||||
|
<dd><%= registrant.phone %></dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-footer text-right">
|
||||||
|
<%= link_to t('.view_details_btn'), registrant_domain_contact_path(domain, registrant) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,22 +0,0 @@
|
||||||
- panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default'
|
|
||||||
#tech_contacts.panel{class: panel_class}
|
|
||||||
.panel-heading.clearfix
|
|
||||||
= t('.title')
|
|
||||||
.table-responsive
|
|
||||||
%table.table.table-hover.table-bordered.table-condensed
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{class: 'col-xs-4'}= t(:name)
|
|
||||||
%th{class: 'col-xs-4'}= t(:id)
|
|
||||||
%th{class: 'col-xs-4'}= t(:email)
|
|
||||||
%tbody
|
|
||||||
- @domain.tech_contacts.each do |tc|
|
|
||||||
%tr
|
|
||||||
%td= link_to(tc, registrant_contact_path(tc))
|
|
||||||
%td= tc.code
|
|
||||||
%td= tc.email
|
|
||||||
- if @domain.errors.messages[:tech_contacts]
|
|
||||||
%tfoot
|
|
||||||
- @domain.errors.messages[:tech_contacts].each do |x|
|
|
||||||
%tr
|
|
||||||
%td{colspan: 4}= x
|
|
|
@ -1,23 +1,39 @@
|
||||||
<%= render 'shared/title', name: @domain.name %>
|
<ol class="breadcrumb">
|
||||||
|
<li><%= link_to t('registrant.domains.index.header'), registrant_domains_path %></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<h1><%= @domain %></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<%= render 'registrant/domains/partials/general' %>
|
<%= render 'registrant/domains/partials/general' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<%= render 'registrant/domains/partials/owner' %>
|
<%= render partial: 'registrant/domains/partials/registrant',
|
||||||
|
locals: { registrant: @domain.registrant, domain: @domain } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render 'registrant/domains/partials/tech_contacts' %>
|
<%= render 'registrant/domains/partials/contacts',
|
||||||
|
header: t('.tech_contacts'),
|
||||||
|
domain: @domain,
|
||||||
|
contacts: @domain.tech_contacts,
|
||||||
|
errors: @domain.errors.messages[:tech_contacts] %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render 'registrant/domains/partials/admin_contacts' %>
|
<%= render 'registrant/domains/partials/contacts',
|
||||||
|
header: t('.admin_contacts'),
|
||||||
|
domain: @domain,
|
||||||
|
contacts: @domain.admin_contacts,
|
||||||
|
errors: @domain.errors.messages[:admin_contacts] %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ en:
|
||||||
registrant: Registrant
|
registrant: Registrant
|
||||||
admin_domain_contact: Administrative contact
|
admin_domain_contact: Administrative contact
|
||||||
tech_domain_contact: Technical contact
|
tech_domain_contact: Technical contact
|
||||||
|
attributes:
|
||||||
|
contact:
|
||||||
|
code: EPP Code
|
||||||
errors:
|
errors:
|
||||||
models:
|
models:
|
||||||
contact:
|
contact:
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
en:
|
en:
|
||||||
registrant:
|
registrant:
|
||||||
contacts:
|
contacts:
|
||||||
|
contact_index: Contacts
|
||||||
|
|
||||||
show:
|
show:
|
||||||
general:
|
general:
|
||||||
header: General
|
header: General
|
||||||
|
|
|
@ -8,12 +8,12 @@ en:
|
||||||
|
|
||||||
download_list:
|
download_list:
|
||||||
registrant: Registrant
|
registrant: Registrant
|
||||||
|
|
||||||
|
show:
|
||||||
|
admin_contacts: Administrative contacts
|
||||||
|
tech_contacts: Technical contacts
|
||||||
|
|
||||||
partials:
|
partials:
|
||||||
owner:
|
registrant:
|
||||||
title: Registrant
|
header: Registrant
|
||||||
|
view_details_btn: View details
|
||||||
admin_contacts:
|
|
||||||
title: Admin. contacts
|
|
||||||
|
|
||||||
tech_contacts:
|
|
||||||
title: Tech. contacts
|
|
||||||
|
|
|
@ -113,8 +113,9 @@ Rails.application.routes.draw do
|
||||||
root 'domains#index'
|
root 'domains#index'
|
||||||
|
|
||||||
resources :registrars, only: :show
|
resources :registrars, only: :show
|
||||||
resources :contacts, only: :show
|
|
||||||
resources :domains, only: %i[index show] do
|
resources :domains, only: %i[index show] do
|
||||||
|
resources :contacts, only: %i[show]
|
||||||
|
|
||||||
collection do
|
collection do
|
||||||
get :download_list
|
get :download_list
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue