Commit e8475a33 authored by Evonne's avatar Evonne Committed by Robert Lyon

Bug 1845104 Various theme fixes part 5

Changing attached files to not a heading and getting unified
markup and styling of attachments and downloads across journals,
resumes and files.

behatnotneeded

Change-Id: I66ae6a41068273af3780577bad5acf6f812d08d2
parent c0cc88de
......@@ -74,7 +74,7 @@
</p>
{if $post.files}
<div class="attachments">
<span class="icon left icon-paperclip" role="presentation" aria-hidden="true"></span>
<span class="icon left icon-paperclip icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag=attachedfiles section=artefact.blog}</span>
<span class="metadata">({$post.files|count})</span>
</div>
......
......@@ -70,16 +70,16 @@
{if $post->files}
<div class="has-attachment card collapsible" id="postfiles_{$post->id}">
<h5 class="card-header has-link">
<div class="card-header has-link">
<a class="text-left collapsed" data-toggle="collapse" href="#attach_{$post->id}" aria-expanded="false">
<span class="icon left icon-paperclip" role="presentation" aria-hidden="true"></span>
<span class="icon left icon-paperclip icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small"> {str tag=attachedfiles section=artefact.blog} </span>
<span class="metadata">
({$post->files|count})
</span>
<span class="icon icon-chevron-down collapse-indicator float-right" role="presentation" aria-hidden="true"></span>
</a>
</h5>
</div>
<div class="collapse" id="attach_{$post->id}">
<ul class="list-group list-unstyled">
{foreach from=$post->files item=file}
......
<div class="has-attachment card collapsible">
<h3 class="card-header">
<div class="card-header">
<a class="text-left collapsed" aria-expanded="false" href="#blog-attach-{$postid}" data-toggle="collapse">
<span class="icon left icon-paperclip" role="presentation" aria-hidden="true"></span>
<span class="icon left icon-paperclip icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag=attachedfiles section=artefact.blog}</span>
<span class="metadata">({$attachments|count})</span>
<span class="icon icon-chevron-down float-right collapse-indicator" role="presentation" aria-hidden="true"></span>
</a>
</h3>
</div>
<!-- Attachment list with view and download link -->
<div id="blog-attach-{$postid}" class="collapse">
<ul class="list-unstyled list-group">
......@@ -25,8 +25,8 @@
<span class="icon icon-{$item->artefacttype} icon-lg text-default left" role="presentation" aria-hidden="true"></span>
{/if}
<span class="title list-group-item-heading inline">
<span class="inner-link">
<span class="title">
<span class="inner-link text-small">
{$item->title}
</span>
<span class="metadata"> -
......
......@@ -47,16 +47,16 @@
{if $post->files}
<div class="has-attachment card collapsible" id="blockpostfiles-{$post->id}">
<h5 class="card-header">
<div class="card-header">
<a class="text-left collapsed" data-toggle="collapse" href="#post-attach-{$post->id}" aria-expanded="false">
<span class="icon icon-paperclip left" role="presentation" aria-hidden="true"></span>
<span class="icon icon-paperclip left icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small"> {str tag=attachedfiles section=artefact.blog} </span>
<span class="metadata">
({$post->files|count})
</span>
<span class="icon icon-chevron-down collapse-indicator float-right" role="presentation" aria-hidden="true"></span>
</a>
</h5>
</div>
<div class="collapse" id="post-attach-{$post->id}">
<ul class="list-group list-unstyled">
{foreach from=$post->files item=file}
......@@ -72,7 +72,7 @@
<span class="icon icon-{$file->artefacttype} icon-lg text-default left" role="presentation" aria-hidden="true"></span>
{/if}
<span class="title">
{$file->title}
<span class="text-small">{$file->title}</span>
<span class="metadata"> -
[{$file->size|display_size}]
</span>
......
<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">
{str tag=Download section=artefact.file} {$file.title}
</span>
</a>
{if $file.iconsrc}
<img src="{$file.iconsrc}" alt="" class="file-icon text-inline" />
{else}
<span class="icon icon-{$file.artefacttype} icon-lg left" role="presentation" aria-hidden="true"></span>
<div class="file-download-list">
<ul class="list-group">
{foreach $files file}
{if !$file.allowcomments}
{assign var="justdetails" value=true}
{/if}
<h4 class="title list-group-item-heading text-inline">
{if !$editing}
<a class="modal_link inner-link"
data-toggle="modal-docked"
data-target="#configureblock"
href="#"
data-artefactid="{$file.id}"
data-blockid="{$blockid}"
title="{$file.title}">
{$file.title}
<span class="sr-only">
{str tag=Details section=artefact.file}
{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">
{str tag=Download section=artefact.file} {$file.title}
</span>
</a>
{if $file.iconsrc}
<img src="{$file.iconsrc}" alt="" class="file-icon text-inline" />
{else}
{$file.title}
<span class="sr-only">
{str tag=Details section=artefact.file}
</span>
<span class="icon icon-{$file.artefacttype} icon-lg left" role="presentation" aria-hidden="true"></span>
{/if}
</h4>
<br />
<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>
{if $file.description}
<div class="file-description">
<p class="text-small">
{$file.description|safe|clean_html}
</p>
</div>
<script>
jQuery("div.file-description a").addClass('inner-link');
</script>
{/if}
</li>
{/foreach}
</ul>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
<h4 class="title list-group-item-heading">
{if !$editing}
<a class="modal_link inner-link"
data-toggle="modal-docked"
data-target="#configureblock"
href="#"
data-artefactid="{$file.id}"
data-blockid="{$blockid}"
title="{$file.title}">
{$file.title}
<span class="sr-only">
{str tag=Details section=artefact.file}
</span>
</a>
{else}
{$file.title}
<span class="sr-only">
{str tag=Details section=artefact.file}
</span>
{/if}
</h4>
<br />
<span class="text-small text-midtone">
{$file.ctime|format_date:'strftimedaydate'}
[{$file.size|display_size}]
</span>
{if $file.description}
<div class="file-description">
<p class="text-small">
{$file.description|safe|clean_html}
</p>
</div>
<script>
jQuery("div.file-description a").addClass('inner-link');
</script>
{/if}
</li>
{/foreach}
</ul>
</div>
......@@ -17,7 +17,7 @@
{str tag=foldercontents section=artefact.file}:
</h4>
<div class="fullwidth">
<div class="fullwidth file-download-list">
<ul class="list-group">
{foreach from=$children item=child}
<li class="filedownload-item list-group-item">
......@@ -35,6 +35,7 @@
{else}
<span class="icon icon-{$child->artefacttype} icon-lg left {if $modal}file-icon-render-in-modal{/if}" role="presentation" aria-hidden="true"></span>
{/if}
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
<h4 class="title list-group-item-heading text-inline">
<a class="modal_link inner-link" title="{$child->hovertitle}" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$child->id}">
{$child->title}
......@@ -46,7 +47,6 @@
{/if}
</h4>
{if $child->artefacttype != 'folder'}
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
{/if}
{if $child->description}
<p class="file-description text-small text-midtone">
......
......@@ -17,7 +17,7 @@
{str tag=foldercontents section=artefact.file}:
</h4>
<div class="fullwidth">
<div class="fullwidth file-download-list">
<ul class="list-group">
{foreach from=$children item=child}
{if !$child->allowcomments}
......
......@@ -90,51 +90,53 @@
{/if}
{if $row->attachments}
<h5 class="list-group-item-heading attachment-title">
<span class="icon icon-paperclip left" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</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=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
{/if}
<span class="title text-inline">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
<div class="has-attachment card">
<div class="card-header">
<span class="icon icon-paperclip left icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
<span class="metadata">({$row->clipcount})</span>
</div>
<ul class="list-unstyled list-group">
{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=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="text-small inner-link">{$item->title}</span>
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
{/if}
<span class="metadata"> -
[{$item->size}]
<span class="title">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
</a>
{else}
<span class="text-small inner-link">{$item->title}</span>
{/if}
<span class="metadata"> -
[{$item->size}]
</span>
</span>
</span>
<span class="icon icon-download icon-lg float-right text-watermark icon-action inner-link" role="presentation" aria-hidden="true"></span>
</li>
{/foreach}
</ul>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
</li>
{/foreach}
</ul>
</div>
{/if}
</div>
</div>
......
......@@ -85,52 +85,54 @@
{/if}
{if $row->attachments}
<h5 class="list-group-item-heading attachment-title">
<span class="icon icon-paperclip left" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</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
blockid=$blockid
commentcount=$item->commentcount
allowcomments=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
<div class="has-attachment card">
<div class="card-header">
<span class="icon icon-paperclip left icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
<span class="metadata">({$row->clipcount})</span>
</div>
<ul class="list-unstyled list-group">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
<span class="title text-inline">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
blockid=$blockid
commentcount=$item->commentcount
allowcomments=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="text-small innerl-link">{$item->title}</span>
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
{/if}
<span class="metadata"> -
[{$item->size}]
<span class="title">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
</a>
{else}
<span class="text-small inner-link">{$item->title}</span>
{/if}
<span class="metadata"> -
[{$item->size}]
</span>
</span>
</span>
<span class="icon icon-download icon-lg float-right text-watermark icon-action inner-link" role="presentation" aria-hidden="true"></span>
</li>
{/foreach}
</ul>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
</li>
{/foreach}
</ul>
</div>
{/if}
</div>
</div>
......
......@@ -90,51 +90,53 @@
{/if}
{if $row->attachments}
<div class="list-group-item-heading attachment-title">
<span class="icon icon-paperclip left" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</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=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
<div class="has-attachment card">
<div class="card-header">
<span class="icon icon-paperclip left icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
<span class="metadata">({$row->clipcount})</span>
</div>
<ul class="list-unstyled list-group">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
<span class="title text-inline list-group-file-title">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="text-small inner-link">{$item->title}</span>
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
{/if}
<span class="metadata"> -
[{$item->size}]
<span class="title">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
</a>
{else}
<span class="text-small inner-link">{$item->title}</span>
{/if}
<span class="metadata"> -
[{$item->size}]
</span>
</span>
</span>
<span class="icon icon-download icon-lg float-right text-watermark icon-action inner-link" role="presentation" aria-hidden="true"></span>
</li>
{/foreach}
</ul>
<span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
</li>
{/foreach}
</ul>
</div>
{/if}
</div>
</div>
......
......@@ -89,51 +89,53 @@
{/if}
{if $row->attachments}
<div class="list-group-item-heading attachment-title">
<span class="icon icon-paperclip left" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</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=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
<div class="has-attachment card">
<div class="card-header">
<span class="icon icon-paperclip left icon-sm" role="presentation" aria-hidden="true"></span>
<span class="text-small">{str tag='attachedfiles' section='artefact.blog'}</span>
<span class="metadata">({$row->clipcount})</span>
</div>
<ul class="list-unstyled list-group">
{foreach from=$row->attachments item=item}
{if !$item->allowcomments}
{assign var="justdetails" value=true}
{/if}
<span class="title text-inline">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
{include
file='header/block-comments-details-header.tpl'
artefactid=$item->id
commentcount=$item->commentcount
allowcomments=$item->allowcomments
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>
</a>
{if $item->iconpath}
<img class="file-icon" src="{$item->iconpath}" alt="">
{else}
<span class="text-small innerl-link">{$item->title}</span>
<span class="icon icon-{$item->artefacttype} left icon-lg text-default" role="presentation" aria-hidden="true"></span>
{/if}
<span class="metadata"> -
[{$item->size}]
<span class="title">
{if !$editing}
<a class="modal_link text-small inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-artefactid="{$item->id}">
{$item->title}
</a>