artefact.tpl 6.87 KB
Newer Older
Pat Kira's avatar
Pat Kira committed
1 2 3
<div class="row">
    <div class="col-md-8">
        {if ($secfacetterm == "Image" || $record->artefacttype == 'profileicon') && $record->thumb}
4
            <img src="{$record->thumb}" alt="" class="artefact-img">
Pat Kira's avatar
Pat Kira committed
5 6 7 8 9 10 11 12 13 14
            <h3 class="title list-group-item-heading text-inline">
                {if $record->link}
                    <a href="{$WWWROOT}{$record->link}">
                        {$record->title|str_shorten_html:50:true|safe}
                    </a>
                {else}
                    {$record->title|str_shorten_html:50:true|safe}
                {/if}
            </h3>
        {elseif $record->artefacttype == 'socialprofile'}
Naomi Guyer's avatar
Naomi Guyer committed
15
            <img src="{$record->icon}" alt="{$record->note}">
Pat Kira's avatar
Pat Kira committed
16 17 18 19
            <h3 class="title list-group-item-heading text-inline">
                {if $record->link}
                    <a href="{$WWWROOT}{$record->link}">
                        {$record->title|str_shorten_html:50:true|safe}
Naomi Guyer's avatar
Naomi Guyer committed
20
                    </a>
Pat Kira's avatar
Pat Kira committed
21 22
                {else}
                    {$record->title|str_shorten_html:50:true|safe}
Naomi Guyer's avatar
Naomi Guyer committed
23
                {/if}
Pat Kira's avatar
Pat Kira committed
24 25 26
            </h3>
        {else}
            <h3 class="title list-group-item-heading text-inline">
27
                <span class="icon icon-{$record->artefacttype} left {if $record->deleted}text-midtone{/if}" role="presentation" aria-hidden="true"></span>
Pat Kira's avatar
Pat Kira committed
28 29 30
                {if $record->link}
                    <a href="{$WWWROOT}{$record->link}">
                        {$record->title|str_shorten_html:50:true|safe}
Naomi Guyer's avatar
Naomi Guyer committed
31
                    </a>
Pat Kira's avatar
Pat Kira committed
32 33
                {else}
                    {$record->title|str_shorten_html:50:true|safe}
Naomi Guyer's avatar
Naomi Guyer committed
34
                {/if}
Pat Kira's avatar
Pat Kira committed
35 36
            </h3>
        {/if}
37
        <span class="artefacttype text-midtone">
Pat Kira's avatar
Pat Kira committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
            {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})
            {/if}
            {if $record->deleted}
                ({str tag=deleted section=search.elasticsearch})
            {/if}
        </span>
        {if $record->createdbyname}
        <div class="createdby">
            {str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname|safe`</a>'}
        </div>
        {/if}
        <div class="detail">
            {$record->description|str_shorten_html:100:true|safe}
        </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}
Naomi Guyer's avatar
Naomi Guyer committed
66
            {/foreach}
Pat Kira's avatar
Pat Kira committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
        </div>
        {/if}
    </div>
    <!-- RESUMEITEMS -->
    <div class="col-md-4">
        {if $record->resumeitems|count gt 0}
        <strong>{str tag=contains section=search.elasticsearch}:</strong>
        <ul>
        {foreach from=$record->resumeitems key=rid item=resume}
            {if $resume->title}<li>{$resume->title}</li>{/if}
            {if $resume->jobtitle}<li>{$resume->jobtitle}</li>{/if}
            {if $resume->qualname}<li>{$resume->qualname}</li>{/if}
        {/foreach}
        </ul>
        {/if}

        <!-- VIEWS -->
        {if $record->views|count gt 0}
        <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>
                <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}
        </div>
Naomi Guyer's avatar
Naomi Guyer committed
144 145 146
        {/if}
    </div>
</div>