artefact.tpl 6.98 KB
Newer Older
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">
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}">
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>
21 22
                {else}
                    {$record->title|str_shorten_html:50:true|safe}
Naomi Guyer's avatar
Naomi Guyer committed
23
                {/if}
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>
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>
32 33
                {else}
                    {$record->title|str_shorten_html:50:true|safe}
Naomi Guyer's avatar
Naomi Guyer committed
34
                {/if}
35 36
            </h3>
        {/if}
37
        <span class="artefacttype text-midtone">
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
            {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">
55
            {str tag=createdby section=search.elasticsearch arg1='<a href="`$record->createdby|profile_url`">`$record->createdbyname`</a>'}
56 57 58
        </div>
        {/if}
        <div class="detail">
59 60 61 62 63
            {if $record->highlight}
                {$record->highlight|safe}
            {else}
                {$record->description|str_shorten_html:140:true|safe}
            {/if}
64 65 66 67 68 69
        </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
70
            {/foreach}
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 144 145 146 147
        </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
148 149 150
        {/if}
    </div>
</div>