diff --git a/app/views/registrant/contacts/partials/_address.haml b/app/views/registrant/contacts/partials/_address.haml deleted file mode 100644 index fe57bd393..000000000 --- a/app/views/registrant/contacts/partials/_address.haml +++ /dev/null @@ -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 diff --git a/app/views/registrant/contacts/partials/_address.html.erb b/app/views/registrant/contacts/partials/_address.html.erb new file mode 100644 index 000000000..5804f89e9 --- /dev/null +++ b/app/views/registrant/contacts/partials/_address.html.erb @@ -0,0 +1,35 @@ +
+
+

+ <%= t(:address) %> +

+
+ +
+
+ <% if @contact.org_name.present? %> +
+ <%= t(:org_name) %> +
+
+ <%= @contact.org_name %> +
+ <% end %> + +
<%= t(:street) %>
+
<%= @contact.street %>
+ +
<%= t(:city) %>
+
<%= @contact.city %>
+ +
<%= t(:zip) %>
+
<%= @contact.zip %>
+ +
<%= t(:state) %>
+
<%= @contact.state %>
+ +
<%= t(:country) %>
+
<%= @contact.country %>
+
+
+
\ No newline at end of file diff --git a/app/views/registrant/contacts/partials/_domains.haml b/app/views/registrant/contacts/partials/_domains.haml deleted file mode 100644 index 011b9c404..000000000 --- a/app/views/registrant/contacts/partials/_domains.haml +++ /dev/null @@ -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 diff --git a/app/views/registrant/contacts/partials/_domains.html.erb b/app/views/registrant/contacts/partials/_domains.html.erb new file mode 100644 index 000000000..ce1cc271d --- /dev/null +++ b/app/views/registrant/contacts/partials/_domains.html.erb @@ -0,0 +1,60 @@ +<% domains = contact.all_domains(page: params[:domain_page], per: 20, params: + params.merge(leave_domains: domain_ids)) %> + +
+
+
+ <%= t(:domains) %> +
+ +
+ <%= 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' %> + + <% end %> +
+
+
+ +
+ + + + + + + + + + + <% domains.each do |x| %> + + + + + + + <% end %> + +
<%= custom_sort_link t(:domain_name), :name %> + <%= custom_sort_link t(:registrar_name), :registrar_name %> + <%= custom_sort_link t(:valid_to), :valid_to %> + <%= custom_sort_link Domain.human_attribute_name(:roles), :roles %> +
+ <%= link_to(x.name, [:registrant, x]) %> + + <%= link_to(x.registrar, [:registrant, x.registrar]) %> + + <%= l(x.valid_to, format: :short) %> + + <%= x.roles.join(", ") %> +
+
+
+<%= paginate domains, param_name: :domain_page %> \ No newline at end of file diff --git a/app/views/registrant/contacts/partials/_general.haml b/app/views/registrant/contacts/partials/_general.haml deleted file mode 100644 index 6a59cdfef..000000000 --- a/app/views/registrant/contacts/partials/_general.haml +++ /dev/null @@ -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)) diff --git a/app/views/registrant/contacts/partials/_general.html.erb b/app/views/registrant/contacts/partials/_general.html.erb new file mode 100644 index 000000000..db57f1b65 --- /dev/null +++ b/app/views/registrant/contacts/partials/_general.html.erb @@ -0,0 +1,63 @@ +
+
+

+ <%= t(:general) %> +

+
+ +
+
+
<%= t(:id) %>
+
<%= @contact.code %>
+ +
<%= t(:name) %>
+
<%= @contact.name %>
+ +
<%= t(:password) %>
+
<%= text_field_tag :auth_info, @contact.auth_info, readonly: true, + class: 'partially-hidden' %>
+
+ +
<%= t(:ident) %>
+
<%= ident_for(@contact) %>
+ +
<%= t(:email) %>
+
<%= @contact.email %>
+ +
<%= t(:phone) %>
+
<%= @contact.phone %>
+ + <% if @contact.fax %> +
+ <%= t(:fax) %> +
+
+ <%= @contact.fax %> +
+ <% end %> + +
+ +
<%= Contact.human_attribute_name :created_at %>
+
+ <%= l(@contact.created_at, format: :short) %> + by + <%= @contact.name %> +
+ +
<%= Contact.human_attribute_name :updated_at %>
+
+ <%= l(@contact.updated_at, format: :short) %> + by + <%= @contact.name %> +
+ +
<%= t(:registrar_name) %>
+
+ <% if @contact.registrar.present? %> + <%= link_to @contact.registrar, registrant_registrar_path(@contact.registrar) %> + <% end %> +
+
+
+
\ No newline at end of file diff --git a/app/views/registrant/contacts/partials/_search.haml b/app/views/registrant/contacts/partials/_search.haml deleted file mode 100644 index 4a723bf6b..000000000 --- a/app/views/registrant/contacts/partials/_search.haml +++ /dev/null @@ -1,6 +0,0 @@ -= search_form_for [:registrant, @q] do |f| - = f.search_field :name_cont - = f.submit do - %span.glyphicon.glyphicon-search - - diff --git a/app/views/registrant/contacts/partials/_search.html.erb b/app/views/registrant/contacts/partials/_search.html.erb new file mode 100644 index 000000000..f44fa322f --- /dev/null +++ b/app/views/registrant/contacts/partials/_search.html.erb @@ -0,0 +1,6 @@ +<%= search_form_for [:registrant, @q] do |f| %> + <%= f.search_field :name_cont %> + <%= f.submit do %> + + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/registrant/contacts/partials/_statuses.haml b/app/views/registrant/contacts/partials/_statuses.haml deleted file mode 100644 index c39075754..000000000 --- a/app/views/registrant/contacts/partials/_statuses.haml +++ /dev/null @@ -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 diff --git a/app/views/registrant/contacts/partials/_statuses.html.erb b/app/views/registrant/contacts/partials/_statuses.html.erb new file mode 100644 index 000000000..e3bbab10d --- /dev/null +++ b/app/views/registrant/contacts/partials/_statuses.html.erb @@ -0,0 +1,36 @@ +<% panel_class = contact.errors.messages[:statuses] ? 'panel-danger' : 'panel-default' %> +
+
+ <%= t(:statuses) %> +
+ +
+ + + + + + + + + + <% contact.statuses.each do |status| %> + + + + + <% end %> + + + <% if contact.errors.messages[:statuses] %> + + <% @domain.errors.messages[:statuses].each do |s| %> + + + + <% end %> + + <% end %> +
<%= t(:status) %><%= t(:notes) %>
<%= status %><%= contact.status_notes[status] %>
<%= s %>
+
+
\ No newline at end of file diff --git a/app/views/registrant/contacts/show.haml b/app/views/registrant/contacts/show.haml deleted file mode 100644 index 521a8d549..000000000 --- a/app/views/registrant/contacts/show.haml +++ /dev/null @@ -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 - - diff --git a/app/views/registrant/contacts/show.html.erb b/app/views/registrant/contacts/show.html.erb new file mode 100644 index 000000000..7ead6b0e3 --- /dev/null +++ b/app/views/registrant/contacts/show.html.erb @@ -0,0 +1,23 @@ +<%= render 'shared/title', name: @contact.name %> + +
+
+ <%= render 'registrant/contacts/partials/general' %> +
+ +
+ <%= render 'registrant/contacts/partials/address' %> +
+
+ +
+
+ <%= render 'registrant/contacts/partials/statuses', contact: @contact %> +
+
+ +
+
+ <%= render 'registrant/contacts/partials/domains', contact: @contact %> +
+
\ No newline at end of file