artefact.tpl 5.72 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
            <h3 class="title list-group-item-heading text-inline">
                {if $record->link}
18
                    <a href="{$record->link}">
Pat Kira's avatar
Pat Kira committed
19
                        {$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
            {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>'}
Pat Kira's avatar
Pat Kira committed
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}
Pat Kira's avatar
Pat Kira committed
64
65
        </div>
        <!-- TAGS -->
66
        {if is_array($record->tags) && count($record->tags) > 0}
Pat Kira's avatar
Pat Kira committed
67
68
69
        <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}
Pat Kira's avatar
Pat Kira committed
71
72
73
74
75
        </div>
        {/if}
    </div>
    <!-- RESUMEITEMS -->
    <div class="col-md-4">
76
        {if is_array($record->resumeitems) && count($record->resumeitems) > 0}
Pat Kira's avatar
Pat Kira committed
77
78
79
80
81
82
83
84
85
86
87
        <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 -->
88
        {if is_array($record->views) && count($record->views) > 0}
Pat Kira's avatar
Pat Kira committed
89
        <div class="usedon">
90
            {if count($record->views) > 1}
Pat Kira's avatar
Pat Kira committed
91
                <strong>{str tag=usedonpages section=search.elasticsearch}:</strong>
92
            {else}
Pat Kira's avatar
Pat Kira committed
93
94
                <strong>{str tag=usedonpage section=search.elasticsearch}:</strong>
            {/if}
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
            <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>
Pat Kira's avatar
Pat Kira committed
125
        </div>
Naomi Guyer's avatar
Naomi Guyer committed
126
127
128
        {/if}
    </div>
</div>