Merge pull request #1859 from internetee/1826-remove-code-for-old-registrant-portal

Drop legacy registrant portal
This commit is contained in:
Timo Võhmar 2021-03-04 13:11:15 +02:00 committed by GitHub
commit efdecb6d3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 2 additions and 1777 deletions

View file

@ -1,115 +0,0 @@
class Registrant::ContactsController < RegistrantController
helper_method :domain
helper_method :fax_enabled?
helper_method :domain_filter_params
skip_authorization_check only: %i[edit update]
before_action :set_contact, only: [:show]
def show
@requester_contact = Contact.find_by(ident: current_registrant_user.ident)
authorize! :read, @contact
end
def edit
@contact = current_user_contacts.find(params[:id])
end
def update
@contact = current_user_contacts.find(params[:id])
@contact.attributes = contact_params
response = update_contact_via_api(@contact.uuid)
updated = response.is_a?(Net::HTTPSuccess)
if updated
redirect_to registrant_domain_contact_url(domain, @contact), notice: t('.updated')
else
parsed_response = JSON.parse(response.body, symbolize_names: true)
@errors = parsed_response[:errors]
render :edit
end
end
private
def set_contact
id = params[:id]
contact = domain.contacts.find_by(id: id) || current_user_contacts.find_by(id: id)
contact ||= Contact.find_by(id: id, ident: domain.registrant.ident)
@contact = contact
end
def domain
current_user_domains.find(params[:domain_id])
end
def contact_params
permitted = %i[
name
email
phone
]
permitted << :fax if fax_enabled?
permitted += %i[street zip city state country_code] if Contact.address_processing?
params.require(:contact).permit(*permitted)
end
def access_token
uri = URI.parse("#{ENV['registrant_api_base_url']}/api/v1/registrant/auth/eid")
request = Net::HTTP::Post.new(uri)
request.form_data = access_token_request_params
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https')) do |http|
http.request(request)
end
json_doc = JSON.parse(response.body, symbolize_names: true)
json_doc[:access_token]
end
def access_token_request_params
{ ident: current_registrant_user.ident,
first_name: current_registrant_user.first_name,
last_name: current_registrant_user.last_name }
end
def fax_enabled?
ENV['fax_enabled'] == 'true'
end
def contact_update_api_params
params = contact_params
params = normalize_address_attributes_for_api(params) if Contact.address_processing?
params
end
def normalize_address_attributes_for_api(params)
normalized = params
address_parts = {}
Contact.address_attribute_names.each do |attr|
attr = attr.to_sym
address_parts[attr] = params[attr]
normalized.delete(attr)
end
normalized[:address] = address_parts
normalized
end
def update_contact_via_api(uuid)
uri = URI.parse("#{ENV['registrant_api_base_url']}/api/v1/registrant/contacts/#{uuid}")
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = "Bearer #{access_token}"
request['Content-type'] = 'application/json'
request.body = contact_update_api_params.to_json
Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https')) do |http|
http.request(request)
end
end
def domain_filter_params
params.permit(:domain_filter)
end
end

View file

@ -1,44 +0,0 @@
class Registrant::DomainDeleteConfirmsController < RegistrantController
skip_before_action :authenticate_registrant_user!, only: [:show, :update]
skip_authorization_check only: [:show, :update]
def show
return if params[:confirmed] || params[:rejected]
@domain = Domain.find(params[:id])
@domain = nil unless @domain.registrant_delete_confirmable?(params[:token])
end
def update
@domain = Domain.find(params[:id])
unless @domain.registrant_delete_confirmable?(params[:token])
flash[:alert] = t(:registrant_domain_verification_failed)
return render 'show'
end
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
verification_token: params[:token])
initiator = current_registrant_user ? current_registrant_user.username :
t(:user_not_authenticated)
confirmed = params[:confirmed] ? true : false
action = if confirmed
@registrant_verification.domain_registrant_delete_confirm!("email link #{initiator}")
else
@registrant_verification.domain_registrant_delete_reject!("email link #{initiator}")
end
fail_msg = t("registrant_domain_delete_#{confirmed ? 'confirmed' : 'rejected'}_failed".to_sym)
success_msg = t("registrant_domain_verification_#{confirmed ? 'confirmed' : 'rejected'}".to_sym)
flash[:alert] = action ? success_msg : fail_msg
(render 'show' && return) unless action
if confirmed
redirect_to registrant_domain_delete_confirm_path(@domain.id, confirmed: true)
else
redirect_to registrant_domain_delete_confirm_path(@domain.id, rejected: true)
end
end
end

View file

@ -1,44 +0,0 @@
class Registrant::DomainUpdateConfirmsController < RegistrantController
skip_before_action :authenticate_registrant_user!, only: %i[show update]
skip_authorization_check only: %i[show update]
def show
return if params[:confirmed] || params[:rejected]
@domain = Domain.find(params[:id])
@domain = nil unless @domain.registrant_update_confirmable?(params[:token])
end
def update
@domain = Domain.find(params[:id])
unless @domain.registrant_update_confirmable?(params[:token])
flash[:alert] = t(:registrant_domain_verification_failed)
return render 'show'
end
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
verification_token: params[:token])
initiator = current_registrant_user ? current_registrant_user.username :
t(:user_not_authenticated)
if params[:rejected]
if @registrant_verification.domain_registrant_change_reject!("email link, #{initiator}")
flash[:notice] = t(:registrant_domain_verification_rejected)
redirect_to registrant_domain_update_confirm_path(@domain.id, rejected: true)
else
flash[:alert] = t(:registrant_domain_verification_rejected_failed)
return render 'show'
end
elsif params[:confirmed]
if @registrant_verification.domain_registrant_change_confirm!("email link, #{initiator}")
Dispute.close_by_domain(@domain.name) if @domain.disputed?
flash[:notice] = t(:registrant_domain_verification_confirmed)
redirect_to registrant_domain_update_confirm_path(@domain.id, confirmed: true)
else
flash[:alert] = t(:registrant_domain_verification_confirmed_failed)
return render 'show'
end
end
end
end

View file

@ -1,79 +0,0 @@
class Registrant::DomainsController < RegistrantController
def index
authorize! :view, :registrant_domains
params[:q] ||= {}
normalize_search_parameters do
@q = current_user_domains.search(search_params)
end
domains = @q.result
respond_to do |format|
format.html do
@domains = domains.page(params[:page])
domains_per_page = params[:results_per_page].to_i
@domains = @domains.per(domains_per_page) if domains_per_page.positive?
end
format.csv do
raw_csv = @q.result.to_csv
send_data raw_csv, filename: 'domains.csv', type: "#{Mime[:csv]}; charset=utf-8"
end
format.pdf do
view = ActionView::Base.new(ActionController::Base.view_paths, domains: domains)
raw_html = view.render(file: 'registrant/domains/list_pdf', layout: false)
raw_pdf = domains.pdf(raw_html)
send_data raw_pdf, filename: 'domains.pdf'
end
end
end
def show
@domain = current_user_domains.find(params[:id])
authorize! :read, @domain
end
def confirmation
authorize! :view, :registrant_domains
domain = current_user_domains.find(params[:id])
if (domain.statuses.include?(DomainStatus::PENDING_UPDATE) ||
domain.statuses.include?(DomainStatus::PENDING_DELETE_CONFIRMATION)) &&
domain.pending_json.present?
@domain = domain
@confirmation_url = confirmation_url(domain)
else
flash[:warning] = I18n.t('available_verification_url_not_found')
redirect_to registrant_domain_path(domain)
end
end
private
def normalize_search_parameters
ca_cache = params[:q][:valid_to_lteq]
begin
end_time = params[:q][:valid_to_lteq].try(:to_date)
params[:q][:valid_to_lteq] = end_time.try(:end_of_day)
rescue
logger.warn('Invalid date')
end
yield
params[:q][:valid_to_lteq] = ca_cache
end
def confirmation_url(domain)
if domain.statuses.include?(DomainStatus::PENDING_UPDATE)
registrant_domain_update_confirm_url(token: domain.registrant_verification_token)
elsif domain.statuses.include?(DomainStatus::PENDING_DELETE_CONFIRMATION)
registrant_domain_delete_confirm_url(token: domain.registrant_verification_token)
end
end
def search_params
params.require(:q).permit(:name_matches, :registrant_ident_eq, :valid_to_gteq, :valid_to_lteq,
:results_per_page)
end
end

View file

@ -1,6 +0,0 @@
class Registrant::RegistrarsController < RegistrantController
def show
@registrar = Registrar.find(params[:id])
authorize! :read, @registrar
end
end

View file

@ -1,17 +0,0 @@
class Registrant::SessionsController < Devise::SessionsController
layout 'registrant/application'
private
def after_sign_in_path_for(_resource_or_scope)
registrant_root_path
end
def after_sign_out_path_for(_resource_or_scope)
new_registrant_user_session_path
end
def user_for_paper_trail
current_registrant_user.present? ? current_registrant_user.id_role_username : 'anonymous'
end
end

View file

@ -6,10 +6,6 @@ class ApplicationMailer < ActionMailer::Base
token = domain.registrant_verification_token
base_url = ENV['registrant_portal_verifications_base_url']
url = registrant_domain_delete_confirm_url(domain, token: token) if method == 'delete'
url ||= registrant_domain_update_confirm_url(domain, token: token)
return url if base_url.blank?
"#{base_url}/confirmation/#{domain.name_puny}/#{method}/#{token}"
end
end

View file

@ -1,7 +0,0 @@
<div class="alert alert-danger">
<ul>
<% errors.each_value do |errors| %>
<li><%= errors.join('<br>') %></li>
<% end %>
</ul>
</div>

View file

@ -1,64 +0,0 @@
<%= form_for [:registrant, domain, @contact], html: { class: 'form-horizontal' } do |f| %>
<% if @errors.present? %>
<%= render 'api_errors', errors: @errors %>
<% end %>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :name %>
</div>
<div class="col-md-4">
<%= f.text_field :name, required: true, autofocus: true, class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :email %>
</div>
<div class="col-md-4">
<%= f.email_field :email, required: true, class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :phone %>
</div>
<div class="col-md-4">
<%= f.text_field :phone, required: true, class: 'form-control' %>
</div>
</div>
<% if Contact.address_processing? %>
<div class="panel panel-default">
<div class="panel-heading"><%= t '.address' %></div>
<div class="panel-body">
<%= render 'registrant/contacts/form/address', f: f %>
</div>
</div>
<% end %>
<% if fax_enabled? %>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :fax %>
</div>
<div class="col-md-4">
<%= f.text_field :fax, class: 'form-control' %>
</div>
</div>
<% end %>
<hr/>
<div class="row">
<div class="col-md-6 text-right">
<%= button_tag t('.submit_btn'), class: 'btn btn-success' %>
</div>
</div>
<% end %>

View file

@ -1,12 +0,0 @@
<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>
<li><%= link_to @contact, registrant_domain_contact_path(domain, @contact) %></li>
</ol>
<div class="page-header">
<h1><%= t '.header' %></h1>
</div>
<%= render 'form' %>

View file

@ -1,51 +0,0 @@
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :street %>
</div>
<div class="col-md-4">
<%= f.text_field :street, required: true, class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :zip %>
</div>
<div class="col-md-4">
<%= f.text_field :zip, required: true, class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :city %>
</div>
<div class="col-md-4">
<%= f.text_field :city, required: true, class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :state %>
</div>
<div class="col-md-4">
<%= f.text_field :state, class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :country_code, 'Country' %>
</div>
<div class="col-md-4">
<%= f.select :country_code, SortedCountry.all_options(f.object.country_code), {},
required: true,
class: 'form-control' %>
</div>
</div>

View file

@ -1,42 +0,0 @@
<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="row">
<div class="col-md-6">
<h1><%= @contact %></h1>
</div>
<% if @contact.managed_by?(current_registrant_user) %>
<div class="col-md-6 text-right">
<%= link_to t('.edit_btn'), edit_registrant_domain_contact_path(domain, @contact),
class: 'btn btn-primary' %>
</div>
<% end %>
</div>
</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>

View file

@ -1,31 +0,0 @@
<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>

View file

@ -1,6 +0,0 @@
<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>

View file

@ -1,54 +0,0 @@
<% domains = contact.all_domains(page: params[:domain_page], per: 20,
params: domain_filter_params.to_h, requester: @requester_contact) %>
<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>

View file

@ -1,48 +0,0 @@
<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>

View file

@ -1,6 +0,0 @@
<%= search_form_for [:registrant, @q] do |f| %>
<%= f.search_field :name_cont %>
<%= f.submit do %>
<span class="glyphicon glyphicon-search"></span>
<% end %>
<% end %>

View file

@ -1,25 +0,0 @@
<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>

View file

@ -1,44 +0,0 @@
- if params[:confirmed].present?
.row
.col-md-12
%h1= t(:domain_delete_confirmed_title)
.row
.col-md-12
%p= t(:domain_delete_confirmed_body)
- elsif params[:rejected].present?
.row
.col-md-12
%h1= t(:domain_delete_rejected_title)
.row
.col-md-12
%p= t(:domain_delete_rejected_body)
- else
- if @domain.present?
.row
.col-md-12
%h1= t(:domain_delete_title)
.row
.col-md-12
%p= t(:domain_delete_body)
%hr
.row
.col-md-12.text-center.confirmation
.column-keys
%p= t(:domain_name) + ':'
%p= t('.registrant') + ':'
.column-values
%p= @domain.name
%p= "#{@domain.registrant.name} (#{@domain.registrant.ident})"
.row
.col-md-12.text-center
.confirmation
= form_for registrant_domain_delete_confirm_path(@domain.id), method: :patch do |f|
= hidden_field_tag :token, params[:token]
= f.button t(:confirm_domain_delete), name: 'confirmed', class: 'btn btn-primary'
= f.button t(:reject_domain_delete), name: 'rejected', class: 'btn btn-warning'
%hr
- else
%h1= t(:not_valid_domain_verification_title).html_safe
%p= t(:not_valid_domain_verification_body).html_safe

View file

@ -1,46 +0,0 @@
- if params[:confirmed].present?
.row
.col-md-12
%h1= t(:domain_registrant_change_confirmed_title)
.row
.col-md-12
%p= t(:domain_registrant_change_confirmed_body)
- elsif params[:rejected].present?
.row
.col-md-12
%h1= t(:domain_registrant_change_rejected_title)
.row
.col-md-12
%p= t(:domain_registrant_change_rejected_body)
- else
- if @domain.present?
.row
.col-md-12
%h1= t(:domain_registrant_change_title)
.row
.col-md-12
%p= t(:domain_registrant_change_body)
%hr
.row
.col-md-12.text-center.confirmation
.column-keys
%p= t(:domain_name) + ':'
%p= t(:current_registrant) + ':'
%p= t(:new_pending_registrant) + ':'
.column-values
%p= @domain.name
%p= "#{@domain.registrant.name} (#{@domain.registrant.ident})"
%p= "#{@domain.pending_registrant.try(:name)} (#{@domain.pending_registrant.try(:ident)})"
.row
.col-md-12.text-center
.confirmation
= form_for registrant_domain_update_confirm_path(@domain.id), method: :patch do |f|
= hidden_field_tag :token, params[:token]
= f.button t(:confirm_domain_registrant_update), name: 'confirmed', class: 'btn btn-primary'
= f.button t(:reject_domain_registrant_update), name: 'rejected', class: 'btn btn-warning'
%hr
- else
%h1= t(:not_valid_domain_verification_title).html_safe
%p= t(:not_valid_domain_verification_body).html_safe

View file

@ -1,9 +0,0 @@
<tr class="domain">
<td><%= link_to domain, registrant_domain_path(domain) %></td>
<td>
<%= link_to domain.registrant.name,
registrant_domain_contact_path(domain, domain.registrant) %>
</td>
<td><%= l domain.expire_time %></td>
<td><%= link_to domain.registrar, registrant_registrar_path(domain.registrar) %></td>
</tr>

View file

@ -1,13 +0,0 @@
- content_for :actions do
= render 'shared/title', name: @domain.name
.row
.col-md-12
.panel.panel-default
.panel-heading
%h3.panel-title= t('.header')
.panel-body
.input-group.input-group-lg
%span#sizing-addon1.input-group-addon.glyphicon.glyphicon-link
%input.form-control{"aria-describedby" => "sizing-addon1", type: "text", value: @confirmation_url}

View file

@ -1,102 +0,0 @@
<div class="page-header">
<h1><%= t '.header' %></h1>
</div>
<div class="row">
<div class="col-md-12">
<%= search_form_for [:registrant, @q], html: { class: 'search-form', autocomplete: 'off' } do |f| %>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<%= f.label :name, for: nil %>
<%= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name) %>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<%= f.label t(:registrant_ident), for: nil %>
<%= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident) %>
</div>
</div>
<div class="col-md-3">
<div class="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) %>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<%= f.label t(:valid_to_from), for: nil %>
<%= f.search_field :valid_to_gteq, value: params[:q][:valid_to_gteq], class: 'form-control js-datepicker', placeholder: t(:valid_to_from) %>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<%= f.label t(:valid_to_until), for: nil %>
<%= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control js-datepicker', placeholder: t(:valid_to_until) %>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<button class="btn btn-primary search">
&nbsp;
<span class="glyphicon glyphicon-search"></span>
&nbsp;
</button>
<%= button_tag t('.download_pdf_btn'),
formaction: registrant_domains_path(format: :pdf),
name: nil,
class: 'btn btn-default' %>
<%= button_tag t('.download_csv_btn'),
formaction: registrant_domains_path(format: :csv),
name: nil,
class: 'btn btn-default' %>
<%= link_to t('.reset_btn'), registrant_domains_path,
class: 'btn btn-default' %>
</div>
</div>
<% end %>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover table-bordered table-condensed domains">
<thead>
<tr>
<th class="col-xs-2">
<%= sort_link(@q, 'name') %>
</th>
<th class="col-xs-2">
<%= sort_link(@q, 'registrant_name', t('.registrant')) %>
</th>
<th class="col-xs-2">
<%= sort_link(@q, 'valid_to', t(:valid_to)) %>
</th>
<th class="col-xs-2">
<%= sort_link(@q, 'registrar_name', t(:registrar_name)) %>
</th>
</tr>
</thead>
<tbody>
<%= render @domains %>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<%= paginate @domains %>
</div>
<div class="col-md-6 text-right">
<div class="pagination">
<%= t(:result_count, count: @domains.total_count) %>
</div>
</div>
</div>

View file

@ -1,32 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
<th class="col-xs-2"><%= Domain.human_attribute_name :name %></th>
<th class="col-xs-2"><%= Registrant.model_name.human %></th>
<th class="col-xs-2"><%= Domain.human_attribute_name :valid_to %></th>
<th class="col-xs-2"><%= Registrar.model_name.human %></th>
</tr>
</thead>
<tbody>
<% @domains.each do |domain| %>
<tr>
<td><%= domain.name %></td>
<td><%= domain.registrant %></td>
<td><%= l(domain.valid_to, format: :short) %></td>
<td><%= domain.registrar %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>

View file

@ -1,18 +0,0 @@
.panel.panel-default
.panel-heading.clearfix
= t(:dnskeys)
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-1'}= t(:flag)
%th{class: 'col-xs-1'}= t(:protocol)
%th{class: 'col-xs-1'}= t(:algorithm)
%th{class: 'col-xs-9'}= t(:public_key)
%tbody
- @domain.dnskeys.each do |x|
%tr
%td= x.flags
%td= x.protocol
%td= x.alg
%td= x.public_key

View file

@ -1,7 +0,0 @@
<% contact = domain_contact.contact %>
<tr class="<%= domain_contact.model_name.singular.dasherize %>">
<td><%= link_to contact, registrant_domain_contact_path(domain, contact) %></td>
<td><%= contact.code %></td>
<td><%= contact.email %></td>
</tr>

View file

@ -1,24 +0,0 @@
<div class="panel panel-default">
<div class="panel-heading">
<%= t ".header_#{domain_contacts.model_name.plural.underscore}" %>
</div>
<div class="table-responsive">
<table class="table table-hover table-bordered table-condensed
<%= domain_contacts.model_name.plural.dasherize %>">
<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>
<%= render partial: 'registrant/domains/partials/domain_contact',
collection: domain_contacts,
locals: { domain: domain } %>
</tbody>
</table>
</div>
</div>

View file

@ -1,38 +0,0 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<%= t(:general) %>
</h3>
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt><%= t(:name) %></dt>
<dd><%= @domain.name %></dd>
<dt><%= Domain.human_attribute_name :registered_at %></dt>
<dd><%= l(@domain.registered_at) %></dd>
<dt><%= Registrar.model_name.human %></dt>
<dd><%= link_to(@domain.registrar, registrant_registrar_path(@domain.registrar)) %></dd>
<dt><%= Domain.human_attribute_name :transfer_code %></dt>
<dd>
<%= tag :input, type: 'text', value: @domain.transfer_code, readonly: true,
class: 'form-control input-sm' %>
</dd>
<dt><%= t(:valid_to) %></dt>
<dd><%= l(@domain.valid_to) %></dd>
<dt><%= Domain.human_attribute_name :outzone_at %></dt>
<dd><%= l(@domain.outzone_at) %></dd>
<dt><%= Domain.human_attribute_name :delete_date %></dt>
<dd><%= l @domain.delete_date %></dd>
<dt><%= Domain.human_attribute_name :force_delete_date %></dt>
<dd><%= l @domain.force_delete_date %></dd>
</dl>
</div>
</div>

View file

@ -1,14 +0,0 @@
.panel.panel-default
.panel-heading.clearfix
= t(:legal_documents)
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-8'}= t(:created_at)
%th{class: 'col-xs-4'}= t(:type)
%tbody
- legal_documents.each do |x|
%tr
%td= link_to(x.created_at, [:registrar, x])
%td= x.document_type

View file

@ -1,16 +0,0 @@
.panel.panel-default
.panel-heading.clearfix
= t(:nameservers)
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-4'}= t(:hostname)
%th{class: 'col-xs-4'}= t(:ipv4)
%th{class: 'col-xs-4'}= t(:ipv6)
%tbody
- @domain.nameservers.each do |x|
%tr
%td= x
%td= x.ipv4
%td= x.ipv6

View file

@ -1,26 +0,0 @@
<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>
<%= link_to registrant.name, registrant_domain_contact_path(domain, registrant) %>
</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>

View file

@ -1,18 +0,0 @@
#domain_statuses.panel.panel-default
.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
- @domain.statuses.each do |status|
%tr
%td
- if [DomainStatus::PENDING_UPDATE, DomainStatus::PENDING_DELETE_CONFIRMATION].include?(status) && @domain.pending_json.present?
= link_to(status, confirmation_registrant_domain_path(@domain))
- else
= status
%td= @domain.status_notes[status]

View file

@ -1,52 +0,0 @@
<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="col-md-6">
<%= render 'registrant/domains/partials/general' %>
</div>
<div class="col-md-6">
<%= render partial: 'registrant/domains/partials/registrant',
locals: { registrant: @domain.registrant, domain: @domain } %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'registrant/domains/partials/domain_contacts',
domain: @domain,
domain_contacts: @domain.tech_domain_contacts %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'registrant/domains/partials/domain_contacts',
domain: @domain,
domain_contacts: @domain.admin_domain_contacts %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'registrant/domains/partials/statuses' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'registrant/domains/partials/nameservers' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'registrant/domains/partials/dnskeys' %>
</div>
</div>

View file

@ -1,44 +0,0 @@
= render 'shared/title', name: @registrar.name
- if @registrar.errors.any?
- @registrar.errors.each do |attr, err|
= err
%br
- if @registrar.errors.any?
%hr
.row
.col-md-6
.panel.panel-default
.panel-heading
%h3.panel-title= t(:general)
.panel-body
%dl.dl-horizontal
%dt= Registrar.human_attribute_name :name
%dd= @registrar.name
%dt= Registrar.human_attribute_name :reg_no
%dd= @registrar.reg_no
%dt= Registrar.human_attribute_name :vat_no
%dd= @registrar.vat_no
%dt= Registrar.human_attribute_name :code
%dd= @registrar.code
.col-md-6
.panel.panel-default
.panel-heading
%h3.panel-title= t(:contact)
.panel-body
%dl.dl-horizontal
%dt= Registrar.human_attribute_name :country
%dd= @registrar.country
%dt= Registrar.human_attribute_name :address
%dd= @registrar.address
%dt= Registrar.human_attribute_name :phone
%dd= @registrar.phone
%dt= Registrar.human_attribute_name :email
%dd= @registrar.email

View file

@ -1,13 +0,0 @@
<div class="row">
<div class="form-signin col-md-6 center-block text-center">
<h2 class="form-signin-heading text-center">
<%= t '.header' %>
</h2>
<hr/>
<div class="row">
<%= t '.hint' %>
</div>
<br/>
<%= link_to t(:sign_in), "/auth/rant_tara", method: :post, class: 'btn btn-lg btn-primary btn-block' %>
</div>
</div>

View file

@ -1,17 +0,0 @@
= render 'shared/title', name: t(:whois)
.row
.col-md-12{style: 'margin-bottom: -15px;'}
= form_tag registrant_whois_path, class: 'form-horizontal', method: :get do
.col-md-11
.form-group
= text_field_tag :domain_name, params[:domain_name], class: 'form-control', placeholder: t(:domain_name), autocomplete: 'off', autofocus: true
.col-md-1.text-right.text-center-xs
.form-group
%button.btn.btn-default
&nbsp;
%span.glyphicon.glyphicon-search
&nbsp;
%hr
- if @domain
%pre= @domain.body