Start making some helpers for redundant visual elements (widgets)

This commit is contained in:
James Mason 2018-03-20 11:19:17 -07:00
parent 780eb5c51d
commit 8b414e096c
No known key found for this signature in database
GPG key ID: 1B3951886C449023
5 changed files with 54 additions and 94 deletions

View file

@ -6,56 +6,16 @@
%hr
.row
.col-sm-3.col-xs-3
.dashbox.text-center
%span.fa.fa-user.fa-lg
%span.fa.fa-lg
= @total_reg
%p
%small
#{'Registration'.pluralize(@total_reg)}
- if @new_reg
%span.label.label-success{ title: "+#{@new_reg} since you last logged in!" }
+
= @new_reg
= big_statistic('user', 'Registration', @total_reg, @new_reg)
.col-sm-3.col-xs-3
.dashbox.text-center
%span.fa.fa-check-square.fa-lg
%span.fa.fa-lg
= @total_submissions
%p
%small
#{'Submission'.pluralize(@total_submissions)}
- if @new_submissions
%span.label.label-success{ title: "+#{@new_submissions} since you last logged in!" }
+
= @new_submissions
= big_statistic('check-square', 'Submission', @total_submissions, @new_submissions)
.col-sm-3.col-xs-3
.dashbox.text-center
%span.fa.fa-file-text.fa-lg
%span.fa.fa-lg
= @program_length
%p
%small
#{'Hour'.pluralize(@program_length)}
- if @new_reg
%span.label.label-success{ title: "+#{@new_program_length} since you last logged in!" }
+
= @new_program_length
= big_statistic('file-text', 'Hour', @program_length, @new_program_length)
.col-sm-3.col-xs-3
.dashbox.text-center
%span.fa.fa-archive.fa-lg
%span.fa.fa-lg
= @total_withdrawn
%p
%small
#{'Withdrawn'.pluralize(@total_withdrawn)}
- if @new_withdrawn
%span.label.label-success{ title: "+#{@new_withdrawn} since you last logged in!" }
+
= @new_withdrawn
= big_statistic('archive', 'Withdrawn', @total_withdrawn, @new_withdrawn, true)
.row
.col-md-12