mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Merge branch 'master' into remove-spring-gem
# Conflicts: # Gemfile.lock
This commit is contained in:
commit
31b3862fb9
9 changed files with 99 additions and 102 deletions
1
Gemfile
1
Gemfile
|
@ -13,6 +13,7 @@ gem 'SyslogLogger', '2.0', require: 'syslog/logger'
|
|||
gem 'iso8601', '0.8.6' # for dates and times
|
||||
gem 'rails', '4.2.10' # when update, all initializers eis_custom files needs check/update
|
||||
gem 'rest-client'
|
||||
gem 'uglifier'
|
||||
|
||||
# load env
|
||||
gem 'figaro', '1.1.1'
|
||||
|
|
|
@ -420,6 +420,8 @@ GEM
|
|||
tilt (1.4.1)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.1.11)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.2)
|
||||
|
@ -513,6 +515,7 @@ DEPENDENCIES
|
|||
selectize-rails (= 0.12.1)
|
||||
simplecov
|
||||
simpleidn (= 0.0.7)
|
||||
uglifier
|
||||
uuidtools (= 2.1.5)
|
||||
validates_email_format_of (= 1.6.3)
|
||||
webmock
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# As non-GDPR compliant, this controller is deprecated. Needs to be replaced with one that relies
|
||||
# on the REST WHOIS API.
|
||||
class Registrant::WhoisController < RegistrantController
|
||||
def index
|
||||
authorize! :view, :registrant_whois
|
||||
|
||||
if params[:domain_name].present?
|
||||
@domain = WhoisRecord.find_by(name: params[:domain_name]);
|
||||
end
|
||||
end
|
||||
end
|
|
@ -29,14 +29,12 @@ class Directo < ActiveRecord::Base
|
|||
"InvoiceDate" => invoice.created_at.strftime("%Y-%m-%dT%H:%M:%S"),
|
||||
"PaymentTerm" => Setting.directo_receipt_payment_term,
|
||||
"Currency" => invoice.currency,
|
||||
"CustomerCode"=> invoice.buyer.accounting_customer_code,
|
||||
'TotalVAT' => ActionController::Base.helpers.number_with_precision(invoice.vat_amount, precision: 2, separator: '.')
|
||||
"CustomerCode"=> invoice.buyer.accounting_customer_code
|
||||
){
|
||||
xml.line(
|
||||
"ProductID" => Setting.directo_receipt_product_name,
|
||||
"Quantity" => 1,
|
||||
"UnitPriceWoVAT" => ActionController::Base.helpers.number_with_precision(invoice.subtotal, precision: 2, separator: '.'),
|
||||
'VATCode' => invoice.buyer_vat_no,
|
||||
"UnitPriceWoVAT" => ActionController::Base.helpers.number_with_precision(invoice.subtotal, precision: 2, separator: "."),
|
||||
"ProductName" => invoice.order
|
||||
)
|
||||
}
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<%= f.text_field :valid_from, value: f.object.valid_from.try(:to_s, :dshort),
|
||||
<%= f.text_field :valid_from, value: f.object.valid_from.try(:to_date),
|
||||
class: 'form-control js-datepicker' %>
|
||||
<span class="input-group-addon">-</span>
|
||||
<%= f.text_field :valid_to, value: f.object.valid_to.try(:to_s, :dshort),
|
||||
<%= f.text_field :valid_to, value: f.object.valid_to.try(:to_date),
|
||||
class: 'form-control js-datepicker' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,84 +1,86 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<%= I18n.locale.to_s %>">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||
<% if content_for? :head_title %>
|
||||
<%= yield :head_title %>
|
||||
<% else %>
|
||||
<title>
|
||||
<%= t(:registrant_head_title) %>
|
||||
</title>
|
||||
<% end %>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Fixed navbar
|
||||
-->
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<%= link_to registrant_root_path, class: 'navbar-brand' do %>
|
||||
<%= t(:registrant_head_title) %>
|
||||
<% if unstable_env.present? %>
|
||||
<div class="text-center">
|
||||
<small style="color: #0074B3;">
|
||||
<%= unstable_env %>
|
||||
</small>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if current_user %>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav public-nav">
|
||||
<% if can? :view, Depp::Domain %>
|
||||
<% active_class = %w(registrant/domains registrant/check registrant/renew registrant/tranfer registrant/keyrelays).include?(params[:controller]) ? 'active' :nil %>
|
||||
<li class="<%= active_class %>">
|
||||
<%= link_to t(:domains), registrant_domains_path %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% active_class = %w(registrant/whois).include?(params[:controller]) ? 'active' :nil %>
|
||||
<li class="<%= active_class %>">
|
||||
<%= link_to 'Internet.ee', 'https://internet.ee' %>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<% if user_signed_in? %>
|
||||
<li>
|
||||
<%= link_to t(:log_out, user: current_user), '/registrant/logout' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||
<% if content_for? :head_title %>
|
||||
<%= yield :head_title %>
|
||||
<% else %>
|
||||
<title>
|
||||
<%= t(:registrant_head_title) %>
|
||||
</title>
|
||||
<% end %>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
<%= render 'shared/flash' %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= image_tag 'eis-logo-et.png' %>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
Version
|
||||
<%= CURRENT_COMMIT_HASH %>
|
||||
</div>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Fixed navbar
|
||||
-->
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<%= link_to registrant_root_path, class: 'navbar-brand' do %>
|
||||
<%= t(:registrant_head_title) %>
|
||||
<% if unstable_env.present? %>
|
||||
<div class="text-center">
|
||||
<small style="color: #0074B3;">
|
||||
<%= unstable_env %>
|
||||
</small>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if current_user %>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav public-nav">
|
||||
<% if can? :view, Depp::Domain %>
|
||||
<% active_class = %w(registrant/domains registrant/check registrant/renew registrant/tranfer registrant/keyrelays).include?(params[:controller]) ? 'active' :nil %>
|
||||
<li class="<%= active_class %>">
|
||||
<%= link_to t(:domains), registrant_domains_path %>
|
||||
</li>
|
||||
<li class="<%= active_class %>">
|
||||
<%= link_to 'WHOIS', 'https://whois.internet.ee' %>
|
||||
</li>
|
||||
<li class="<%= active_class %>">
|
||||
<%= link_to 'Internet.ee', 'https://internet.ee' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<% if user_signed_in? %>
|
||||
<li>
|
||||
<%= link_to t(:log_out, user: current_user), '/registrant/logout' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
<%= render 'shared/flash' %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<%= javascript_include_tag 'registrant-manifest', async: true %>
|
||||
</body>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= image_tag 'eis-logo-et.png' %>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
Version
|
||||
<%= CURRENT_COMMIT_HASH %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<%= javascript_include_tag 'registrant-manifest', async: true %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -23,7 +23,7 @@ Rails.application.configure do
|
|||
config.serve_static_files = false
|
||||
|
||||
# Compress JavaScripts and CSS.
|
||||
# config.assets.js_compressor = :uglifier
|
||||
config.assets.js_compressor = Uglifier.new(harmony: true)
|
||||
# config.assets.css_compressor = :sass
|
||||
|
||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# Some handy day formats
|
||||
Date::DATE_FORMATS[:dshort] = "%d.%m.%Y"
|
||||
Time::DATE_FORMATS[:dshort] = "%d.%m.%Y"
|
|
@ -9,9 +9,16 @@ class RegistrantLayoutTest < ActionDispatch::IntegrationTest
|
|||
travel_to Time.zone.parse('2010-07-05')
|
||||
end
|
||||
|
||||
def test_has_link_to_rest_whois
|
||||
def teardown
|
||||
super
|
||||
|
||||
travel_back
|
||||
end
|
||||
|
||||
def test_has_link_to_rest_whois_and_internet_ee
|
||||
visit registrant_domains_url
|
||||
|
||||
assert(has_link?('Internet.ee', href: 'https://internet.ee'))
|
||||
refute(has_link?('WHOIS', href: 'registrant/whois'))
|
||||
assert(has_link?('WHOIS', href: 'https://whois.internet.ee'))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue