Consistent, concise styling of datables

Add a semantic class to aggregate bootstrap classes and consistently
applyt them to all datatables.
This commit is contained in:
James Mason 2018-06-15 18:20:18 -07:00
parent 3bb73f27cf
commit 4ecf078db6
25 changed files with 47 additions and 25 deletions

View file

@ -0,0 +1,21 @@
table.datatable {
@extend .table, .table-striped, .table-bordered, .table-hover;
td.actions {
vertical-align: middle;
align: center;
div.btn-group {
display: flex;
}
a {
@extend .btn;
}
}
td.truncate {
max-width: 1px;
@include text-overflow();
}
}

View file

@ -61,3 +61,6 @@ $navbar-default-link-hover-color: #000000;
// Utility classes
@import "bootstrap/utilities";
@import "bootstrap/responsive-utilities";
// semantic classes
@import "osem-datatables";

View file

@ -54,7 +54,7 @@
= link_to "#{@conference.booth_limit} booths", edit_admin_conference_path(@conference.short_title)
)
- if @booths.any?
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th
%b ID

View file

@ -59,7 +59,7 @@
.row
.col-md-12
.margin-event-table
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th
%b ID

View file

@ -16,7 +16,7 @@
You have more registrations than the capacity of the room!
.well
%table.table.table-hover.table-borderd.table-striped.datatable#registrations
%table.datatable#registrations
%thead
%th
%th Name

View file

@ -18,7 +18,7 @@
= render 'proposal'
#history-content.tab-pane
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th ID
%th Description

View file

@ -1,7 +1,7 @@
.page-header
%h3 Users (#{users.length})
- if users.present?
%table.table.table-striped.table-bordered.table-hover.datatable#users
%table.datatable#users
%thead
%th Name
%th Email

View file

@ -9,7 +9,7 @@
Manage organizations in OSEM
.row
.col-md-12
%table.table.table-hover.datatable
%table.datatable
%thead
%th Name
%th Upcoming Conferences

View file

@ -16,7 +16,7 @@
- if @physical_tickets.any?
.row
.col-md-12
%table.table.table-hover.datatable#tickets
%table.datatable#tickets
%thead
%th ID
%th Type

View file

@ -11,7 +11,7 @@
.row
.col-md-12
%table.table.table-border.table-hover.datatable#question_users
%table.datatable#question_users
%thead
%th Name
%th Username

View file

@ -19,7 +19,7 @@
.row
.col-md-12
%div.margin-event-table
%table.table.table-hover.datatable#registrations
%table.datatable#registrations
%thead
%tr
%th ID#

View file

@ -8,7 +8,7 @@
All submissions and the information that they are missing
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th ID
%th Title

View file

@ -7,7 +7,7 @@
%p.text-muted
All submissions where the speakers have special requirements
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th ID
%th Title

View file

@ -7,7 +7,7 @@
%p.text-muted
All submissions that have no commercial
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th ID
%th Title

View file

@ -7,7 +7,7 @@
%p.text-muted
All event speakers who haven't checked in
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th Speaker Name
%th Registered?

View file

@ -7,7 +7,7 @@
- if @conference.resources.any?
.row
.col-md-12
%table.table.table-hover.datatable
%table.datatable
%thead
%th Name
%th Left( Left/Total )
@ -33,4 +33,3 @@
.row
.col-md-12
= link_to 'Add Resource', new_admin_conference_resource_path, class: 'btn btn-success pull-right', disabled: !(can? :create, Resource.new(conference_id: @conference_id))

View file

@ -1,7 +1,7 @@
.page-header
%h3 Users (#{users.length})
- if users.present?
%table.table.table-striped.table-bordered.table-hover.datatable#users
%table.datatable#users
%thead
- if ( can? :toggle_user, @role )
%th.col-md-1

View file

@ -8,7 +8,7 @@
- if @conference.tickets.any?
.row
.col-md-12
%table.table.table-hover.datatable#tickets
%table.datatable#tickets
%thead
%th Title
%th Price

View file

@ -12,7 +12,7 @@
People who bought this ticket
.row
.col-md-12
%table.table.table-hover.datatable
%table.datatable
%thead
%th #
%th Name
@ -35,4 +35,3 @@
= buyer.affiliation
%td
= @ticket.tickets_paid(buyer)

View file

@ -33,7 +33,7 @@
.row
.col-md-12
- if @tracks.any?
%table.table.table-hover.table-striped.table-bordered.datatable#tracks
%table.datatable#tracks
%thead
%th ID
%th Name

View file

@ -107,7 +107,7 @@
.tab-pane#events
.col-md-12
%table.table.table-hover.datatable
%table.datatable
%thead
%th Title
%th Type

View file

@ -5,7 +5,7 @@
.col-md-12
.well
%table.table.table-bordered.table-striped.table-hover.datatable#event_registrations
%table.datatable#event_registrations
%thead
%th ID
%th Conference

View file

@ -4,7 +4,7 @@
Submissions (#{@user.events.length}) for #{@user.name}
.col-md-12
.well
%table.table.table-bordered.table-striped.table-hover.datatable#submissions
%table.datatable#submissions
%thead
%th ID
%th Conference

View file

@ -10,7 +10,7 @@
= link_to 'Add User', new_admin_user_path, :class => 'button btn btn-default btn-info'
.row
.col-md-12.table-responsive
%table.table.table-striped.table-bordered.table-hover.datatable
%table.datatable
%thead
%th ID
%th Confirmed?

View file

@ -13,7 +13,7 @@
= @event.title
.well
%table.table.table-hover.table-borderd.table-striped.datatable#registrations
%table.datatable#registrations
%thead
%th
%th Name