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,61 +89,39 @@ ...@@ -89,61 +89,39 @@
<div class="usedon"> <div class="usedon">
{if $record->views|count gt 1} {if $record->views|count gt 1}
<strong>{str tag=usedonpages section=search.elasticsearch}:</strong> <strong>{str tag=usedonpages section=search.elasticsearch}:</strong>
<ul class="list-group list-unstyled"> {else}
{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> <strong>{str tag=usedonpage 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>
{/if} {/if}
<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}">
{str tag=viewartefact}
{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}
{elseif $result->artefacttype == "blog"}
{str tag=blog section=search.elasticsearch}
{elseif $result->artefacttype == "html"}
{str tag=html section=search.elasticsearch}
{else}
{$secfacetterm|lower}
{/if}
</a>
</span>
{/if}
</li>
{/foreach}
</ul>
</div> </div>
{/if} {/if}
</div> </div>
......
...@@ -5,46 +5,56 @@ ...@@ -5,46 +5,56 @@
</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>
{else} {else}
<h3 class="title"> <div class="row">
<span class="icon icon-folder-open left" role="presentation" aria-hidden="true"></span> <div class="col-md-8">
{if $record->viewid} <h3 class="list-group-item-heading title text-inline">
<a href="{$WWWROOT}view/view.php?id={$record->viewid}"> <span class="icon pull-left icon-folder-open left" role="presentation" aria-hidden="true"></span>
{$record->name} {if $record->viewid}
</a> <a href="{$WWWROOT}view/view.php?id={$record->viewid}">
{else} {$record->name}
{$record->name} </a>
{/if} {else}
</h3> {$record->name}
<span class="artefacttype">({str tag=collection section=search.elasticsearch})</span> {/if}
{if $record->createdbyname} </h3>
<div class="createdby">{str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname`</a>'}</div> <span class="artefacttype">({str tag=collection section=search.elasticsearch})</span>
{/if} {if $record->createdbyname}
<div class="detail"> <div class="createdby">{str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname`</a>'}</div>
{if $record->highlight} {/if}
{$record->highlight|safe} <div class="detail">
{else} {if $record->highlight}
{$record->description|str_shorten_html:140:true|safe} {$record->highlight|safe}
{/if} {else}
</div> {$record->description|str_shorten_html:140:true|safe}
<!-- PAGES --> {/if}
<div class="tags"> </div>
<strong>{str tag=pages section=search.elasticsearch}:</strong> <!-- TAGS -->
{if $record->views} {if $record->tags|count gt 0}
{foreach from=$record->views key=id item=view name=foo} <div class="tags">
<a href="{$WWWROOT}view/view.php?id={$id}">{$view}</a>{if !$.foreach.foo.last}, {/if} <strong>{str tag=tags section=search.elasticsearch}:</strong>
{/foreach} {foreach from=$record->tags item=tag name=tags}
{else} <a href="{$WWWROOT}search/elasticsearch/index.php?query={$tag}&tagsonly=true">{$tag}</a>{if !$.foreach.tags.last}, {/if}
{str tag=none section=search.elasticsearch} {/foreach}
{/if} </div>
</div> {/if}
<!-- TAGS --> <!-- end TAGS -->
{if $record->tags|count gt 0} </div>
<div class="tags"> <div class="col-md-4">
<strong>{str tag=tags section=search.elasticsearch}:</strong> <!-- PAGES -->
{foreach from=$record->tags item=tag name=tags} {if $record->views|count gt 0}
<a href="{$WWWROOT}search/elasticsearch/index.php?query={$tag}&tagsonly=true">{$tag}</a>{if !$.foreach.tags.last}, {/if} <div class="usedon">
{/foreach} {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} </div>
<!-- end TAGS -->
{/if} {/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