MDL-45379 badges: removed unnecessary tables from renderers

Signed-off-by: Yuliya <yuliya.bozhko@gmail.com>
Signed-off-by: Brian Barnes <brian.barnes@totaralms.com>
This commit is contained in:
Yuliya 2014-05-02 12:30:19 +12:00 committed by Yuliya Bozhko
parent 7a4832ecb9
commit cd243d94cd
4 changed files with 278 additions and 195 deletions

View File

@ -135,34 +135,24 @@ class core_badges_renderer extends plugin_renderer_base {
$display = "";
// Badge details.
$display .= html_writer::start_tag('fieldset', array('class' => 'generalbox'));
$display .= html_writer::tag('legend', get_string('badgedetails', 'badges'), array('class' => 'bold'));
$detailstable = new html_table();
$detailstable->attributes = array('class' => 'clearfix', 'id' => 'badgedetails');
$detailstable->data[] = array(get_string('name') . ":", $badge->name);
$detailstable->data[] = array(get_string('description', 'badges') . ":", $badge->description);
$detailstable->data[] = array(get_string('createdon', 'search') . ":", userdate($badge->timecreated));
$detailstable->data[] = array(get_string('badgeimage', 'badges') . ":",
print_badge_image($badge, $context, 'large'));
$display .= html_writer::table($detailstable);
$display .= html_writer::end_tag('fieldset');
$display .= $this->heading(get_string('badgedetails', 'badges'), 3);
$dl = array();
$dl[get_string('name')] = $badge->name;
$dl[get_string('description', 'badges')] = $badge->description;
$dl[get_string('createdon', 'search')] = $badge->timecreated;
$dl[get_string('badgeimage', 'badges')] = print_badge_image($badge, $context, 'large');
$display .= $this->definition_list($dl);
// Issuer details.
$display .= html_writer::start_tag('fieldset', array('class' => 'generalbox'));
$display .= html_writer::tag('legend', get_string('issuerdetails', 'badges'), array('class' => 'bold'));
$issuertable = new html_table();
$issuertable->attributes = array('class' => 'clearfix', 'id' => 'badgeissuer');
$issuertable->data[] = array(get_string('issuername', 'badges') . ":", $badge->issuername);
$issuertable->data[] = array(get_string('contact', 'badges') . ":",
html_writer::tag('a', $badge->issuercontact, array('href' => 'mailto:' . $badge->issuercontact)));
$display .= html_writer::table($issuertable);
$display .= html_writer::end_tag('fieldset');
$display .= $this->heading(get_string('issuerdetails', 'badges'), 3);
$dl = array();
$dl[get_string('issuername', 'badges')] = $badge->issuername;
$dl[get_string('contact', 'badges')] = html_writer::tag('a', $badge->issuercontact, array('href' => 'mailto:' . $badge->issuercontact));
$display .= $this->definition_list($dl);
// Issuance details if any.
$display .= html_writer::start_tag('fieldset', array('class' => 'generalbox'));
$display .= html_writer::tag('legend', get_string('issuancedetails', 'badges'), array('class' => 'bold'));
$display .= $this->heading(get_string('issuancedetails', 'badges'), 3);
if ($badge->can_expire()) {
if ($badge->expiredate) {
$display .= get_string('expiredate', 'badges', userdate($badge->expiredate));
@ -180,11 +170,9 @@ class core_badges_renderer extends plugin_renderer_base {
} else {
$display .= get_string('noexpiry', 'badges');
}
$display .= html_writer::end_tag('fieldset');
// Criteria details if any.
$display .= html_writer::start_tag('fieldset', array('class' => 'generalbox'));
$display .= html_writer::tag('legend', get_string('bcriteria', 'badges'), array('class' => 'bold'));
$display .= $this->heading(get_string('bcriteria', 'badges'), 3);
if ($badge->has_criteria()) {
$display .= self::print_badge_criteria($badge);
} else {
@ -195,12 +183,10 @@ class core_badges_renderer extends plugin_renderer_base {
get_string('addcriteria', 'badges'), 'POST', array('class' => 'activatebadge'));
}
}
$display .= html_writer::end_tag('fieldset');
// Awards details if any.
if (has_capability('moodle/badges:viewawarded', $context)) {
$display .= html_writer::start_tag('fieldset', array('class' => 'generalbox'));
$display .= html_writer::tag('legend', get_string('awards', 'badges'), array('class' => 'bold'));
$display .= $this->heading(get_string('awards', 'badges'), 3);
if ($badge->has_awards()) {
$url = new moodle_url('/badges/recipients.php', array('id' => $badge->id));
$a = new stdClass();
@ -218,10 +204,9 @@ class core_badges_renderer extends plugin_renderer_base {
new moodle_url('/badges/award.php', array('id' => $badge->id)),
get_string('award', 'badges'), 'POST', array('class' => 'activatebadge'));
}
$display .= html_writer::end_tag('fieldset');
}
return $display;
return html_writer::div($display, null, array('id' => 'badge-overview'));
}
// Prints action icons for the badge.
@ -285,19 +270,24 @@ class core_badges_renderer extends plugin_renderer_base {
$badgeclass = $ibadge->badgeclass;
$badge = new badge($ibadge->badgeid);
$now = time();
$expiration = isset($issued['expires']) ? $issued['expires'] : $now + 86400;
$table = new html_table();
$table->id = 'issued-badge-table';
$output = '';
$output .= html_writer::start_tag('div', array('id' => 'badge'));
$output .= html_writer::start_tag('div', array('id' => 'badge-image'));
$output .= html_writer::empty_tag('img', array('src' => $badgeclass['image'], 'alt' => $badge->name));
if ($expiration < $now) {
$output .= $this->output->pix_icon('i/expired',
get_string('expireddate', 'badges', userdate($issued['expires'])),
'moodle',
array('class' => 'expireimage'));
}
$imagetable = new html_table();
$imagetable->attributes = array('class' => 'clearfix badgeissuedimage');
$imagetable->data[] = array(html_writer::empty_tag('img', array('src' => $badgeclass['image'])));
if ($USER->id == $userinfo->id && !empty($CFG->enablebadges)) {
$imagetable->data[] = array($this->output->single_button(
$output .= $this->output->single_button(
new moodle_url('/badges/badge.php', array('hash' => $issued['uid'], 'bake' => true)),
get_string('download'),
'POST'));
$expiration = isset($issued['expires']) ? $issued['expires'] : $now + 86400;
'POST');
if (!empty($CFG->badges_allowexternalbackpack) && ($expiration > $now) && badges_user_has_backpack($USER->id)) {
$assertion = new moodle_url('/badges/assertion.php', array('b' => $issued['uid']));
$action = new component_action('click', 'addtobackpack', array('assertion' => $assertion->out(false)));
@ -307,57 +297,55 @@ class core_badges_renderer extends plugin_renderer_base {
'value' => get_string('addtobackpack', 'badges'));
$tobackpack = html_writer::tag('input', '', $attributes);
$this->output->add_action_handler($action, 'addbutton');
$imagetable->data[] = array($tobackpack);
$output .= $tobackpack;
}
}
$datatable = new html_table();
$datatable->attributes = array('class' => 'badgeissuedinfo');
$datatable->colclasses = array('bfield', 'bvalue');
$output .= html_writer::end_tag('div');
$output .= html_writer::start_tag('div', array('id' => 'badge-details'));
// Recipient information.
$datatable->data[] = array($this->output->heading(get_string('recipientdetails', 'badges'), 3), '');
$output .= $this->output->heading(get_string('recipientdetails', 'badges'), 3);
$dl = array();
if ($userinfo->deleted) {
$strdata = new stdClass();
$strdata->user = fullname($userinfo);
$strdata->site = format_string($SITE->fullname, true, array('context' => context_system::instance()));
$datatable->data[] = array(get_string('name'), get_string('error:userdeleted', 'badges', $strdata));
} else {
$datatable->data[] = array(get_string('name'), fullname($userinfo));
}
$datatable->data[] = array($this->output->heading(get_string('issuerdetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('issuername', 'badges'), $badge->issuername);
if (isset($badge->issuercontact) && !empty($badge->issuercontact)) {
$datatable->data[] = array(get_string('contact', 'badges'), obfuscate_mailto($badge->issuercontact));
$dl[get_string('name')] = get_string('error:userdeleted', 'badges', $strdata);
} else {
$dl[get_string('name')] = fullname($userinfo);
}
$datatable->data[] = array($this->output->heading(get_string('badgedetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('name'), $badge->name);
$datatable->data[] = array(get_string('description', 'badges'), $badge->description);
$output .= $this->definition_list($dl);
$output .= $this->output->heading(get_string('issuerdetails', 'badges'), 3);
$dl = array();
$dl[get_string('issuername', 'badges')] = $badge->issuername;
if (isset($badge->issuercontact) && !empty($badge->issuercontact)) {
$dl[get_string('contact', 'badges')] = obfuscate_mailto($badge->issuercontact);
}
$output .= $this->definition_list($dl);
$output .= $this->output->heading(get_string('badgedetails', 'badges'), 3);
$dl = array();
$dl[get_string('name')] = $badge->name;
$dl[get_string('description', 'badges')] = $badge->description;
if ($badge->type == BADGE_TYPE_COURSE && isset($badge->courseid)) {
$coursename = $DB->get_field('course', 'fullname', array('id' => $badge->courseid));
$datatable->data[] = array(get_string('course'), $coursename);
$dl[get_string('course')] = $coursename;
}
$dl[get_string('bcriteria', 'badges')] = self::print_badge_criteria($badge);
$output .= $this->definition_list($dl);
$datatable->data[] = array(get_string('bcriteria', 'badges'), self::print_badge_criteria($badge));
$datatable->data[] = array($this->output->heading(get_string('issuancedetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('dateawarded', 'badges'), userdate($issued['issuedOn']));
$output .= $this->output->heading(get_string('issuancedetails', 'badges'), 3);
$dl = array();
$dl[get_string('dateawarded', 'badges')] = userdate($issued['issuedOn']);
if (isset($issued['expires'])) {
if ($issued['expires'] < $now) {
$cell = new html_table_cell(userdate($issued['expires']) . get_string('warnexpired', 'badges'));
$cell->attributes = array('class' => 'notifyproblem warning');
$datatable->data[] = array(get_string('expirydate', 'badges'), $cell);
$dl[get_string('expirydate', 'badges')] = userdate($issued['expires']) . get_string('warnexpired', 'badges');
$image = html_writer::start_tag('div', array('class' => 'badge'));
$image .= html_writer::empty_tag('img', array('src' => $badgeclass['image']));
$image .= $this->output->pix_icon('i/expired',
get_string('expireddate', 'badges', userdate($issued['expires'])),
'moodle',
array('class' => 'expireimage'));
$image .= html_writer::end_tag('div');
$imagetable->data[0] = array($image);
} else {
$datatable->data[] = array(get_string('expirydate', 'badges'), userdate($issued['expires']));
$dl[get_string('expirydate', 'badges')] = userdate($issued['expires']);
}
}
@ -379,14 +367,11 @@ class core_badges_renderer extends plugin_renderer_base {
}
}
$datatable->data[] = array(get_string('evidence', 'badges'),
get_string('completioninfo', 'badges') .
html_writer::alist($items, array(), 'ul'));
$table->attributes = array('class' => 'generalbox boxaligncenter issuedbadgebox');
$table->data[] = array(html_writer::table($imagetable), html_writer::table($datatable));
$htmlbadge = html_writer::table($table);
$dl[get_string('evidence', 'badges')] = get_string('completioninfo', 'badges') . html_writer::alist($items, array(), 'ul');
$output .= $this->definition_list($dl);
$output .= html_writer::end_tag('div');
return $htmlbadge;
return $output;
}
// Outputs external badge.
@ -396,80 +381,81 @@ class core_badges_renderer extends plugin_renderer_base {
$issuer = $assertion->badge->issuer;
$userinfo = $ibadge->recipient;
$table = new html_table();
$today_date = date('Y-m-d');
$today = strtotime($today_date);
$expiration = isset($assertion->badge->expire) ? strtotime($assertion->badge->expire) : $today + 86400;
$imagetable = new html_table();
$imagetable->attributes = array('class' => 'clearfix badgeissuedimage');
$imagetable->data[] = array(html_writer::empty_tag('img', array('src' => $issued->imageUrl, 'width' => '100px')));
$output = '';
$output .= html_writer::start_tag('div', array('id' => 'badge'));
$output .= html_writer::start_tag('div', array('id' => 'badge-image'));
if ($expiration < $today) {
$output .= $this->output->pix_icon('i/expired',
get_string('expireddate', 'badges', $assertion->badge->expire),
'moodle',
array('class' => 'expireimage'));
} else {
$output .= html_writer::empty_tag('img', array('src' => $issued->imageUrl));
}
$output .= html_writer::end_tag('div');
$datatable = new html_table();
$datatable->attributes = array('class' => 'badgeissuedinfo');
$datatable->colclasses = array('bfield', 'bvalue');
$output .= html_writer::start_tag('div', array('id' => 'badge-details'));
// Recipient information.
$datatable->data[] = array($this->output->heading(get_string('recipientdetails', 'badges'), 3), '');
$output .= $this->output->heading(get_string('recipientdetails', 'badges'), 3);
$dl = array();
// Technically, we should alway have a user at this point, but added an extra check just in case.
if ($userinfo) {
$notify = '';
if (!$ibadge->valid) {
$notify = $this->output->notification(get_string('recipientvalidationproblem', 'badges'), 'notifynotice');
$dl[get_string('name')] = fullname($userinfo) . $notify;
} else {
$dl[get_string('name')] = fullname($userinfo);
}
$datatable->data[] = array(get_string('name'), fullname($userinfo). $notify);
} else {
$notify = $this->output->notification(get_string('recipientidentificationproblem', 'badges'), 'notifynotice');
$datatable->data[] = array(get_string('name'), $notify);
$dl[get_string('name')] = $notify;
}
$output .= $this->definition_list($dl);
$output .= $this->output->heading(get_string('issuerdetails', 'badges'), 3);
$dl = array();
$dl[get_string('issuername', 'badges')] = $issuer->name;
$dl[get_string('issuerurl', 'badges')] = html_writer::tag('a', $issuer->origin, array('href' => $issuer->origin));
$datatable->data[] = array($this->output->heading(get_string('issuerdetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('issuername', 'badges'), $issuer->name);
$datatable->data[] = array(get_string('issuerurl', 'badges'),
html_writer::tag('a', $issuer->origin, array('href' => $issuer->origin)));
if (isset($issuer->contact)) {
$datatable->data[] = array(get_string('contact', 'badges'), obfuscate_mailto($issuer->contact));
$dl[get_string('contact', 'badges')] = obfuscate_mailto($issuer->contact);
}
$datatable->data[] = array($this->output->heading(get_string('badgedetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('name'), $assertion->badge->name);
$datatable->data[] = array(get_string('description', 'badges'), $assertion->badge->description);
$datatable->data[] = array(get_string('bcriteria', 'badges'),
html_writer::tag('a', $assertion->badge->criteria, array('href' => $assertion->badge->criteria)));
$datatable->data[] = array($this->output->heading(get_string('issuancedetails', 'badges'), 3), '');
$output .= $this->definition_list($dl);
$output .= $this->output->heading(get_string('badgedetails', 'badges'), 3);
$dl = array();
$dl[get_string('name')] = $assertion->badge->name;
$dl[get_string('description', 'badges')] = $assertion->badge->description;
$dl[get_string('bcriteria', 'badges')] = html_writer::tag('a', $assertion->badge->criteria, array('href' => $assertion->badge->criteria));
$output .= $this->definition_list($dl);
$output .= $this->output->heading(get_string('issuancedetails', 'badges'), 3);
$dl = array();
if (isset($assertion->issued_on)) {
$datatable->data[] = array(get_string('dateawarded', 'badges'), $assertion->issued_on);
$dl[get_string('dateawarded', 'badges')] = $assertion->issued_on;
}
if (isset($assertion->badge->expire)) {
$today_date = date('Y-m-d');
$today = strtotime($today_date);
$expiration = strtotime($assertion->badge->expire);
if ($expiration < $today) {
$cell = new html_table_cell($assertion->badge->expire . get_string('warnexpired', 'badges'));
$cell->attributes = array('class' => 'notifyproblem warning');
$datatable->data[] = array(get_string('expirydate', 'badges'), $cell);
$image = html_writer::start_tag('div', array('class' => 'badge'));
$image .= html_writer::empty_tag('img', array('src' => $issued['badge']['image']));
$image .= html_writer::start_tag('span', array('class' => 'expired'))
. $this->output->pix_icon('i/expired',
get_string('expireddate', 'badges', $assertion->badge->expire),
'moodle',
array('class' => 'expireimage'))
. html_writer::end_tag('span');
$image .= html_writer::end_tag('div');
$imagetable->data[0] = array($image);
$dl[get_string('expirydate', 'badges')] = $assertion->badge->expire . get_string('warnexpired', 'badges');
} else {
$datatable->data[] = array(get_string('expirydate', 'badges'), $assertion->badge->expire);
$dl[get_string('expirydate', 'badges')] = $assertion->badge->expire;
}
}
if (isset($assertion->evidence)) {
$datatable->data[] = array(get_string('evidence', 'badges'),
html_writer::tag('a', $assertion->evidence, array('href' => $assertion->evidence)));
$dl[get_string('evidence', 'badges')] = html_writer::tag('a', $assertion->evidence, array('href' => $assertion->evidence));
}
$table->attributes = array('class' => 'generalbox boxaligncenter issuedbadgebox');
$table->data[] = array(html_writer::table($imagetable), html_writer::table($datatable));
$htmlbadge = html_writer::table($table);
$output .= $this->definition_list($dl);
$output .= html_writer::end_tag('div');
return $htmlbadge;
return $output;
}
// Outputs table of user badges.
// Displays the user badges.
protected function render_badge_user_collection(badge_user_collection $badges) {
global $CFG, $USER, $SITE;
$backpack = $badges->backpack;
@ -496,10 +482,8 @@ class core_badges_renderer extends plugin_renderer_base {
$heading = get_string('localbadges', 'badges', format_string($SITE->fullname, true, array('context' => context_system::instance())));
$localhtml .= html_writer::tag('legend', $this->output->heading_with_help($heading, 'localbadgesh', 'badges'));
if ($badges->badges) {
$table = new html_table();
$table->attributes['class'] = 'statustable';
$table->data[] = array($this->output->heading(get_string('badgesearned', 'badges', $badges->totalcount), 4, 'activatebadge'), $downloadall);
$downloadbutton = html_writer::table($table);
$downloadbutton = $this->output->heading(get_string('badgesearned', 'badges', $badges->totalcount), 4, 'activatebadge');
$downloadbutton .= $downloadall;
$htmllist = $this->print_badges_list($badges->badges, $USER->id);
$localhtml .= $backpackconnect . $downloadbutton . $searchform . $htmlpagingbar . $htmllist . $htmlpagingbar;
@ -534,7 +518,7 @@ class core_badges_renderer extends plugin_renderer_base {
return $localhtml . $externalhtml;
}
// Outputs table of available badges.
// Displays the available badges.
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);
@ -681,8 +665,6 @@ class core_badges_renderer extends plugin_renderer_base {
*/
public function print_badge_status_box(badge $badge) {
if (has_capability('moodle/badges:configurecriteria', $badge->get_context())) {
$table = new html_table();
$table->attributes['class'] = 'boxaligncenter statustable';
if (!$badge->has_criteria()) {
$criteriaurl = new moodle_url('/badges/criteria.php', array('id' => $badge->id));
@ -694,7 +676,8 @@ class core_badges_renderer extends plugin_renderer_base {
} else {
$action = '';
}
$row = array($status, $action);
$message = $status . $action;
} else {
$status = get_string('statusmessage_' . $badge->status, 'badges');
if ($badge->is_active()) {
@ -708,12 +691,13 @@ class core_badges_renderer extends plugin_renderer_base {
'return' => $this->page->url->out_as_local_url(false))),
get_string('activate', 'badges'), 'POST', array('class' => 'activatebadge'));
}
$row = array($status . $this->output->help_icon('status', 'badges'), $action);
$message = $status . $this->output->help_icon('status', 'badges') . $action;
}
$table->data[] = $row;
$style = $badge->is_active() ? 'generalbox statusbox active' : 'generalbox statusbox inactive';
return $this->output->box(html_writer::table($table), $style);
return $this->output->box($message, $style);
}
return null;
@ -898,6 +882,22 @@ class core_badges_renderer extends plugin_renderer_base {
return $out;
}
/**
* Renders a definition list
*
* @param array $items the list of items to define
* @param array
*/
protected function definition_list(array $items, array $attributes = array()) {
$output = html_writer::start_tag('dl', $attributes);
foreach ($items as $label => $value) {
$output .= html_writer::tag('dt', $label);
$output .= html_writer::tag('dd', $value);
}
$output .= html_writer::end_tag('dl');
return $output;
}
}
/**
@ -970,9 +970,10 @@ class external_badge implements renderable {
global $DB;
// At this point a user has connected a backpack. So, we are going to get
// their backpack email rather than their account email.
$user = $DB->get_record_sql('SELECT u.lastname, u.firstname, b.email
$namefields = get_all_user_name_fields(true, 'u');
$user = $DB->get_record_sql("SELECT {$namefields}, b.email
FROM {user} u INNER JOIN {badge_backpack} b ON u.id = b.userid
WHERE userid = :userid', array('userid' => $recipient), IGNORE_MISSING);
WHERE userid = :userid", array('userid' => $recipient), IGNORE_MISSING);
$this->issued = $badge;
$this->recipient = $user;

View File

@ -1625,6 +1625,50 @@ body.jsenabled .formlisting {
/**
* Badges styles
*/
#badge-overview h3,
#badge h3 {
clear: both;
text-align: left;
padding-top: 10px;
}
.dir-rtl #badge h3 {
text-align: right;
}
#badge-image,
#badge-details {
display: inline-block;
}
#badge-image {
width: 200px;
vertical-align: top;
}
#badge-image .singlebutton {
padding-top: 5px;
}
#badge-overview dl,
#badge-details dl {
margin: 0;
}
#badge-overview dt,
#badge-details dt {
font-weight: bold;
clear: both;
float: left;
width: 20%;
}
#badge-overview dd,
#badge-details dd {
float: left;
width: 75%;
}
#badge-overview dd,
#badge-details dd,
#badge-overview dt,
#badge-details dt {
padding: 3px 0;
}
#page-badges-view .collection { width: 90%; margin: 1em auto; }
#page-badges-index .collection { width: 85%; margin: 1em auto; }
@ -1652,25 +1696,18 @@ table.collection .name { text-align: left; vertical-align: middle; }
a.criteria-action { padding: 0px 3px; float: right; }
.dir-rtl a.criteria-action { float: left; }
table.issuedbadgebox { width: 750px; background-color: white; }
table.badgeissuedimage { width: 150px; text-align: center; }
table.badgeissuedinfo { width: 600px; }
table.badgeissuedinfo .bvalue { text-align: left; vertical-align: middle; }
.dir-rtl table.badgeissuedinfo .bvalue { text-align: right; }
table.badgeissuedinfo .bfield { width: 125px; text-align: left; font-style: italic; }
.dir-rtl table.badgeissuedinfo .bfield { text-align: right; }
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-image { width: 100px; height: 100px; left: 10px; top: 0px; z-index: 1; }
.dir-rtl .badges li .badge-image { right: 10px; }
.badges li .badge-actions { position: relative; }
div.badge { position: relative; display: block; }
div.badge .expireimage { width: 100px; height: 100px; left: 20px; top: 0px; }
.expireimage { width: 90px; height: 90px; left: 30px; top: 0px; position: absolute; z-index:10; filter: alpha(opacity = 85); -moz-opacity: 0.85; -khtml-opacity: 0.85; opacity: 0.85;}
div.badge .expireimage { width: 100px; height: 100px; left: 0px; top: 0px; }
.expireimage { width: 100px; height: 100px; left: 25px; top: 0px; position: absolute; z-index:10; filter: alpha(opacity = 85); -moz-opacity: 0.85; -khtml-opacity: 0.85; opacity: 0.85;}
.badge-profile { vertical-align: top; }
.connected { color: #006600; }
@ -1683,11 +1720,21 @@ div.badge .expireimage { width: 100px; height: 100px; left: 20px; top: 0px; }
#page-badges-award .recipienttable tr td.existing,
#page-badges-award .recipienttable tr td.potential { width: 42%; }
.statustable { margin-bottom: 0px; }
.statusbox { border-color: #BBBBBB; }
#issued-badge-table .activatebadge {
display: inline-block;
}
#issued-badge-table div.activatebadge {
margin-left: 3px;
}
.statusbox { border-color: #BBBBBB; padding: 5px;text-align: center;}
.statusbox.active { background-color: #D9F991; }
.statusbox.inactive { background-color: #FFEBA8; }
.activatebadge { margin: 0px; text-align: left; vertical-align: middle; }
.statusbox .activatebadge {
display: inline-block;
}
.statusbox .activatebadge input[type=submit]{
margin: 3px;
}
.dir-rtl .activatebadge { text-align: right; }
.addcourse { float: right; }
.dir-rtl .addcourse { float: left; }

View File

@ -1856,32 +1856,6 @@ a.criteria-action {
padding: 0px 3px;
float: right;
}
table.issuedbadgebox {
width: 750px;
background-color: @wellBackground;
}
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;
}
.dir-rtl {
table.badgeissuedinfo .bvalue,
table.badgeissuedinfo .bfield {
text-align: right;
}
}
ul.badges {
margin: 0;
list-style: none;
@ -1902,8 +1876,8 @@ ul.badges {
position: absolute;
}
.badges li .badge-image {
width: 90px;
height: 90px;
width: 100px;
height: 100px;
left: 10px;
top: 0px;
z-index: 1;
@ -1911,24 +1885,74 @@ ul.badges {
.badges li .badge-actions {
position: relative;
}
div.badge {
position: relative;
display: block;
}
div.badge .expireimage {
.badges li .expireimage {
width: 100px;
height: 100px;
left: 20px;
top: 0px;
}
.expireimage {
.opacity(85);
width: 90px; height: 90px;
left: 30px;
left: 25px;
top: 0px;
position: absolute;
z-index:10;
z-index: 10;
opacity: 0.85;
}
#badge-image {
background-color: transparent;
padding: 0;
position: relative;
min-width: 100px;
width: 20%;
display: inline-block;
vertical-align: top;
margin-top: 17px;
.expireimage {
width: 100px;
height: 100px;
left: 0px;
top: 0px;
.opacity(85);
position: absolute;
z-index:10;
}
.singlebutton {
padding-top: 5px;
}
}
.dir-rtl #badge-image {
float: right;
.expireimage {
left: 41px;
}
}
#badge-details {
display: inline-block;
width: 79%;
}
#badge-overview dl,
#badge-details dl {
margin: 0;
dt,
dd {
vertical-align: top;
padding: 3px 0;
}
dt {
clear: both;
display: inline-block;
width: 20%;
min-width: 100px;
}
dd {
display: inline-block;
width: 79%;
margin-left: 1%;
}
}
.badge-profile {
vertical-align: top;
}
@ -1954,8 +1978,8 @@ div.badge .expireimage {
width: 42%;
}
.statustable {
margin-bottom: 0px;
#issued-badge-table .activatebadge {
display: inline-block;
}
.statusbox.active {
background-color: @successBackground;
@ -1963,6 +1987,17 @@ div.badge .expireimage {
.statusbox.inactive {
background-color: @warningBackground;
}
.statusbox {
text-align: center;
margin-bottom: 5px;
padding: 5px;
}
.statusbox .activatebadge {
display: inline-block;
}
.statusbox .activatebadge input[type=submit]{
margin: 3px;
}
.activatebadge {
margin: 0px;
text-align: left;

File diff suppressed because one or more lines are too long