Commit fb47b831 authored by Lisa Seeto's avatar Lisa Seeto

Bug 1827811: UI Task

The change is for making sure the styling is working for the blocks.

* make file(s) to download use bh icons, metadata on new line
* resume attachments to use icons (buggy but apparently necessary)
* show file(s) to download titles on hover over link
* get rid of '-' for file metadata for size etc...
* fix the editing/display descrepancy of tagged/recent posts titles

Change-Id: Iad7bb30944f5924b43eca96993e3334120076c05
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent b82df03d
......@@ -60,6 +60,7 @@ class PluginBlocktypeFiledownload extends MaharaCoreBlocktype {
),
'downloadurl' => $wwwroot,
'commentcount' => $commentcount,
'allowcomments' => $artefact->get('allowcomments'),
);
if ($artefact instanceof ArtefactTypeProfileIcon) {
......
......@@ -42,13 +42,13 @@
<a class="outer-link collapsed" data-toggle="collapse" href="#recent_post_{$post->id}" aria-expanded="false">
<span class="sr-only">{$post->title}</span>
</a>
<h4 class={if !($editing)}"list-group-item-heading text-inline"{else}"title"{/if}>
<h4 class="list-group-item-heading text-inline">
{if !($editing)}
<a class="modal_link inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
{$post->title}
</a>
{else}
{$post->title}
<span class="list-group-item-heading no-link">{$post->title}</span>
{/if}
</h4>
<div>
......
......@@ -82,13 +82,13 @@
<a class="outer-link collapsed" data-toggle="collapse" href="#tagged_post_{$post->id}" aria-expanded="false">
<span class="sr-only">{$post->title}</span>
</a>
<h4 class={if !($editing)}"list-group-item-heading text-inline"{else}"title"{/if}>
<h4 class="list-group-item-heading text-inline">
{if !($editing)}
<a class="modal_link inner-link list-group-heading" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
{$post->title}
</a>
{else}
<a class="modal_link inner-link list-group-heading" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
{$post->title}
</a>
{else}
<span class="list-group-item-heading no-link">{$post->title}</span>
{/if}
</h4>
<div>
......
<ul class="list-group">
{foreach $files file}
{if !$file.allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$file.id
blockid=$blockid
commentcount=$file.commentcount
allowcomments=$file.allowcomments
justdetails=$justdetails
displayiconsonly = true}
<li class="filedownload-item list-group-item">
<a href="{$file.downloadurl}" class="outer-link icon-on-hover">
<span class="sr-only">
......@@ -21,11 +32,7 @@
href="#"
data-artefactid="{$file.id}"
data-blockid="{$blockid}"
{if $file.commentcount > 0}
title="{str tag=commentsanddetails section=artefact.file arg1=$file.commentcount}">
{else}
title={str tag=Details section=artefact.file}>
{/if}
title="{$file.title}">
{$file.title}
<span class="sr-only">
{str tag=Details section=artefact.file}
......@@ -38,11 +45,13 @@
</span>
{/if}
</h4>
<span class="text-small text-midtone"> -
{$file.ctime|format_date:'strftimedaydate'}
[{$file.size|display_size}]
</span>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
<div>
<span class="text-small text-midtone">
{$file.ctime|format_date:'strftimedaydate'}
[{$file.size|display_size}]
</span>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
</div>
{if $file.description}
<div class="file-description">
<p class="text-small">
......
......@@ -9,4 +9,4 @@
{/foreach}
</span>
</div>
{/if}
\ No newline at end of file
{/if}
......@@ -97,6 +97,16 @@
</h5>
<ul class="list-group list-group-unbordered">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=true
justdetails=$justdetails
displayiconsonly = true}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">{str tag=Download section=artefact.file} {$item->title}</span>
......
......@@ -92,6 +92,16 @@
</h5>
<ul class="list-group list-group-unbordered">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=true
justdetails=$justdetails
displayiconsonly = true}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">{str tag=Download section=artefact.file} {$item->title}</span>
......
......@@ -97,6 +97,16 @@
</div>
<ul class="list-group list-group-unbordered">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=true
justdetails=$justdetails
displayiconsonly = true}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">{str tag=Download section=artefact.file} {$item->title}</span>
......@@ -108,7 +118,7 @@
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
{/if}
<span class="title text-inline">
<span class="title text-inline list-group-file-title">
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
</a>
......
......@@ -96,6 +96,16 @@
</div>
<ul class="list-group list-group-unbordered">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=true
justdetails=$justdetails
displayiconsonly = true}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">{str tag=Download section=artefact.file} {$item->title}</span>
......
......@@ -17,6 +17,16 @@
<div id="cv-attach-{$id}{if $artefactid}-{$artefactid}{/if}" class="collapse">
<ul class="list-unstyled list-group">
{foreach from=$attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=true
justdetails=$justdetails
displayiconsonly = true}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">
......
......@@ -95,6 +95,16 @@
</h5>
<ul class="list-group list-group-unbordered">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=true
justdetails=$justdetails
displayiconsonly = true}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">{str tag=Download section=artefact.file} {$item->title}</span>
......
......@@ -26,6 +26,9 @@
+ .list-group-item-heading {
color: $link-color;
}
+ .list-group-item-heading .no-link {
color: $theme-text-color;
}
}
.js .js-hide,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment