inboxmr.tpl 4.1 KB
Newer Older
Naomi Guyer's avatar
Naomi Guyer committed
1
{if !$items}
Liam's avatar
Liam committed
2
    <div class="card-body">
3 4
        <p class="lead text-small">{str tag=nomessages section=blocktype.inbox}</p>
    </div>
Naomi Guyer's avatar
Naomi Guyer committed
5
{else}
6 7
    <div id="inboxblock" class="inboxblock list-group">
        {foreach from=$items item=i}
8
        <div class="collapsible list-group-item{if !$i->read} js-card-unread{/if}" data-requesturl="{$WWWROOT}module/multirecipientnotification/indexin.json.php">
9
            {if $i->message}
10
                <a class="collapsed link-block{if !$i->read} unread{/if}" data-toggle="collapse" href="#message_content_{$i->type}_{$i->id}" data-id="{$i->id}" data-list="{$i->table}" aria-expanded="false">
11
                    {if $i->type == 'usermessage'}
12
                        <span class="icon icon-envelope text-default left" role="presentation" aria-hidden="true"></span>
13
                    {elseif $i->type == 'institutionmessage'}
14
                        <span class="icon icon-university text-default left" role="presentation" aria-hidden="true"></span>
15
                    {elseif $i->type == 'feedback'}
16
                        <span class="icon icon-comments text-default left" role="presentation" aria-hidden="true"></span>
17
                    {elseif $i->type == 'annotationfeedback'}
18
                        <span class="icon icon-comments-o text-default left" role="presentation" aria-hidden="true"></span>
19 20
                    {elseif $i->type == 'wallpost'}
                        <span class="icon icon-wall text-default left" role="presentation" aria-hidden="true"></span>
21
                    {else}
22
                        <span class="icon icon-wrench text-default left" role="presentation" aria-hidden="true"></span>
23
                    {/if}
24
                    <span class="sr-only">{$i->strtype}</span>
25
                    {$i->subject|str_shorten_html:50:true|safe}
Liam's avatar
Liam committed
26
                    <span class="icon icon-chevron-down collapse-indicator float-right text-small" role="presentation" aria-hidden="true"></span>
27
                </a>
Naomi Guyer's avatar
Naomi Guyer committed
28
            {/if}
29
            <div class="collapse" id="message_content_{$i->type}_{$i->id}">
30
                {if $i->message}
31
                    <p class="content-text">{$i->message|safe}</p>
32
                    {if $i->url}
33
                    <a href="{$WWWROOT}{$i->url}" class="text-small">
34
                        {if $i->urltext}{$i->urltext}{else}{str tag="more..."}{/if} <span class="icon icon-arrow-right mls icon-sm" role="presentation" aria-hidden="true"></span>
35
                    </a>
36 37 38
                    {/if}
                    {if $i->canreplyall}
                    <a title="{str tag=replyall section=module.multirecipientnotification}" href="{$WWWROOT}module/multirecipientnotification/sendmessage.php?replyto={$i->id}&returnto=outbox" class="text-small">
39
                        <span class="icon icon-reply-all icon-sm left" role="presentation" aria-hidden="true"></span>
40 41 42 43
                        {str tag='replyall'  section='module.multirecipientnotification'}
                    </a>
                    {elseif $i->canreply}
                        <a title="{str tag=reply section=module.multirecipientnotification}" href="{$WWWROOT}module/multirecipientnotification/sendmessage.php?id={$i->fromusr}{if !$i->startnewthread}&replyto={$i->id}{/if}&returnto=outbox" class="text-small">
44
                            <span class="icon icon icon-reply left icon-sm" role="presentation" aria-hidden="true"></span>
45 46 47
                            {str tag='reply' section='module.multirecipientnotification'}
                        </a>
                    {/if}
48
                {elseif $i->url}
49
                    <a href="{$WWWROOT}{$i->url}" class="text-small">{$i->subject}</a>
50 51 52 53
                {else}
                    {$i->subject}
                {/if}
            </div>
Naomi Guyer's avatar
Naomi Guyer committed
54
        </div>
55
        {/foreach}
Pat Kira's avatar
Pat Kira committed
56
    </div>
57
    {if $morelink}
58
    <div class="artefact-detail-link">
59
        <a class="link-blocktype last" href="{$morelink}">
60
        <span class="icon icon-arrow-circle-right" role="presentation" aria-hidden="true"></span>
61 62
        {str tag=More section=blocktype.inbox}</a>
    </div>
63
    {/if}
64
    <script>
65 66
    jQuery(document).trigger('pageupdated');
    </script>
Naomi Guyer's avatar
Naomi Guyer committed
67
{/if}