Add statuses and responsive utils

This commit is contained in:
Martin Lensment 2014-09-08 10:52:37 +03:00
parent 9a62319142
commit 98cbae993d
9 changed files with 128 additions and 9 deletions

View file

@ -1,3 +0,0 @@
.navbar-static-top {
margin-bottom: 19px;
}

View file

@ -2,3 +2,5 @@
@import "bootstrap"; @import "bootstrap";
@import "nprogress"; @import "nprogress";
@import "nprogress-bootstrap"; @import "nprogress-bootstrap";
@import "bootstrap-ext";
@import "app";

View file

@ -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;
}
}

View file

@ -12,4 +12,7 @@
%tr %tr
%td= link_to(x, root_path) %td= link_to(x, root_path)
%td= x.email %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')

View file

@ -14,4 +14,6 @@
%td= link_to(x, root_path) %td= link_to(x, root_path)
%td= x.ipv4 %td= x.ipv4
%td= x.ipv6 %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')

View file

@ -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')

View file

@ -12,4 +12,6 @@
%tr %tr
%td= link_to(x, root_path) %td= link_to(x, root_path)
%td= x.email %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')

View file

@ -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 %hr
.row .row
.col-md-6= render 'admin/domains/partials/general' .col-md-6= render 'admin/domains/partials/general'
.col-md-6= render 'admin/domains/partials/owner' .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 .row
.col-md-12= render 'admin/domains/partials/tech_contacts' .col-md-12= render 'admin/domains/partials/tech_contacts'
.row .row
.col-md-12= render 'admin/domains/partials/admin_contacts' .col-md-12= render 'admin/domains/partials/admin_contacts'
.row
.col-md-12= render 'admin/domains/partials/nameservers'

View file

@ -176,3 +176,8 @@ en:
hostname: 'Hostname' hostname: 'Hostname'
ipv4: 'IPv4' ipv4: 'IPv4'
ipv6: 'IPv6' ipv6: 'IPv6'
statuses: 'Statuses'
description: 'Description'
delete: 'Delete'
are_you_sure: 'Are you sure?'
back: 'Back'