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