mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Merge branch 'master' into refactor-devise-integration
# Conflicts: # app/controllers/registrant/contacts_controller.rb # config/routes.rb
This commit is contained in:
commit
e5cdb2e8db
79 changed files with 804 additions and 862 deletions
|
@ -1,23 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:address)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
- if @contact.org_name.present?
|
||||
%dt= t(:org_name)
|
||||
%dd= @contact.org_name
|
||||
|
||||
%dt= t(:street)
|
||||
%dd= @contact.street
|
||||
|
||||
%dt= t(:city)
|
||||
%dd= @contact.city
|
||||
|
||||
%dt= t(:zip)
|
||||
%dd= @contact.zip
|
||||
|
||||
%dt= t(:state)
|
||||
%dd= @contact.state
|
||||
|
||||
%dt= t(:country)
|
||||
%dd= @contact.country
|
|
@ -1,30 +0,0 @@
|
|||
- domains = contact.all_domains(page: params[:domain_page], per: 20, params: params.merge(leave_domains: domain_ids))
|
||||
#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_name), :registrar_name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:valid_to), :valid_to
|
||||
%th{class: 'col-xs-3'}=custom_sort_link Domain.human_attribute_name(:roles), :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,48 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:id)
|
||||
%dd= @contact.code
|
||||
|
||||
%dt= t(:name)
|
||||
%dd= @contact.name
|
||||
|
||||
%dt= t(:password)
|
||||
%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= Contact.human_attribute_name :created_at
|
||||
%dd
|
||||
= l(@contact.created_at, format: :short)
|
||||
by
|
||||
= @contact.name
|
||||
|
||||
%dt= Contact.human_attribute_name :updated_at
|
||||
%dd
|
||||
= l(@contact.updated_at, format: :short)
|
||||
by
|
||||
= @contact.name
|
||||
|
||||
%dt= t(:registrar_name)
|
||||
%dd
|
||||
- if @contact.registrar.present?
|
||||
= link_to(@contact.registrar, registrant_registrar_path(@contact.registrar))
|
|
@ -1,6 +0,0 @@
|
|||
= search_form_for [:registrant, @q] do |f|
|
||||
= f.search_field :name_cont
|
||||
= f.submit do
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
|
|
@ -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,11 +0,0 @@
|
|||
= render 'shared/title', name: @contact.name
|
||||
|
||||
.row
|
||||
.col-md-6= render 'registrant/contacts/partials/general'
|
||||
.col-md-6= render 'registrant/contacts/partials/address'
|
||||
.row
|
||||
.col-md-12= render 'registrant/contacts/partials/statuses', contact: @contact
|
||||
.row
|
||||
.col-md-12= render 'registrant/contacts/partials/domains', contact: @contact
|
||||
|
||||
|
25
app/views/registrant/contacts/show.html.erb
Normal file
25
app/views/registrant/contacts/show.html.erb
Normal file
|
@ -0,0 +1,25 @@
|
|||
<div class="page-header">
|
||||
<h1><%= @contact.name %></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= render 'registrant/contacts/show/general' %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<%= render 'registrant/contacts/show/address' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrant/contacts/show/statuses', contact: @contact %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrant/contacts/show/domains', contact: @contact %>
|
||||
</div>
|
||||
</div>
|
31
app/views/registrant/contacts/show/_address.html.erb
Normal file
31
app/views/registrant/contacts/show/_address.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<%= t '.header' %>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<% if @contact.org_name.present? %>
|
||||
<dt><%= Contact.human_attribute_name :org_name %></dt>
|
||||
<dd><%= @contact.org_name %></dd>
|
||||
<% end %>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :street %></dt>
|
||||
<dd><%= @contact.street %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :city %></dt>
|
||||
<dd><%= @contact.city %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :zip %></dt>
|
||||
<dd><%= @contact.zip %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :state %></dt>
|
||||
<dd><%= @contact.state %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :country %></dt>
|
||||
<dd><%= @contact.country %></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
6
app/views/registrant/contacts/show/_domain.html.erb
Normal file
6
app/views/registrant/contacts/show/_domain.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<tr>
|
||||
<td><%= link_to domain.name, registrant_domain_path(domain) %></td>
|
||||
<td><%= link_to domain.registrar, registrant_registrar_path(domain.registrar) %></td>
|
||||
<td><%= l domain.valid_to %></td>
|
||||
<td><%= domain.roles.join(", ") %></td>
|
||||
</tr>
|
54
app/views/registrant/contacts/show/_domains.html.erb
Normal file
54
app/views/registrant/contacts/show/_domains.html.erb
Normal file
|
@ -0,0 +1,54 @@
|
|||
<% domains = contact.all_domains(page: params[:domain_page], per: 20, params:
|
||||
params.merge(leave_domains: domain_ids)) %>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<%= t '.header' %>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 text-right">
|
||||
<%= form_tag request.path, method: :get, class: 'form-inline' do %>
|
||||
<%= select_tag :domain_filter,
|
||||
options_for_select(%w(Registrant AdminDomainContact TechDomainContact),
|
||||
selected: params[:domain_filter]),
|
||||
include_blank: t('.all'),
|
||||
class: 'form-control' %>
|
||||
<button class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-3">
|
||||
<%= custom_sort_link Domain.human_attribute_name(:name), :name %>
|
||||
</th>
|
||||
<th class="col-xs-3">
|
||||
<%= custom_sort_link Registrar.model_name.human, :registrar_name %>
|
||||
</th>
|
||||
<th class="col-xs-3">
|
||||
<%= custom_sort_link Domain.human_attribute_name(:valid_to), :valid_to %>
|
||||
</th>
|
||||
<th class="col-xs-3">
|
||||
<%= custom_sort_link Domain.human_attribute_name(:roles), :roles %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%= render partial: 'registrant/contacts/show/domain', collection: domains %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<%= paginate domains, param_name: :domain_page %>
|
||||
</div>
|
||||
</div>
|
48
app/views/registrant/contacts/show/_general.html.erb
Normal file
48
app/views/registrant/contacts/show/_general.html.erb
Normal file
|
@ -0,0 +1,48 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<%= t '.header' %>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><%= Contact.human_attribute_name :code %></dt>
|
||||
<dd><%= @contact.code %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :name %></dt>
|
||||
<dd><%= @contact.name %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :auth_info %></dt>
|
||||
<dd>
|
||||
<%= tag :input, type: 'text', value: @contact.auth_info, readonly: true,
|
||||
class: 'form-control input-sm' %>
|
||||
</dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :ident %></dt>
|
||||
<dd><%= ident_for(@contact) %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :email %></dt>
|
||||
<dd><%= @contact.email %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :phone %></dt>
|
||||
<dd><%= @contact.phone %></dd>
|
||||
|
||||
<% if @contact.fax %>
|
||||
<dt><%= Contact.human_attribute_name :fax %></dt>
|
||||
<dd><%= @contact.fax %></dd>
|
||||
<% end %>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :created_at %></dt>
|
||||
<dd><%= l @contact.created_at %></dd>
|
||||
|
||||
<dt><%= Contact.human_attribute_name :updated_at %></dt>
|
||||
<dd><%= l @contact.updated_at %></dd>
|
||||
|
||||
<dt><%= Registrar.model_name.human %></dt>
|
||||
<dd>
|
||||
<%= link_to @contact.registrar, registrant_registrar_path(@contact.registrar) %>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
6
app/views/registrant/contacts/show/_search.html.erb
Normal file
6
app/views/registrant/contacts/show/_search.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%= search_form_for [:registrant, @q] do |f| %>
|
||||
<%= f.search_field :name_cont %>
|
||||
<%= f.submit do %>
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
<% end %>
|
||||
<% end %>
|
25
app/views/registrant/contacts/show/_statuses.html.erb
Normal file
25
app/views/registrant/contacts/show/_statuses.html.erb
Normal file
|
@ -0,0 +1,25 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<%= t '.header' %>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-6"><%= t '.status' %></th>
|
||||
<th class="col-xs-6"><%= t '.notes' %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% contact.statuses.each do |status| %>
|
||||
<tr>
|
||||
<td><%= status %></td>
|
||||
<td><%= contact.status_notes[status] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue