Commit 0a9c9356 authored by Kristina Hoeppner's avatar Kristina Hoeppner Committed by Robert Lyon

Bug 1811904: Font Awesome icon adjustments

A few icons required adjusting to use only
free icons. Additionally, icons in the
card header in the "Primary School" theme
were changed or added in the first place.

Needed to update the card icons to use the correct font awesome family

behatnotneeded

Change-Id: Ief8f4b4393b1becfb18a8c39d3ef6b8966bbe9eb
parent 4148ee3b
......@@ -16,7 +16,7 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'legal');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
$userid = param_integer('userid', null);
$userid = param_integer('userid');
$versionid = param_integer('versionid', null);
$activetab = param_alpha('activetab', null);
......
......@@ -25,6 +25,10 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
return array('internal' => 26000);
}
public static function get_css_icon_type($blockname) {
return 'icon-regular';
}
public static function get_instance_config_javascript(BlockInstance $instance) {
return array('js/configform.js');
}
......
......@@ -510,7 +510,7 @@ $smarty = smarty(array(), array(), array(
'loseyourchanges',
),
));
setpageicon($smarty, 'icon-regular icon-id-card');
setpageicon($smarty, 'icon-regular icon-address-card');
$smarty->assign('profileform', $profileform);
$smarty->display('artefact:internal:index.tpl');
......
......@@ -119,7 +119,7 @@ class PluginArtefactInternal extends PluginArtefact {
'url' => 'artefact/internal/index.php',
'title' => get_string('profile', 'artefact.internal'),
'weight' => 10,
'iconclass' => 'regular icon-id-card',
'iconclass' => 'regular icon-address-card',
),
);
}
......
......@@ -35,6 +35,10 @@ class PluginBlocktypeCreativecommons extends MaharaCoreBlocktype {
return array('general' => 15000);
}
public static function get_css_icon_type($blockname) {
return 'icon-brand';
}
public static function render_instance(BlockInstance $instance, $editing=false, $versioning=false) {
global $THEME;
$configdata = $instance->get('configdata');
......
......@@ -53,6 +53,10 @@ class PluginBlocktypeExternalvideo extends MaharaCoreBlocktype {
return array('external' => 35000);
}
public static function get_css_icon_type($blockname) {
return 'icon-brand';
}
private static function load_media_sources() {
static $loaded_sources = array();
......
......@@ -28,6 +28,10 @@ class PluginBlocktypeGoogleApps extends MaharaCoreBlocktype {
return array('external' => 36000);
}
public static function get_css_icon_type($blockname) {
return 'icon-brand';
}
public static function get_blocktype_type_content_types() {
return array('googleapps' => array('media'));
}
......
......@@ -134,6 +134,10 @@ abstract class PluginBlocktype extends Plugin implements IPluginBlocktype {
return false;
}
public static function get_css_icon_type($blocktypename) {
return '';
}
public static function extra_xmldb_substitution($xml) {
return str_replace(
'<!-- PLUGINTYPE_INSTALLED_EXTRAFIELDS -->',
......@@ -379,6 +383,7 @@ abstract class PluginBlocktype extends Plugin implements IPluginBlocktype {
'artefactplugin' => $bt->artefactplugin,
'thumbnail_path' => get_config('wwwroot') . 'thumb.php?type=blocktype&bt=' . $bt->name . ((!empty($bt->artefactplugin)) ? '&ap=' . $bt->artefactplugin : ''),
'cssicon' => call_static_method($classname, 'get_css_icon', $bt->name),
'cssicontype' => call_static_method($classname, 'get_css_icon_type', $bt->name),
);
}
}
......@@ -1253,6 +1258,9 @@ class BlockInstance {
$smarty->assign('retractedonload', $configdata['retractedonload']);
}
}
$cssicontype = call_static_method($classname, 'get_css_icon_type', $this->blocktype);
$cardicontype = !empty($cssicontype) ? preg_replace('/^icon-/', 'card-', $cssicontype) : '';
$smarty->assign('cardicontype', $cardicontype);
$smarty->assign('versioning', $versioning);
return $smarty->fetch('view/blocktypecontainerviewing.tpl');
}
......
......@@ -94,229 +94,128 @@
}
}
// custom icons to some blocks
.bt-newviews .card-header:before {
content: $fa-var-bullhorn;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-inbox .card-header:before {
content: $fa-var-inbox;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-myviews .card-header:before {
content: $fa-var-file;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-filedownload .card-header:before {
content: $fa-var-download;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-folder .card-header:before {
content: $fa-var-folder;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-gallery .card-header:before {
content: $fa-var-file-image;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-internalmedia .card-header:before {
content: $fa-var-video;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-pdf .card-header:before {
content: $fa-var-file-pdf;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-html .card-header:before {
content: $fa-var-code;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-blog .card-header:before {
content: $fa-var-pen;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-blogpost .card-header:before {
content: $fa-var-file-alt;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-recentposts .card-header:before {
content: $fa-var-clock;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-taggedposts .card-header:before {
content: $fa-var-tags;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-comment .card-header:before {
content: $fa-var-comment;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-annotation .card-header:before {
content: $fa-var-pen-square;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-creativecommons .card-header:before {
content: $fa-var-creative-commons;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-navigation .card-header:before {
content: $fa-var-location-arrow;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-plans .card-header:before {
content: $fa-var-check-square;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-recentforumposts .card-header:before {
content: $fa-var-comments;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-textbox .card-header:before {
content: $fa-var-pen-square;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-profileinfo .card-header:before {
content: $fa-var-info;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-socialprofile .card-header:before {
content: $fa-var-thumbs-up;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-entireresume .card-header:before {
content: $fa-var-star;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-resumefield .card-header:before {
content: $fa-var-star;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-externalfeed .card-header:before {
content: $fa-var-rss;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-externalvideo .card-header:before {
content: $fa-var-youtube;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-googleapps .card-header:before {
content: $fa-var-google;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-wall h3.card-header:before {
content: $fa-var-quote-left;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-myfriends .card-header:before {
content: $fa-var-user-plus;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
.bt-mygroups .card-header:before {
content: $fa-var-users;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
.card {
.card-header:before {
font-family: "Font Awesome 5 Free Solid", "Font Awesome 5 Free" !important;
font-weight: 900;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
}
// custom icons to some blocks
&.bt-newviews .card-header:before {
content: fa-content($fa-var-bullhorn);
}
&.bt-inbox .card-header:before {
content: fa-content($fa-var-inbox);
}
&.bt-myviews .card-header:before {
content: fa-content($fa-var-file);
}
&.bt-filedownload .card-header:before {
content: fa-content($fa-var-download);
}
&.bt-folder .card-header:before {
content: fa-content($fa-var-folder);
}
&.bt-gallery .card-header:before {
content: fa-content($fa-var-images);
}
&.bt-internalmedia .card-header:before {
content: fa-content($fa-var-video);
}
&.bt-pdf .card-header:before {
content: fa-content($fa-var-file-pdf);
}
&.bt-html .card-header:before {
content: fa-content($fa-var-code);
}
&.bt-blog .card-header:before {
content: fa-content($fa-var-pen);
}
&.bt-blogpost .card-header:before {
content: fa-content($fa-var-file-alt);
}
&.bt-recentposts .card-header:before {
content: fa-content($fa-var-clock);
}
&.bt-taggedposts .card-header:before {
content: fa-content($fa-var-tags);
}
&.bt-comment .card-header:before {
content: fa-content($fa-var-comment);
}
&.bt-annotation .card-header:before {
content: fa-content($fa-var-sticky-note);
}
&.bt-creativecommons .card-header:before {
content: fa-content($fa-var-creative-commons);
}
&.bt-navigation .card-header:before {
content: fa-content($fa-var-location-arrow);
}
&.bt-plans .card-header:before {
content: fa-content($fa-var-tasks);
}
&.bt-recentforumposts .card-header:before {
content: fa-content($fa-var-comments);
}
&.bt-textbox .card-header:before {
content: fa-content($fa-var-edit);
}
&.bt-profileinfo .card-header:before {
content: fa-content($fa-var-address-card);
}
&.bt-socialprofile .card-header:before {
content: fa-content($fa-var-thumbs-up);
}
&.bt-entireresume .card-header:before {
content: fa-content($fa-var-star);
}
&.bt-resumefield .card-header:before {
content: fa-content($fa-var-star);
}
&.bt-externalfeed .card-header:before {
content: fa-content($fa-var-rss);
}
&.bt-externalvideo .card-header:before {
content: fa-content($fa-var-youtube);
}
&.bt-googleapps .card-header:before {
content: fa-content($fa-var-google);
}
&.bt-wall h3.card-header:before {
content: fa-content($fa-var-quote-left);
}
&.bt-myfriends .card-header:before {
content: fa-content($fa-var-user-friends);
}
&.bt-mygroups .card-header:before {
content: fa-content($fa-var-users);
}
&.bt-image .card-header:before {
content: fa-content($fa-var-image);
}
&.bt-text .card-header:before {
content: fa-content($fa-var-font);
}
&.bt-watchlist .card-header:before {
content: fa-content($fa-var-eye);
}
&.bt-peerassessment .card-header:before {
content: fa-content($fa-var-list);
}
&.bt-signoff .card-header:before {
content: fa-content($fa-var-signature);
}
&.bt-openbadgedisplayer .card-header:before {
content: fa-content($fa-var-shield-alt);
}
}
.bt-image .card-header:before {
content: $fa-var-file-image;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
.card.card-regular .card-header:before {
font-family: "Font Awesome 5 Free Regular", "Font Awesome 5 Free" !important;
font-weight: 400;
}
.bt-text .card-header:before {
content: $fa-var-font;
font-family: FontAwesome;
font-weight: 300;
color: rgba(255, 255, 255, 0.6);
padding-right: 5px;
.card.card-brand .card-header:before {
font-family: "Font Awesome 5 Brands Regular", "Font Awesome 5 Free" !important;
font-weight: 400;
}
{include file="header.tpl"}
<a title="{str section='module.multirecipientnotification' tag='composemessagedesc'}" class="btn-with-heading btn-lg btn btn-secondary" href="{$WWWROOT}module/multirecipientnotification/sendmessage.php">
<span class="icon icon-edit icon-lg left" role="presentation" aria-hidden="true"></span>
<span class="icon icon-edit icon-regular icon-lg left" role="presentation" aria-hidden="true"></span>
{str section='module.multirecipientnotification' tag='composemessage'}
</a>
<div id="notifications-page-header"/></div>
......
{include file="header.tpl"}
<a title="{str section='module.multirecipientnotification' tag='composemessagedesc'}" class="btn-with-heading btn-lg btn btn-secondary" href="{$WWWROOT}module/multirecipientnotification/sendmessage.php">
<span class="icon icon-edit icon-lg left" role="presentation" aria-hidden="true"></span>
<span class="icon icon-edit icon-regular icon-lg left" role="presentation" aria-hidden="true"></span>
{str section='module.multirecipientnotification' tag='composemessage'}
</a>
<div id="notifications-page-header"/></div>
......
{if $record->deleted}
<h3 class="title list-group-item-heading text-inline">
<span class="icon icon-icon-file left text-midtone" role="presentation" aria-hidden="true"></span>
<span class="icon icon-file left text-midtone" role="presentation" aria-hidden="true"></span>
{$record->title}
</h3>
<span class="artefacttype text-midtone">({str tag=deleted section=search.elasticsearch})</span>
......
......@@ -29,13 +29,13 @@
}
.icon-annotation:before {
content: fa-content($fa-var-pen-square);
content: fa-content($fa-var-sticky-note );
}
.icon-peerassessment:before {
content: fa-content($fa-var-list-alt);
content: fa-content($fa-var-list);
}
.icon-signoff:before {
content: fa-content($fa-var-check-square);
content: fa-content($fa-var-file-signature);
}
.icon-fileimagevideo:before,
.icon-video:before {
......@@ -67,7 +67,7 @@
}
.icon-gallery:before {
content: fa-content($fa-var-image);
content: fa-content($fa-var-images);
}
.icon-internalmedia:before {
......@@ -131,11 +131,11 @@
}
.icon-newviews:before {
content: fa-content($fa-var-file);
content: fa-content($fa-var-bullhorn);
}
.icon-plans:before {
content: fa-content($fa-var-map);
content: fa-content($fa-var-tasks);
}
.icon-tasks:before {
......@@ -147,18 +147,21 @@
}
.icon-textbox:before {
content: fa-content($fa-var-pen-square);
content: fa-content($fa-var-edit);
}
.icon-watchlist:before {
content: fa-content($fa-var-eye);
}
.icon-groupinfo:before,
.icon-profileinfo:before {
.icon-groupinfo:before {
content: fa-content($fa-var-info);
}
.icon-profileinfo:before {
content: fa-content($fa-var-address-card);
}
.icon-socialprofile:before {
content: fa-content($fa-var-thumbs-up);
}
......@@ -168,11 +171,11 @@
}
.icon-resumefield:before {
content: fa-content($fa-var-star-half);
content: fa-content($fa-var-star-half-alt);
}
.icon-myfriends:before {
content: fa-content($fa-var-user-plus);
content: fa-content($fa-var-user-friends);
}
.icon-groupmembers:before,
......
......@@ -94,7 +94,7 @@
<td>
<div class="btn-group">
<a href="{$link}&activetab=termsandconditions&versionid={$content->id}" title="{str tag=viewversion section='admin' arg1='$content->version'}" class="btn btn-secondary btn-sm">
<span class="icon icon-eye icon-lg" role="presentation" aria-hidden="true"></span>
<span class="icon icon-regular icon-eye icon-lg" role="presentation" aria-hidden="true"></span>
</a>
</div>
</td>
......
......@@ -1478,6 +1478,14 @@ Used to signify SmartEvidence has begun on the SmartEvidence martix table.
```
</section>
<section data-markdown data-category="icons">
### Circle closed
Used to signify SmartEvidence can bel placed on the SmartEvidence martix table.
```
<i class="icon icon-circle dot" role="presentation"></i>
```
</section>
<section data-markdown data-category="icons">
### Code
Used to show the HTML block.
......@@ -1608,6 +1616,10 @@ As seen on the "Site files" page in the administration area.
<section data-markdown data-category="icons">
### File text
As seen on the "User pages" page.
```
<i class="icon icon-regular icon-file-alt" role="presentation"></i>
```
As seen on the "Site pages" page.
```
<i class="icon icon-file-alt" role="presentation"></i>
......
<div class="bt-{$blocktype} card card-secondary clearfix {if $retractable}collapsible{/if}" id="blockinstance_{$id}">
<div class="bt-{$blocktype} card card-secondary {$cardicontype} clearfix {if $retractable}collapsible{/if}" id="blockinstance_{$id}">
{if $title}
<h3 class="title card-header js-heading">
{if $retractable}
......
......@@ -8,7 +8,7 @@
<span class="icon icon-arrows-alt icon-sm left move-indicator" role="presentation" aria-hidden="true"></span>
<input type="radio" id="blocktype-list-radio-{$blocktype.name}" class="blocktype-radio" name="blocktype" value="{$blocktype.name}">
{if $blocktype.cssicon}{*
*}<span class="icon icon-{$blocktype.cssicon} block-icon" title="{$blocktype.title}" role="presentation" aria-hidden="true"></span>{*
*}<span class="icon icon-{$blocktype.cssicon} {$blocktype.cssicontype} block-icon" title="{$blocktype.title}" role="presentation" aria-hidden="true"></span>{*
*}{else}{*
*}<img class="icon block-icon" src="{$blocktype.thumbnail_path}" title="{$blocktype.description}" alt="{$blocktype.description}" width="14" height="14">{*
*}{/if}
......