Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-39162: Add badges CSS to bootstrap theme

  • Loading branch information...
commit f8ba185ac5156e2beb949d05cd578a0c42ec0665 1 parent 95190fd
@ybozhko ybozhko authored
View
4 badges/renderer.php
@@ -506,7 +506,7 @@ protected function render_badge_collection(badge_collection $badges) {
$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 @@ protected function render_badge_recipients(badge_recipients $recipients) {
$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
147 theme/bootstrapbase/less/moodle/core.less
@@ -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;
+}
View
2  theme/bootstrapbase/style/moodle.css
1 addition, 1 deletion not shown
Please sign in to comment.
Something went wrong with that request. Please try again.