mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
community block MDL-25141 hub description is now format in FORMAT_PLAIN + xhtml strict code + remove BR tags
This commit is contained in:
parent
215d7cb84e
commit
2031735b1b
@ -138,41 +138,37 @@ class community_hub_search_form extends moodleform {
|
||||
//TODO: sort hubs by trusted/prioritize
|
||||
//Public hub list
|
||||
$options = array();
|
||||
$brtag = html_writer::empty_tag('br');
|
||||
$firsthub = false;
|
||||
foreach ($hubs as $hub) {
|
||||
if (key_exists('id', $hub)) {
|
||||
$params = array('hubid' => $hub['id'],
|
||||
'filetype' => HUB_HUBSCREENSHOT_FILE_TYPE);
|
||||
$imgurl = new moodle_url(HUB_HUBDIRECTORYURL .
|
||||
"/local/hubdirectory/webservice/download.php", $params);
|
||||
"/local/hubdirectory/webservice/download.php", $params);
|
||||
$ascreenshothtml = html_writer::empty_tag('img',
|
||||
array('src' => $imgurl, 'alt' => $hub['name']));
|
||||
array('src' => $imgurl, 'alt' => $hub['name']));
|
||||
|
||||
$hubdescription = ' ' . html_writer::tag('a', $hub['name'],
|
||||
array('class' => 'hublink', 'href' => $hub['url'],
|
||||
$hubdescription = html_writer::tag('a', $hub['name'],
|
||||
array('class' => 'hublink clearfix', 'href' => $hub['url'],
|
||||
'onclick' => 'this.target="_blank"'));
|
||||
$hubdescription .= $brtag;
|
||||
$hubdescription .= html_writer::tag('span', $ascreenshothtml,
|
||||
array('class' => 'hubscreenshot'));
|
||||
$hubdescription .= html_writer::tag('span', $hub['description'],
|
||||
array('class' => 'hubdescription'));
|
||||
$hubdescription .= $brtag;
|
||||
array('class' => 'hubscreenshot'));
|
||||
$hubdescription .= html_writer::tag('span', format_text($hub['description'], FORMAT_PLAIN),
|
||||
array('class' => 'hubdescription'));
|
||||
$additionaldesc = get_string('sites', 'block_community') . ': ' . $hub['sites'] . ' - ' .
|
||||
get_string('courses', 'block_community') . ': ' . $hub['courses'];
|
||||
$hubdescription .= html_writer::tag('span', $additionaldesc,
|
||||
array('class' => 'hubadditionaldesc'));
|
||||
$hubdescription .= $brtag;
|
||||
array('class' => 'hubadditionaldesc'));
|
||||
$hubtrusted = $hub['trusted'] ? get_string('hubtrusted', 'block_community') :
|
||||
get_string('hubnottrusted', 'block_community');
|
||||
$hubdescription .= html_writer::tag('span',
|
||||
$hub['trusted'] ? get_string('hubtrusted', 'block_community') :
|
||||
get_string('hubnottrusted', 'block_community'),
|
||||
$hubtrusted . ' ' . $OUTPUT->doc_link('trusted_hubs'),
|
||||
array('class' => $hub['trusted'] ? 'trusted' : 'nottrusted'));
|
||||
|
||||
$hubdescription = html_writer::tag('span',
|
||||
$hubdescription,
|
||||
array('class' => $hub['trusted'] ? 'hubtrusted' : 'hubnottrusted'));
|
||||
$hubdescription .= ' ' . $OUTPUT->doc_link('trusted_hubs');
|
||||
} else {
|
||||
$hubdescription = ' ';
|
||||
$hubdescription .= html_writer::tag('a', $hub['name'],
|
||||
array('class' => 'hublink', 'href' => $hub['url']));
|
||||
}
|
||||
|
@ -2,11 +2,19 @@
|
||||
|
||||
/* HUB SELECTOR */
|
||||
#page-blocks-community-communitycourse .hubscreenshot {float: left; }
|
||||
#page-blocks-community-communitycourse .hubdescription {color: #003333;font-size: 95%;}
|
||||
#page-blocks-community-communitycourse .hubadditionaldesc {color: #666666;font-size: 90%;}
|
||||
#page-blocks-community-communitycourse .hubdescription {
|
||||
color: #003333;
|
||||
font-size: 95%;
|
||||
display:block;
|
||||
}
|
||||
#page-blocks-community-communitycourse .hubadditionaldesc {
|
||||
color: #666666;
|
||||
font-size: 90%;
|
||||
display:block;
|
||||
}
|
||||
#page-blocks-community-communitycourse .hubscreenshot {margin-right: 10px;}
|
||||
#page-blocks-community-communitycourse .nottrusted {}
|
||||
#page-blocks-community-communitycourse .hubtrusted {}
|
||||
#page-blocks-community-communitycourse .hubtrusted {display:inline;}
|
||||
#page-blocks-community-communitycourse .hubnottrusted {}
|
||||
#page-blocks-community-communitycourse .trustedtr {background-color: #ffe1c3;}
|
||||
#page-blocks-community-communitycourse .prioritisetr {background-color: #ffd4ff;}
|
||||
@ -184,34 +192,34 @@
|
||||
}
|
||||
|
||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue {
|
||||
-moz-border-radius:12px 12px 12px 12px;
|
||||
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
||||
-webkit-border-radius:12px 12px 12px 12px;
|
||||
-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
||||
border-width:0 0 0 0;
|
||||
-moz-border-radius:12px 12px 12px 12px;
|
||||
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
||||
-webkit-border-radius:12px 12px 12px 12px;
|
||||
-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
||||
border-width:0 0 0 0;
|
||||
}
|
||||
|
||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-wrap {
|
||||
-moz-border-radius:12px 12px 0px 0px;
|
||||
-webkit-border-radius:12px 12px 0px 0px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #555555;
|
||||
-moz-border-radius:12px 12px 0px 0px;
|
||||
-webkit-border-radius:12px 12px 0px 0px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #555555;
|
||||
}
|
||||
|
||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-hd {
|
||||
-moz-border-radius:12px 12px 0 0;
|
||||
-webkit-border-radius:12px 12px 0 0;
|
||||
background-color:#F6F6F6;
|
||||
border:1px solid #CCCCCC;
|
||||
overflow: auto;
|
||||
-moz-border-radius:12px 12px 0 0;
|
||||
-webkit-border-radius:12px 12px 0 0;
|
||||
background-color:#F6F6F6;
|
||||
border:1px solid #CCCCCC;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-bd {
|
||||
padding:0px;
|
||||
margin-bottom: -5px;
|
||||
padding:0px;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
#page-blocks-community-communitycourse .moodle-dialogue-base .closebutton {
|
||||
margin-top:4px;
|
||||
width:30px;
|
||||
margin-top:4px;
|
||||
width:30px;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user