MDL-39162: Add badges CSS to bootstrap theme

This commit is contained in:
Yuliya Bozhko 2013-05-06 16:20:02 +12:00
parent 95190fda69
commit f8ba185ac5
3 changed files with 150 additions and 3 deletions

View File

@ -506,7 +506,7 @@ class core_badges_renderer extends plugin_renderer_base {
$paging = new paging_bar($badges->totalcount, $badges->page, $badges->perpage, $this->page->url, 'page');
$htmlpagingbar = $this->render($paging);
$table = new html_table();
$table->attributes['class'] = 'collection boxaligncenter boxwidthwide';
$table->attributes['class'] = 'collection';
$sortbyname = $this->helper_sortable_heading(get_string('name'),
'name', $badges->sort, $badges->dir);
@ -740,7 +740,7 @@ class core_badges_renderer extends plugin_renderer_base {
$paging = new paging_bar($recipients->totalcount, $recipients->page, $recipients->perpage, $this->page->url, 'page');
$htmlpagingbar = $this->render($paging);
$table = new html_table();
$table->attributes['class'] = 'generaltable generalbox boxaligncenter boxwidthwide';
$table->attributes['class'] = 'generaltable boxaligncenter boxwidthwide';
$sortbyfirstname = $this->helper_sortable_heading(get_string('firstname'),
'firstname', $recipients->sort, $recipients->dir);

View File

@ -1702,3 +1702,150 @@ body.jsenabled .formlistingradio {
body.jsenabled .formlisting {
display: block;
}
/* Badges styles */
table.collection {
.table;
.table-bordered;
.table-striped;
}
table.collection .name {
text-align: left;
vertical-align: middle;
}
table.collection .awards {
width: 10%;
text-align: center;
vertical-align: middle;
}
table.collection .criteria {
width: 40%;
text-align: left;
vertical-align: top;
}
table.collection .badgeimage,
table.collection .status {
width: 15%;
text-align: center;
vertical-align: middle;
}
table.collection .description {
width: 25%;
text-align: left;
}
table.collection .actions {
width: 11em;
text-align: center;
vertical-align: middle;
}
a.criteria-action {
padding: 0px 3px;
float: right;
}
table.issuedbadgebox {
width: 750px;
background-color: #FFFFFF;
}
table.badgeissuedimage {
width: 150px;
text-align: center;
}
table.badgeissuedinfo {
width: 600px;
}
table.badgeissuedinfo .bvalue {
text-align: left;
vertical-align: middle;
}
table.badgeissuedinfo .bfield {
width: 125px;
text-align: left;
font-style: italic;
}
ul.badges {
margin: 0;
list-style: none;
}
.badges li {
position: relative;
display: inline-block;
padding-bottom: 2em;
text-align: center;
vertical-align: top;
width: 150px;
}
.badges li .badge-name {
display: block;
padding: 5px;
}
.badges li > img {
position: absolute;
}
.badges li .badge-image {
width: 90px;
height: 90px;
left: 10px;
top: 0px;
z-index: 1;
}
.badges li .badge-actions {
position: relative;
}
div.badge {
position: relative;
display: block;
}
div.badge .expireimage {
width: 100px;
height: 100px;
left: 20px;
top: 0px;
}
.expireimage {
.opacity(85);
width: 90px; height: 90px;
left: 30px;
top: 0px;
position: absolute;
z-index:10;
}
.badge-profile {
vertical-align: top;
}
.connected {
color: @successText;
}
.notconnected {
color: @errorText;
}
#page-badges-award .recipienttable tr td {
vertical-align: top;
}
#page-badges-award .recipienttable tr td.actions .actionbutton {
margin: 0.3em 0;
padding: 0.5em 0;
width: 100%;
}
#page-badges-award .recipienttable tr td.existing,
#page-badges-award .recipienttable tr td.potential {
width: 42%;
}
.statustable {
margin-bottom: 0px;
}
.statusbox.active {
background-color: @successBackground;
}
.statusbox.inactive {
background-color: @warningBackground;
}
.activatebadge {
margin: 0px;
text-align: left;
vertical-align: middle;
}
.addcourse {
float: right;
}

File diff suppressed because one or more lines are too long