Merge branch 'master' into credit-and-debit-card-payments

This commit is contained in:
Maciej Szlosarczyk 2018-04-18 13:44:03 +03:00
commit eda6772c6f
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
112 changed files with 887 additions and 438 deletions

View file

@ -22,9 +22,6 @@
class: 'form-control input-sm' %>
</dd>
<dt><%= t(:valid_from) %></dt>
<dd><%= l(@domain.valid_from) %></dd>
<dt><%= t(:valid_to) %></dt>
<dd><%= l(@domain.valid_to) %></dd>

View file

@ -66,12 +66,10 @@
%p
= link_to t(:pending_epp), '#', class: 'js-pending'
%td{class: changing_css_class(version, "period", "period_unit", "valid_from", "valid_to")}
%td{class: changing_css_class(version, "period", "period_unit", "valid_to")}
%p
= "#{domain.period}#{domain.period_unit}"
%br
= "#{l(domain.valid_from, format: :date)}"
%br
= "#{l(domain.valid_to, format: :date)}"
%td

View file

@ -1,24 +0,0 @@
- content_for :actions do
= link_to(t(:edit_statuses), edit_admin_domain_path(@domain), class: 'btn btn-primary')
= link_to(t(:history), admin_domain_domain_versions_path(@domain.id), method: :get, class: 'btn btn-primary')
= render 'shared/title', name: @domain.name
.row
.col-md-6= render 'admin/domains/partials/general'
.col-md-6= render 'admin/domains/partials/owner'
.row
.col-md-12= render 'admin/domains/partials/tech_contacts'
.row
.col-md-12= render 'admin/domains/partials/admin_contacts'
.row
.col-md-12= render 'admin/domains/partials/statuses'
.row
.col-md-12= render 'admin/domains/partials/nameservers'
.row
.col-md-12= render 'admin/domains/partials/dnskeys'
.row
.col-md-12= render 'admin/domains/partials/keyrelays'
.row
.col-md-12
= render 'admin/domains/partials/legal_documents', legal_documents: @domain.legal_documents

View file

@ -0,0 +1,71 @@
<% domain = DomainPresenter.new(domain: @domain, view: self) %>
<ol class="breadcrumb">
<li><%= link_to t('admin.domains.index.header'), admin_domains_path %></li>
</ol>
<div class="page-header">
<div class="row">
<div class="col-sm-8">
<h1><%= domain.name_with_status %></h1>
</div>
<div class="col-sm-4 text-right">
<%= link_to t('.edit_btn'), edit_admin_domain_path(@domain), class: 'btn btn-primary' %>
<%= link_to t('.history_btn'), admin_domain_domain_versions_path(@domain),
class: 'btn btn-primary' %>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<%= render 'admin/domains/partials/general' %>
</div>
<div class="col-md-6">
<%= render 'admin/domains/partials/owner' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/tech_contacts' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/admin_contacts' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/statuses' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/nameservers' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/dnskeys' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/keyrelays' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<%= render 'admin/domains/partials/legal_documents', legal_documents:
@domain.legal_documents %>
</div>
</div>

View file

@ -1,8 +0,0 @@
- content_for :actions do
= link_to(t(:back_to_domain), admin_domain_path(@domain), class: 'btn btn-default')
= render 'shared/title', name: t(:zonefile)
.row
.col-md-12
= preserve do
%pre= @zonefile

View file

@ -37,7 +37,7 @@
= f.email_field :bcc, class: 'form-control'
.form-group
.col-md-12
= f.label :body, t(:html_body)
= f.label :body, t('admin.mail_templates.html_body')
= liquid_help
.col-md-12
= f.text_area(:body, class: 'form-control', size: '15x15')
@ -48,7 +48,7 @@
.col-md-12
= f.text_area(:text_body, class: 'form-control', size: '15x15')
%hr
%hr
.row
.col-md-12.text-right
= button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,3 +1,3 @@
= render 'shared/title', name: t(:new_mail_template)
= render 'shared/title', name: t('admin.mail_templates.new_mail_template')
= render 'form', mail_template: @mail_template

View file

@ -7,6 +7,9 @@
<dt><%= Registrar.human_attribute_name :vat_no %></dt>
<dd><%= registrar.vat_no %></dd>
<dt><%= Registrar.human_attribute_name :vat_rate %></dt>
<dd><%= number_to_percentage(registrar.vat_rate, precision: 1) %></dd>
<dt><%= Registrar.human_attribute_name :accounting_customer_code %></dt>
<dd><%= registrar.accounting_customer_code %></dd>

View file

@ -17,6 +17,19 @@
</div>
</div>
<div class="form-group">
<div class="col-md-4 control-label">
<%= f.label :vat_rate %>
</div>
<div class="col-md-3">
<div class="input-group">
<%= f.number_field :vat_rate, min: 0, max: 99.9, step: 0.1,
class: 'form-control' %>
<div class="input-group-addon">%</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-4 control-label">
<%= f.label :accounting_customer_code %>

View file

@ -8,7 +8,7 @@ xml.epp_head do
xml.tag!('domain:creData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
xml.tag!('domain:name', @domain.name)
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
xml.tag!('domain:exDate', @domain.valid_to.iso8601)
end
end

View file

@ -48,7 +48,7 @@ xml.epp_head do
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601))
end
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
xml.tag!('domain:exDate', @domain.valid_to.iso8601)
# TODO Make domain transferrable
#xml.tag!('domain:trDate', @domain.transferred_at) if @domain.transferred_at

View file

@ -5,5 +5,5 @@ builder.tag!('domain:trnData', 'xmlns:domain' => 'https://epp.tld.ee/schema/doma
builder.tag!('domain:reDate', dt.transfer_requested_at.try(:iso8601))
builder.tag!('domain:acID', dt.old_registrar.code)
builder.tag!('domain:acDate', dt.transferred_at.try(:iso8601) || dt.wait_until.try(:iso8601))
builder.tag!('domain:exDate', dt.domain_valid_to.try(:iso8601))
builder.tag!('domain:exDate', dt.domain_valid_to.iso8601)
end

View file

@ -7,7 +7,7 @@ xml.epp_head do
xml.resData do
xml.tag!('domain:renData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
xml.tag!('domain:name', @domain[:name])
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
xml.tag!('domain:exDate', @domain.valid_to.iso8601)
end
end

View file

@ -22,9 +22,6 @@
class: 'form-control input-sm' %>
</dd>
<dt><%= t(:valid_from) %></dt>
<dd><%= l(@domain.valid_from) %></dd>
<dt><%= t(:valid_to) %></dt>
<dd><%= l(@domain.valid_to) %></dd>

View file

@ -33,11 +33,11 @@
.col-md-3
.form-group
= f.label t(:minimum_total)
= f.search_field :sum_cache_gteq, class: 'form-control', placeholder: t(:minimum_total), autocomplete: 'off'
= f.search_field :total_gteq, class: 'form-control', placeholder: t(:minimum_total), autocomplete: 'off'
.col-md-3
.form-group
= f.label t(:maximum_total)
= f.search_field :sum_cache_lteq, class: 'form-control', placeholder: t(:maximum_total), autocomplete: 'off'
= f.search_field :total_lteq, class: 'form-control', placeholder: t(:maximum_total), autocomplete: 'off'
.col-md-3{style: 'padding-top: 25px;'}
%button.btn.btn-default
&nbsp;
@ -67,7 +67,7 @@
%td{class: 'text-danger'}= t(:unpaid)
%td= l(x.due_date, format: :date_long)
%td= currency(x.sum)
%td= currency(x.total)
.row
.col-md-12
= paginate @invoices

View file

@ -20,13 +20,13 @@
%tfoot
%tr
%th{colspan: 3}
%th= t(:total_without_vat)
%td= currency(@invoice.sum_without_vat)
%th= Invoice.human_attribute_name :subtotal
%td= number_to_currency @invoice.subtotal
%tr
%th.no-border{colspan: 3}
%th= t('vat', vat_prc: (@invoice.vat_prc * 100).round)
%td= currency(@invoice.vat)
%th= "VAT #{number_to_percentage(@invoice.vat_rate, precision: 1)}"
%td= number_to_currency @invoice.vat_amount
%tr
%th.no-border{colspan: 3}
%th= t(:total)
%td= currency(@invoice.sum)
%td= number_to_currency @invoice.total

View file

@ -238,16 +238,16 @@
%tfoot
%tr
%th{colspan: 3}
%th= t(:total_without_vat)
%td= "#{currency(@invoice.sum_without_vat)} #{@invoice.currency}"
%th= Invoice.human_attribute_name :subtotal
%td= number_to_currency @invoice.subtotal
%tr
%th.no-border{colspan: 3}
%th= t('vat', vat_prc: (@invoice.vat_prc * 100).round)
%td= "#{currency(@invoice.vat)} #{@invoice.currency}"
%th= "VAT #{number_to_percentage(@invoice.vat_rate, precision: 1)}"
%td= number_to_currency @invoice.vat_amount
%tr
%th.no-border{colspan: 3}
%th= t(:total)
%td= "#{currency(@invoice.sum)} #{@invoice.currency}"
%td= number_to_currency @invoice.total
#footer
%hr