Commit 34b3b2e1 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1912414 Style updates"

parents c5824bfd 6c312125
......@@ -1053,7 +1053,7 @@ class ArtefactTypeComment extends ArtefactType {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-link btn-sm',
'class' => 'btn-secondary btn-sm',
'name' => 'make_public_submit',
'value' => '<span class="icon icon-lock text-default left" role="presentation" aria-hidden="true"></span>' . get_string('makecommentpublic', 'artefact.comment'),
),
......
......@@ -57,7 +57,7 @@
<div class="metadata">
{if $item->pubmessage}
<em class="privatemessage">
{$item->pubmessage} -
{$item->pubmessage}
</em>
{/if}
......
......@@ -43,7 +43,7 @@
<div class="btn-group btn-group-top comment-item-buttons">
{if !$onview}
{if $item->canedit}
<a href="{$WWWROOT}artefact/comment/edit.php?id={$item->id}&amp;view={$viewid}" class="btn btn-secondary btn-group-item form-as-button float-left">
<a href="{$WWWROOT}artefact/comment/edit.php?id={$item->id}&amp;view={$viewid}" class="btn btn-secondary btn-sm btn-group-item form-as-button float-left">
<span class="icon icon-pencil-alt" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=edit}</span>
</a>
......@@ -53,7 +53,7 @@
{$item->deleteform|safe}
{/if}
{if $item->canreply}
<button class="btn btn-secondary float-left commentreplyto btn-group-item js-reply" id="commentreplyto{$item->id}" title="{str tag=reply section=artefact.comment}" data-replyto="{$item->id}" data-canprivatereply="{$item->canprivatereply}" data-canpublicreply="{$item->canpublicreply}" {if $blockid}data-blockid="{$blockid}"{/if}>
<button class="btn btn-secondary btn-sm float-left commentreplyto btn-group-item js-reply" id="commentreplyto{$item->id}" title="{str tag=reply section=artefact.comment}" data-replyto="{$item->id}" data-canprivatereply="{$item->canprivatereply}" data-canpublicreply="{$item->canpublicreply}" {if $blockid}data-blockid="{$blockid}"{/if}>
<span class="icon icon-reply" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=reply section=artefact.comment}</span>
</button>
......@@ -78,9 +78,9 @@
</div>
{if $item->makepublicform || ($item->makepublicrequested && !$item->deletedmessage)}
<div class="metadata">
<div class="comment-privacy metadata">
{if $item->pubmessage}
<em class="privatemessage"> {$item->pubmessage} </em> -
<em class="privatemessage"> {$item->pubmessage} </em>
{/if}
{if $item->makepublicform}
......@@ -111,13 +111,13 @@
{foreach $item->attachments item=a name=attachments}
<li class="list-group-item">
<span class="title">
<a href="{$WWWROOT}artefact/file/download.php?file={$a->attachid}&comment={$item->id}&view={$viewid}">
<a href="{$WWWROOT}artefact/file/download.php?file={$a->attachid}&comment={$item->id}&view={$viewid}" title="{$a->attachtitle}">
<span class="text-small">{$a->attachtitle}</span>
</a>
<span class="text-midtone text-small"> [{$a->attachsize}]</span>
</span>
<a href="{$WWWROOT}artefact/file/download.php?file={$a->attachid}&comment={$item->id}&view={$viewid}" class="download-link">
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true" data-toggle="tooltip" title="{str tag=downloadfilesize section=artefact.file arg1=$a->attachtitle arg2=$a->attachsize}"></span>
<span class="sr-only">{str tag=downloadfilesize section=artefact.file arg1=$a->attachtitle arg2=$a->attachsize}</span>
</a>
</li>
{/foreach}
......
......@@ -15,10 +15,10 @@
<div class="list-group-item{$templateBackgroundClass}">
<h2 class="list-group-item-heading text-inline">
<a href="{$WWWROOT}artefact/plans/plan/view.php?{$groupurlquery}id={$plan->id}">{$plan->title}</a>
{if $plan->template}
<div class="text-tiny">{$templatetext}</div>
{/if}
</h2>
{if $plan->template}
<span class="text-midtone"> - {$templatetext}</span>
{/if}
<div class="btn-top-right btn-group btn-group-top">
{if $canedit}
<a href="{$WWWROOT}artefact/plans/plan/edit.php?{$groupurlquery}id={$plan->id}" title="{str(tag=editspecific arg1=$plan->title)|escape:html|safe}" class="btn btn-secondary btn-sm">
......
{foreach from=$tasks.data item=task}
<div class="task-item list-group-item{if $task->completed == -1} plan_incomplete list-group-item-danger{/if}">
<div class="task-item list-group-item{if $task->completed == -1} plan_incomplete{/if}">
{if $editing}
<div class="float-right btn-group">
<div class="float-right btn-group btn-group-top">
<a class="btn btn-secondary btn-sm" href="{$WWWROOT}artefact/plans/task/edit.php?id={$task->id}{if $view}&view={$view}{/if}" title="{str tag='editthistask' section='artefact.plans' arg1=$task->title}"><span class="icon icon-pencil-alt text-default"></span></a>
<a class="btn btn-secondary btn-sm" href="{$WWWROOT}artefact/plans/task/delete.php?id={$task->id}{if $view}&view={$view}{/if}" title="{str tag='deletethistask' section='artefact.plans' arg1=$task->title}"><span class="icon icon-trash-alt text-danger"></span></a>
</div>
......@@ -21,7 +21,7 @@
{if $task->description || $task->tags}
<a class="{if !$options.pdfexport}collapsed{/if}" href="#expand-task-{$task->id}{if $block}-{$block}{/if}{if $versioning}-{$versioning->version}{/if}" data-toggle="collapse" aria-expanded="{if !$options.pdfexport}true{else}false{/if}" aria-controls="expand-task-{$task->id}{if $block}-{$block}{/if}{if $versioning}-{$versioning->version}{/if}">
{/if}
<h4 class="list-group-item-heading {if $task->completed == -1}text-danger{else}text-default{/if}">{$task->title}</h4>
<h4 class="list-group-item-heading text-default">{$task->title}</h4>
{if $task->description || $task->tags}
<span class="icon icon-chevron-down right collapse-indicator float-right" role="presentation" aria-hidden="true"></span>
</a>
......
{if $groupviews}
{if $groupviews.count > 0}
<ul id="groupviewlist" class="list-group allgroup-pages grouppages">
<ul id="groupviewlist" class="list-group allgroup-pages grouppages list-group-top-border">
{$groupviews.tablerows|safe}
</ul>
......
......@@ -3,22 +3,21 @@
<h4 class="list-group-item-heading text-inline">
<a href="{$view.fullurl}">{$view.displaytitle}</a>
{if $view.collid}(<span class="text-small text-midtone">{str tag=nviews section=view arg1=$view.numpages})</span>{/if}
<br />
<span class="postedon text-small text-midtone">
{if $view.mtime == $view.ctime}
{str tag=Created}
{else}
{str tag=Updated}
{/if}
{$view.mtime|strtotime|format_date}
</span>
</h4>
<br />
<span class="postedon text-small text-midtone">
{if $view.mtime == $view.ctime}
{str tag=Created}
{else}
{str tag=Updated}
{/if}
{$view.mtime|strtotime|format_date}
</span>
{if $view.template}
<div class="grouppage-form">
<div class="btn-group btn-group-top only-button">
{$view.form|safe}
</div>
</div>
{/if}
{if $view.description}
......
......@@ -2,58 +2,56 @@
<li class="list-group-item flush">
<h4 class="list-group-item-heading text-inline">
<a href="{$view.fullurl}">{$view.title}</a>
</h4>
<br>
{if $view.sharedby}
<span class="owner text-small text-midtone">
{if $view.group}
<a href="{$view.groupdata->homeurl}" class="text-small">
{$view.sharedby}
</a>
{elseif $view.owner}
{if $view.anonymous}
{if $view.staff_or_admin}
{assign var='realauthor' value=$view.sharedby}
{assign var='realauthorlink' value=profile_url($view.user)}
<br>
{if $view.sharedby}
<span class="owner text-small text-midtone">
{if $view.group}
<a href="{$view.groupdata->homeurl}" class="text-small">
{$view.sharedby}
</a>
{elseif $view.owner}
{if $view.anonymous}
{if $view.staff_or_admin}
{assign var='realauthor' value=$view.sharedby}
{assign var='realauthorlink' value=profile_url($view.user)}
{/if}
{assign var='author' value=get_string('anonymoususer')}
{include file=author.tpl}
{else}
<a href="{profile_url($view.user)}" class="text-small">
{$view.sharedby}
</a>
{/if}
{else}
{$view.sharedby}
{/if}
{assign var='author' value=get_string('anonymoususer')}
{include file=author.tpl}
</span>
{/if}
<span class="postedon text-small text-midtone">
- {if $view.mtime == $view.ctime}
{str tag=Created}
{else}
<a href="{profile_url($view.user)}" class="text-small">
{$view.sharedby}
</a>
{str tag=Updated}
{/if}
{else}
{$view.sharedby}
{/if}
</span>
{/if}
<span class="postedon text-small text-midtone">
- {if $view.mtime == $view.ctime}
{str tag=Created}
{else}
{str tag=Updated}
{/if}
{$view.mtime|strtotime|format_date}
</span>
{$view.mtime|strtotime|format_date}
</span>
</h4>
{if $view.template}
<div class="grouppage-form">
<div class="btn-group btn-group-top only-button">
{$view.form|safe}
</div>
<div class="btn-group btn-group-top only-button">
{$view.form|safe}
</div>
{/if}
{if $view.description}
<div class="detail text-small">
{$view.description|str_shorten_html:100:true|strip_tags|safe}
</div>
<div class="detail text-small">
{$view.description|str_shorten_html:100:true|strip_tags|safe}
</div>
{/if}
{if $view.tags}
<div class="tags text-small">
{str tag=tags}: list_tags owner=$view.owner tags=$view.tags}
{str tag=tags}: list_tags owner=$view.owner tags=$view.tags}
</div>
{/if}
</li>
......
......@@ -14,12 +14,12 @@
{if $wallpost->deletable}
<div class="btn-group btn-group-top comment-item-buttons">
{* {if $ownwall}
<a href="{$WWWROOT}blocktype/wall/wall.php?instance={$instanceid}&amp;replyto={$wallpost->id}" class="btn btn-secondary btn-group-item form-as-button float-left">
<a href="{$WWWROOT}blocktype/wall/wall.php?instance={$instanceid}&amp;replyto={$wallpost->id}" class="btn btn-secondary btn-sm btn-group-item form-as-button float-left">
<span class="icon icon-reply" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag='reply' section='blocktype.wall'}</span>
</a>
{/if}*}
<a href="{$WWWROOT}blocktype/wall/deletepost.php?postid={$wallpost->postid}&return={if $wholewall}wall{else}profile{/if}" class="btn btn-secondary btn-group-item form-as-button float-left">
<a href="{$WWWROOT}blocktype/wall/deletepost.php?postid={$wallpost->postid}&return={if $wholewall}wall{else}profile{/if}" class="btn btn-secondary btn-sm btn-group-item form-as-button float-left">
<span class="icon icon-trash-alt text-danger" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag='delete' section='blocktype.wall'}</span>
</a>
......
......@@ -3,7 +3,7 @@
</a>
{/if}
<div class="media forum-post {if !$post->approved} alert-warning {/if}">
<div class="media forum-post">
<div class="forumpostleft media-left text-small">
{if $deleteduser}
<span class="user-icon user-icon-40"><img src="{profile_icon_url user=null maxwidth=40 maxheight=40}" valign="middle" alt="{str tag=profileimagetextanonymous}" class="media-object"></span>
......
<div class="row">
{if ($secfacetterm == "Image" || $record->artefacttype == 'profileicon') && $record->thumb}
<img src="{$record->thumb}" alt="" class="artefact-img">
<h2 class="title list-group-item-heading text-inline">
......@@ -33,22 +32,23 @@
{/if}
</h2>
{/if}
<span class="artefacttype text-midtone">
{if $secfacetterm == "Journalentry"}
({str tag=blogpost section=search.elasticsearch})
{elseif $secfacetterm == "Forumpost"}
({str tag=forumpost section=search.elasticsearch})
{elseif $secfacetterm == "Resume"}
({str tag=resume section=search.elasticsearch})
{elseif $secfacetterm == "Wallpost"}
({str tag=wallpost section=search.elasticsearch})
{else}
({$secfacetterm})
{/if}
{if $record->deleted}
({str tag=deleted section=search.elasticsearch})
{/if}
</span>
<span class="artefacttype text-midtone">
{if $secfacetterm == "Journalentry"}
({str tag=blogpost section=search.elasticsearch})
{elseif $secfacetterm == "Forumpost"}
({str tag=forumpost section=search.elasticsearch})
{elseif $secfacetterm == "Resume"}
({str tag=resume section=search.elasticsearch})
{elseif $secfacetterm == "Wallpost"}
({str tag=wallpost section=search.elasticsearch})
{else}
({$secfacetterm})
{/if}
{if $record->deleted}
({str tag=deleted section=search.elasticsearch})
{/if}
</span>
<div class="row">
<div class="col-md-7">
{if $record->createdbyname}
<div class="createdby text-small">
......@@ -74,7 +74,7 @@
<!-- RESUMEITEMS -->
<div class="col-md-5">
{if is_array($record->resumeitems) && count($record->resumeitems) > 0}
<strong class="text-small">{str tag=contains section=search.elasticsearch}:</strong>
<div class="text-small">{str tag=contains section=search.elasticsearch}:</div>
<ul class="list-group list-unstyled text-small">
{foreach from=$record->resumeitems key=rid item=resume}
{if $resume->title}<li>{$resume->title}</li>{/if}
......@@ -88,9 +88,9 @@
{if is_array($record->views) && count($record->views) > 0}
<div class="usedon text-small">
{if count($record->views) > 1}
<strong>{str tag=usedonpages section=search.elasticsearch}:</strong>
{str tag=usedonpages section=search.elasticsearch}:
{else}
<strong>{str tag=usedonpage section=search.elasticsearch}:</strong>
{str tag=usedonpage section=search.elasticsearch}:
{/if}
<ul class="list-group list-unstyled text-small">
{foreach from=$record->views key=id item=view}
......
......@@ -20,7 +20,7 @@
</div>
{if $record->groupadmins}
<div class="groupadmin text-small">
<strong>{str tag=groupadmins section=group}:</strong>
{str tag=groupadmins section=group}:
{foreach name=admins from=$record->groupadmins item=user}
<a href="{profile_url($user)}">{$user|display_name}</a>
{if !$.foreach.admins.last}, {/if}
......
......@@ -12,7 +12,7 @@
</a>
</h2>
<span class="artefacttype text-midtone">({str tag=forumpost section=search.elasticsearch})</span>
<div class="source"><strong>{str tag='forum' section='search.elasticsearch'}:</strong> {$record->forumname} ({$record->groupname})</div>
<div class="poster"><strong>{str tag='forumpostedbylabel' section='search.elasticsearch'}:</strong> {str tag=forumpostedby section=search.elasticsearch arg1='$record->authorlink|safe' arg2='$record->ctime'}</div>
<div class="source">{str tag='forum' section='search.elasticsearch'}: {$record->forumname} ({$record->groupname})</div>
<div class="poster">{str tag='forumpostedbylabel' section='search.elasticsearch'}: {str tag=forumpostedby section=search.elasticsearch arg1='$record->authorlink|safe' arg2='$record->ctime'}</div>
<div class="detail">{$record->body|str_shorten_html:140:true:false|safe}</div>
{/if}
......@@ -95,6 +95,7 @@
.loggedindate-container {
margin-top: $spacing-base;
max-width: 250px;
white-space: nowrap;
}
.duplicateemail-filter {
margin-top: $spacing-base;
......@@ -373,6 +374,10 @@
// Used to remove the second border around the legal information
#agreetoprivacy .card {
border: 0;
p {
margin: $spacing-base 0 0 0;
}
}
.image-rotator {
......
// Modifications and extra use cases for bootstrap buttons
.btn-sm {
font-size: $font-size-sm;
padding: $btn-padding-y-sm $btn-padding-x-sm;
}
.btn-secondary {
color: $btn-secondary-color;
......@@ -52,13 +56,13 @@
}
}
.show>.btn-primary.dropdown-toggle {
.show > .btn-primary.dropdown-toggle {
color: inherit;
border-color: $btn-primary-border;
box-shadow: none;
}
.show>.btn-secondary.dropdown-toggle {
.show > .btn-secondary.dropdown-toggle {
color: $btn-secondary-color;
background-color: $btn-secondary-bg;
box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
......@@ -156,24 +160,32 @@ p ~ div > .btn-group-top,
.nav-tabs + div.btn-group-top {
margin-top: -1.25rem; // -20px;
margin-left: -100%;
@include media-breakpoint-down(md) {
margin: 0 0 $spacing-base 0;
width: 100%;
float: none;
.btn-group .btn,
.form-as-button,
.btn {
}
.btn-group .btn,
.form-as-button,
.btn {
border-top: 0;
@include media-breakpoint-down(md) {
margin-bottom: $spacing-xs;
margin-left: $btn-border-width;
margin-right: $btn-border-width;
width: 100%;
border-top: $btn-border-width solid $btn-secondary-border;
border-right-width: $btn-border-width;
border-radius: $btn-border-radius !important;
.btn {
margin-bottom: 0;
}
border-top: $btn-border-width solid $btn-secondary-border;
}
.btn {
margin-bottom: 0;
}
}
@include media-breakpoint-down(md) {
.form-as-button:first-child:not(.last) {
.btn {
border-right-width: $btn-border-width;
......@@ -189,7 +201,6 @@ p ~ div > .btn-group-top,
float: right;
.btn {
@include border-top-radius(0);
border-top: 0;
}
.btn-group-top {
margin: 0;
......@@ -211,70 +222,18 @@ td.btn-group {
.card-header {
.btn-group-top {
@include clearfix;
@include media-breakpoint-up(md) {
margin-top: -0.75rem; // -12px;
text-align: right;
float: right;
}
margin-top: -0.8125rem; // -13px;
text-align: right;
float: right;
@include media-breakpoint-down(md) {
margin-top: -0.8125rem; // -13px;
text-align: right;
float: right;
}
.btn {
font-size: $font-size-sm;
border: $btn-border-width solid $btn-secondary-border;
padding: $btn-padding-y-sm $btn-padding-x-sm;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: 0;
margin-top: 0;
}
.btn-top-right {
margin: 0; // negate nested margin
}
}
// Groups page has something different
.btn-action-list {
.btn-group-top {
text-align: left;
float: none;
display: inline-flex;
@include media-breakpoint-up(sm) {
text-align: right;
float: right;
}
@include media-breakpoint-down(md) {
margin-top: -0.75rem; // -12px;
}
@include media-breakpoint-down(sm) {
margin-top: $spacing-sm;
float: none;
}
.btn {
@include media-breakpoint-down(sm) {
border-top: $btn-border-width solid $btn-secondary-border;
&:first-child {
border-top-left-radius: $btn-border-radius;
}
&:last-child {
border-top-right-radius: $btn-border-radius;
}
}
}
}
}
&.wall {
.btn-group-top {
@include media-breakpoint-down(md) {
margin-top: -0.75rem; // -12px;
}
}
}
&.plan-list-group {
.btn-group-top {
margin-top: -0.8125rem; // -13px;
}
}
}
// Edit page configure buttons
.card-secondary .card-header .blockinstance-controls .btn-group-top {
......@@ -451,13 +410,6 @@ td.btn-group {
}
}
.btn-sm,
.btn-group .btn.btn-sm {
font-size: $font-size-sm;
border: $btn-border-width solid $btn-secondary-border;
padding: $btn-padding-y-sm $btn-padding-x-sm;
}
.card.first .card-header {
a.btn-sm {
border-radius: $btn-border-radius-sm;
......@@ -627,17 +579,6 @@ a[type="submit"],
top: -$spacing-sm;
}
// comments block btn-group-top alignment
@include media-breakpoint-up(lg) {
.feedbacktable .list-group {
.btn-group-top {
.delete-comment {
margin-top: -$btn-border-width;
}
}
}
}
// order sorting arrows
.authIcons {
.order-sort-control {
......
......@@ -15,9 +15,13 @@
.viewfooter &,
.modal-docked.active &,
.bt-peerassessment & {
.comment-content {
.comment-content,
.comment-privacy {
padding-left: 2.875rem; // 46px;
}
.comment-privacy .btn.btn-link {
width: auto;
}
@include media-breakpoint-up(lg) {
......
......@@ -32,10 +32,16 @@
.form-group.submit {
padding: 0 0 $spacing-base 0;
}
.form-group {
padding: 0 0 $spacing-base 0;