Commit 7aba989f authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review
Browse files

Merge "Bug 1755919: Adjusting the elasticsearch templates"

parents 0f508f3a 54527f4d
......@@ -89,61 +89,39 @@
<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}
{else}
<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}
<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>
{/if}
</div>
......
......@@ -5,46 +5,56 @@
</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>
{if $record->viewid}
<a href="{$WWWROOT}view/view.php?id={$record->viewid}">
{$record->name}
</a>
{else}
{$record->name}
{/if}
</h3>
<span class="artefacttype">({str tag=collection section=search.elasticsearch})</span>
{if $record->createdbyname}
<div class="createdby">{str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname`</a>'}</div>
{/if}
<div class="detail">
{if $record->highlight}
{$record->highlight|safe}
{else}
{$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">
<strong>{str tag=tags section=search.elasticsearch}:</strong>
{foreach from=$record->tags item=tag name=tags}
<a href="{$WWWROOT}search/elasticsearch/index.php?query={$tag}&tagsonly=true">{$tag}</a>{if !$.foreach.tags.last}, {/if}
{/foreach}
<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}
</a>
{else}
{$record->name}
{/if}
</h3>
<span class="artefacttype">({str tag=collection section=search.elasticsearch})</span>
{if $record->createdbyname}
<div class="createdby">{str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname`</a>'}</div>
{/if}
<div class="detail">
{if $record->highlight}
{$record->highlight|safe}
{else}
{$record->description|str_shorten_html:140:true|safe}
{/if}
</div>
<!-- TAGS -->
{if $record->tags|count gt 0}
<div class="tags">
<strong>{str tag=tags section=search.elasticsearch}:</strong>
{foreach from=$record->tags item=tag name=tags}
<a href="{$WWWROOT}search/elasticsearch/index.php?query={$tag}&tagsonly=true">{$tag}</a>{if !$.foreach.tags.last}, {/if}
{/foreach}
</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>
{/if}
<!-- end TAGS -->
</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