Commit 54527f4d authored by Robert Lyon's avatar Robert Lyon

Bug 1755919: Adjusting the elasticsearch templates

To make the display more consistent to the my tags/related tags page

- removed some duplicate code from artefact template and made the
collection template list pages to the right rather than under
collection info on left

behatnotneeded

Change-Id: Ife8365212f4f381de26738743140a40cafd2f09c
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0ad5b688
......@@ -89,34 +89,9 @@
<div class="usedon">
{if $record->views|count gt 1}
<strong>{str tag=usedonpages section=search.elasticsearch}:</strong>
<ul class="list-group list-unstyled">
{foreach from=$record->views key=id item=view}
<li>
<a href="{$WWWROOT}view/view.php?id={$id}">{$view|str_shorten_html:50:true|safe}</a>
<!-- Profile artefact can only be displayed in views -->
{if $secfacetterm != "Profile"} |
<span class="viewartefact">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$record->id}&view={$id}">
view
{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|lower}
{/if}
</a>
</span>
{/if}
</li>
{/foreach}
</ul>
{else}
<strong>{str tag=usedonpage section=search.elasticsearch}:</strong>
{/if}
<ul class="list-group list-unstyled">
{foreach from=$record->views key=id item=view}
<li>
......@@ -125,7 +100,7 @@
{if $secfacetterm != "Profile"} |
<span class="viewartefact">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$record->id}&view={$id}">
view
{str tag=viewartefact}
{if $secfacetterm == "Journalentry"}
{str tag=blogpost section=search.elasticsearch}
{elseif $secfacetterm == "Forumpost"}
......@@ -134,6 +109,10 @@
{str tag=resume section=search.elasticsearch}
{elseif $secfacetterm == "Wallpost"}
{str tag=wallpost section=search.elasticsearch}
{elseif $result->artefacttype == "blog"}
{str tag=blog section=search.elasticsearch}
{elseif $result->artefacttype == "html"}
{str tag=html section=search.elasticsearch}
{else}
{$secfacetterm|lower}
{/if}
......@@ -143,7 +122,6 @@
</li>
{/foreach}
</ul>
{/if}
</div>
{/if}
</div>
......
......@@ -5,8 +5,10 @@
</h3>
<span class="artefacttype text-midtone">({str tag=deleted section=search.elasticsearch})</span>
{else}
<h3 class="title">
<span class="icon icon-folder-open left" role="presentation" aria-hidden="true"></span>
<div class="row">
<div class="col-md-8">
<h3 class="list-group-item-heading title text-inline">
<span class="icon pull-left icon-folder-open left" role="presentation" aria-hidden="true"></span>
{if $record->viewid}
<a href="{$WWWROOT}view/view.php?id={$record->viewid}">
{$record->name}
......@@ -26,17 +28,6 @@
{$record->description|str_shorten_html:140:true|safe}
{/if}
</div>
<!-- PAGES -->
<div class="tags">
<strong>{str tag=pages section=search.elasticsearch}:</strong>
{if $record->views}
{foreach from=$record->views key=id item=view name=foo}
<a href="{$WWWROOT}view/view.php?id={$id}">{$view}</a>{if !$.foreach.foo.last}, {/if}
{/foreach}
{else}
{str tag=none section=search.elasticsearch}
{/if}
</div>
<!-- TAGS -->
{if $record->tags|count gt 0}
<div class="tags">
......@@ -47,4 +38,23 @@
</div>
{/if}
<!-- end TAGS -->
</div>
<div class="col-md-4">
<!-- PAGES -->
{if $record->views|count gt 0}
<div class="usedon">
{if $record->views|count gt 1}
<strong>{str tag=views}:</strong>
{else}
<strong>{str tag=view}:</strong>
{/if}
{foreach from=$record->views key=id item=view name=views}
<a href="{$WWWROOT}view/view.php?id={$id}">{$view|str_shorten_html:50:true|safe}</a>{if !$.foreach.views.last}, {/if}
{/foreach}
</div>
{else}
{str tag=none section=search.elasticsearch}
{/if}
</div>
</div>
{/if}
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