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
|
//TODO: sort hubs by trusted/prioritize
|
||||||
//Public hub list
|
//Public hub list
|
||||||
$options = array();
|
$options = array();
|
||||||
$brtag = html_writer::empty_tag('br');
|
|
||||||
$firsthub = false;
|
$firsthub = false;
|
||||||
foreach ($hubs as $hub) {
|
foreach ($hubs as $hub) {
|
||||||
if (key_exists('id', $hub)) {
|
if (key_exists('id', $hub)) {
|
||||||
$params = array('hubid' => $hub['id'],
|
$params = array('hubid' => $hub['id'],
|
||||||
'filetype' => HUB_HUBSCREENSHOT_FILE_TYPE);
|
'filetype' => HUB_HUBSCREENSHOT_FILE_TYPE);
|
||||||
$imgurl = new moodle_url(HUB_HUBDIRECTORYURL .
|
$imgurl = new moodle_url(HUB_HUBDIRECTORYURL .
|
||||||
"/local/hubdirectory/webservice/download.php", $params);
|
"/local/hubdirectory/webservice/download.php", $params);
|
||||||
$ascreenshothtml = html_writer::empty_tag('img',
|
$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'],
|
$hubdescription = html_writer::tag('a', $hub['name'],
|
||||||
array('class' => 'hublink', 'href' => $hub['url'],
|
array('class' => 'hublink clearfix', 'href' => $hub['url'],
|
||||||
'onclick' => 'this.target="_blank"'));
|
'onclick' => 'this.target="_blank"'));
|
||||||
$hubdescription .= $brtag;
|
|
||||||
$hubdescription .= html_writer::tag('span', $ascreenshothtml,
|
$hubdescription .= html_writer::tag('span', $ascreenshothtml,
|
||||||
array('class' => 'hubscreenshot'));
|
array('class' => 'hubscreenshot'));
|
||||||
$hubdescription .= html_writer::tag('span', $hub['description'],
|
$hubdescription .= html_writer::tag('span', format_text($hub['description'], FORMAT_PLAIN),
|
||||||
array('class' => 'hubdescription'));
|
array('class' => 'hubdescription'));
|
||||||
$hubdescription .= $brtag;
|
|
||||||
$additionaldesc = get_string('sites', 'block_community') . ': ' . $hub['sites'] . ' - ' .
|
$additionaldesc = get_string('sites', 'block_community') . ': ' . $hub['sites'] . ' - ' .
|
||||||
get_string('courses', 'block_community') . ': ' . $hub['courses'];
|
get_string('courses', 'block_community') . ': ' . $hub['courses'];
|
||||||
$hubdescription .= html_writer::tag('span', $additionaldesc,
|
$hubdescription .= html_writer::tag('span', $additionaldesc,
|
||||||
array('class' => 'hubadditionaldesc'));
|
array('class' => 'hubadditionaldesc'));
|
||||||
$hubdescription .= $brtag;
|
$hubtrusted = $hub['trusted'] ? get_string('hubtrusted', 'block_community') :
|
||||||
|
get_string('hubnottrusted', 'block_community');
|
||||||
$hubdescription .= html_writer::tag('span',
|
$hubdescription .= html_writer::tag('span',
|
||||||
$hub['trusted'] ? get_string('hubtrusted', 'block_community') :
|
$hubtrusted . ' ' . $OUTPUT->doc_link('trusted_hubs'),
|
||||||
get_string('hubnottrusted', 'block_community'),
|
|
||||||
array('class' => $hub['trusted'] ? 'trusted' : 'nottrusted'));
|
array('class' => $hub['trusted'] ? 'trusted' : 'nottrusted'));
|
||||||
|
|
||||||
$hubdescription = html_writer::tag('span',
|
$hubdescription = html_writer::tag('span',
|
||||||
$hubdescription,
|
$hubdescription,
|
||||||
array('class' => $hub['trusted'] ? 'hubtrusted' : 'hubnottrusted'));
|
array('class' => $hub['trusted'] ? 'hubtrusted' : 'hubnottrusted'));
|
||||||
$hubdescription .= ' ' . $OUTPUT->doc_link('trusted_hubs');
|
|
||||||
} else {
|
} else {
|
||||||
$hubdescription = ' ';
|
|
||||||
$hubdescription .= html_writer::tag('a', $hub['name'],
|
$hubdescription .= html_writer::tag('a', $hub['name'],
|
||||||
array('class' => 'hublink', 'href' => $hub['url']));
|
array('class' => 'hublink', 'href' => $hub['url']));
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,19 @@
|
|||||||
|
|
||||||
/* HUB SELECTOR */
|
/* HUB SELECTOR */
|
||||||
#page-blocks-community-communitycourse .hubscreenshot {float: left; }
|
#page-blocks-community-communitycourse .hubscreenshot {float: left; }
|
||||||
#page-blocks-community-communitycourse .hubdescription {color: #003333;font-size: 95%;}
|
#page-blocks-community-communitycourse .hubdescription {
|
||||||
#page-blocks-community-communitycourse .hubadditionaldesc {color: #666666;font-size: 90%;}
|
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 .hubscreenshot {margin-right: 10px;}
|
||||||
#page-blocks-community-communitycourse .nottrusted {}
|
#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 .hubnottrusted {}
|
||||||
#page-blocks-community-communitycourse .trustedtr {background-color: #ffe1c3;}
|
#page-blocks-community-communitycourse .trustedtr {background-color: #ffe1c3;}
|
||||||
#page-blocks-community-communitycourse .prioritisetr {background-color: #ffd4ff;}
|
#page-blocks-community-communitycourse .prioritisetr {background-color: #ffd4ff;}
|
||||||
@ -184,34 +192,34 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue {
|
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue {
|
||||||
-moz-border-radius:12px 12px 12px 12px;
|
-moz-border-radius:12px 12px 12px 12px;
|
||||||
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
||||||
-webkit-border-radius:12px 12px 12px 12px;
|
-webkit-border-radius:12px 12px 12px 12px;
|
||||||
-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.6);
|
||||||
border-width:0 0 0 0;
|
border-width:0 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-wrap {
|
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-wrap {
|
||||||
-moz-border-radius:12px 12px 0px 0px;
|
-moz-border-radius:12px 12px 0px 0px;
|
||||||
-webkit-border-radius:12px 12px 0px 0px;
|
-webkit-border-radius:12px 12px 0px 0px;
|
||||||
background-color:#FFFFFF;
|
background-color:#FFFFFF;
|
||||||
border:1px solid #555555;
|
border:1px solid #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-hd {
|
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-hd {
|
||||||
-moz-border-radius:12px 12px 0 0;
|
-moz-border-radius:12px 12px 0 0;
|
||||||
-webkit-border-radius:12px 12px 0 0;
|
-webkit-border-radius:12px 12px 0 0;
|
||||||
background-color:#F6F6F6;
|
background-color:#F6F6F6;
|
||||||
border:1px solid #CCCCCC;
|
border:1px solid #CCCCCC;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-bd {
|
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-bd {
|
||||||
padding:0px;
|
padding:0px;
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-blocks-community-communitycourse .moodle-dialogue-base .closebutton {
|
#page-blocks-community-communitycourse .moodle-dialogue-base .closebutton {
|
||||||
margin-top:4px;
|
margin-top:4px;
|
||||||
width:30px;
|
width:30px;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user