diff --git a/app/assets/stylesheets/app.css.scss b/app/assets/stylesheets/app.css.scss index 9190fee26..e69de29bb 100644 --- a/app/assets/stylesheets/app.css.scss +++ b/app/assets/stylesheets/app.css.scss @@ -1,3 +0,0 @@ -.navbar-static-top { - margin-bottom: 19px; -} diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 88d17c1ad..9dd462bfc 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -2,3 +2,5 @@ @import "bootstrap"; @import "nprogress"; @import "nprogress-bootstrap"; +@import "bootstrap-ext"; +@import "app"; diff --git a/app/assets/stylesheets/bootstrap-ext.css.scss b/app/assets/stylesheets/bootstrap-ext.css.scss new file mode 100644 index 000000000..8ea0f72ff --- /dev/null +++ b/app/assets/stylesheets/bootstrap-ext.css.scss @@ -0,0 +1,81 @@ +.text-left-not-xs, .text-left-not-sm, .text-left-not-md, .text-left-not-lg { + text-align: left; +} +.text-center-not-xs, .text-center-not-sm, .text-center-not-md, .text-center-not-lg { + text-align: center; +} +.text-right-not-xs, .text-right-not-sm, .text-right-not-md, .text-right-not-lg { + text-align: right; +} +.text-justify-not-xs, .text-justify-not-sm, .text-justify-not-md, .text-justify-not-lg { + text-align: justify; +} + +@media (max-width: 767px) { + .text-left-not-xs, .text-center-not-xs, .text-right-not-xs, .text-justify-not-xs { + text-align: inherit; + } + .text-left-xs { + text-align: left; + } + .text-center-xs { + text-align: center; + } + .text-right-xs { + text-align: right; + } + .text-justify-xs { + text-align: justify; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .text-left-not-sm, .text-center-not-sm, .text-right-not-sm, .text-justify-not-sm { + text-align: inherit; + } + .text-left-sm { + text-align: left; + } + .text-center-sm { + text-align: center; + } + .text-right-sm { + text-align: right; + } + .text-justify-sm { + text-align: justify; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .text-left-not-md, .text-center-not-md, .text-right-not-md, .text-justify-not-md { + text-align: inherit; + } + .text-left-md { + text-align: left; + } + .text-center-md { + text-align: center; + } + .text-right-md { + text-align: right; + } + .text-justify-md { + text-align: justify; + } +} +@media (min-width: 1200px) { + .text-left-not-lg, .text-center-not-lg, .text-right-not-lg, .text-justify-not-lg { + text-align: inherit; + } + .text-left-lg { + text-align: left; + } + .text-center-lg { + text-align: center; + } + .text-right-lg { + text-align: right; + } + .text-justify-lg { + text-align: justify; + } +} diff --git a/app/views/admin/domains/partials/_admin_contacts.haml b/app/views/admin/domains/partials/_admin_contacts.haml index 12ad0bdb7..14c2e676f 100644 --- a/app/views/admin/domains/partials/_admin_contacts.haml +++ b/app/views/admin/domains/partials/_admin_contacts.haml @@ -12,4 +12,7 @@ %tr %td= link_to(x, root_path) %td= x.email - %td= link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + %td + = link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + = link_to(t('shared.detach'), root_path, method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-warning btn-xs') + diff --git a/app/views/admin/domains/partials/_nameservers.haml b/app/views/admin/domains/partials/_nameservers.haml index bd0514d35..db26df548 100644 --- a/app/views/admin/domains/partials/_nameservers.haml +++ b/app/views/admin/domains/partials/_nameservers.haml @@ -14,4 +14,6 @@ %td= link_to(x, root_path) %td= x.ipv4 %td= x.ipv6 - %td= link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + %td + = link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + = link_to(t('shared.delete'), root_path, method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger btn-xs') diff --git a/app/views/admin/domains/partials/_statuses.haml b/app/views/admin/domains/partials/_statuses.haml new file mode 100644 index 000000000..aab1721ad --- /dev/null +++ b/app/views/admin/domains/partials/_statuses.haml @@ -0,0 +1,17 @@ +.panel.panel-default + .panel-heading= t('shared.statuses') + .table-responsive + %table.table.table-hover.table-bordered.table-condensed + %thead + %tr + %th{class: 'col-xs-4'}= t('shared.status') + %th{class: 'col-xs-5'}= t('shared.description') + %th{class: 'col-xs-3'}= t('shared.action') + %tbody + - @domain.domain_statuses.each do |x| + %tr + %td= x.value + %td= x.description + %td + = link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + = link_to(t('shared.delete'), root_path, method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger btn-xs') diff --git a/app/views/admin/domains/partials/_tech_contacts.haml b/app/views/admin/domains/partials/_tech_contacts.haml index a64150cf1..cde800285 100644 --- a/app/views/admin/domains/partials/_tech_contacts.haml +++ b/app/views/admin/domains/partials/_tech_contacts.haml @@ -12,4 +12,6 @@ %tr %td= link_to(x, root_path) %td= x.email - %td= link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + %td + = link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs') + = link_to(t('shared.detach'), root_path, method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-warning btn-xs') diff --git a/app/views/admin/domains/show.haml b/app/views/admin/domains/show.haml index a5c93c7a9..bbd0ca6d3 100644 --- a/app/views/admin/domains/show.haml +++ b/app/views/admin/domains/show.haml @@ -1,11 +1,21 @@ -%h2= "#{t('shared.domain_details')}" +.row + .col-sm-6 + %h2.text-center-xs + = "#{t('shared.domain_details')}" + .col-sm-6 + %h2.text-right.text-center-xs + = link_to(t('shared.edit'), root_path, class: 'btn btn-primary') + = link_to(t('shared.delete'), root_path, method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger') + %hr .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/nameservers' +.row + .col-md-12= render 'admin/domains/partials/statuses' .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/nameservers' diff --git a/config/locales/en.yml b/config/locales/en.yml index d0fb04963..73f9d0896 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -176,3 +176,8 @@ en: hostname: 'Hostname' ipv4: 'IPv4' ipv6: 'IPv6' + statuses: 'Statuses' + description: 'Description' + delete: 'Delete' + are_you_sure: 'Are you sure?' + back: 'Back'