activitylistout.tpl 5.51 KB
Newer Older
Naomi Guyer's avatar
Naomi Guyer committed
1
<div class="collapsible-group">
Pat Kira's avatar
Pat Kira committed
2
{foreach from=$data item=item name='notification'}
3
    <div class="panel panel-default collapsible notification collapsible-group {if $dwoo.foreach.notification.first}first{/if} {if $dwoo.foreach.notification.last}last{/if}">
Naomi Guyer's avatar
Naomi Guyer committed
4
        <h4 class="panel-heading">
Naomi Guyer's avatar
Naomi Guyer committed
5 6 7 8 9 10
            <label class="panel-control">
                <span class="control prl">
                    <input type="checkbox" class="tocheck" name="select-{$item->table}-{$item->id}" id="select-{$item->table}-{$item->id}">
                    <span class="sr-only">{str tag='select' section='mahara'}</span>
                </span>
            </label>
Naomi Guyer's avatar
Naomi Guyer committed
11
            <a class="collapsed" href="#notification-{$item->id}" data-toggle="collapse" aria-expanded="1" aria-controls="notification-{$item->id}">
12 13
                <span class="details-group">
                    {if $item->read && $item->type == 'usermessage'}
14
                    <span class="icon icon-envelope type-icon prxl plxl"></span><span class="sr-only">{$item->strtype} - {str tag='read' section='activity'}</span>
15
                    {elseif $item->strtype == 'usermessage'}
16
                    <span class="icon icon-envelope type-icon prxl plxl"></span><span class="sr-only">{$item->strtype}</span>
17
                    {elseif $item->strtype == 'Institution message'}
18
                         <span class="icon icon-university type-icon prxl plxl"></span>
19 20
                         <span class="sr-only">{$item->strtype}</span>
                    {else}
21
                    <span class="icon icon-wrench type-icon prxl plxl"></span>
22 23
                    <span class="sr-only">{$item->strtype}</span>
                    {/if}
Naomi Guyer's avatar
Naomi Guyer committed
24

25 26 27 28 29 30
                    <span class="sr-only">{str section='activity' tag='subject'}</span>
                    {if !$item->read}
                        <span class="accessible-hidden sr-only">
                            {str tag='unread' section='activity'}:
                        </span>
                    {/if}
Naomi Guyer's avatar
Naomi Guyer committed
31

32
                    {$item->subject|truncate:40}
Naomi Guyer's avatar
Naomi Guyer committed
33

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
                    <span class="metadata"> -
                        <span>
                            {str section='artefact.multirecipientnotification' tag='touser'}:
                        </span>
                        <span class="username">
                            {if count($item->tousr) > 0}
                                {assign var="tousr" value=$item->tousr[0]}
                                {if count($tousr['username']) > 0}
                                    {$tousr['username']|truncate:$maxnamestrlength}
                                {else}
                                    {$tousr['display']|truncate:$maxnamestrlength}
                                {/if}
                                <span>... ({count($item->tousr)})</span>
                                <span class="sr-only">more</span>
                            {else}
                                {assign var="tousr" value=$item->tousr[0]}
                                {$tousr['username']|truncate:$maxnamestrlength}
                            {/if}
                        </span>
                        <span class="sentdate">
                        , {$item->date}
                        </span>
Naomi Guyer's avatar
Naomi Guyer committed
56
                    </span>
57
                 </span>
58
                <span class="icon icon-chevron-down pls collapse-indicator pull-right"></span>
Naomi Guyer's avatar
Naomi Guyer committed
59 60 61 62 63 64 65 66
            </a>
        </h4>
        <div id="notification-{$item->id}" class="collapse">
            {if $item->message}
            <div class="content panel-body">
                <p class="tousers">
                    <span class="recipientlist">
                    <strong>
67
                        {str section='artefact.multirecipientnotification' tag='touser'}:
Naomi Guyer's avatar
Naomi Guyer committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
                    </strong>
                    {if count($item->tousr) > 1}
                    <span>
                        {foreach from=$item->tousr item=tousr key=break}
                        {if ($tousr['link'])}<a href="{$tousr['link']}">{/if}
                            <span class="prm">
                            {$tousr['display']|truncate:$maxnamestrlength}
                            </span>
                        {if ($tousr['link'])}</a>{/if}
                        {/foreach}
                    </span>
                    {else}
                    <span>
                        {assign var="tousr" value=$item->tousr[0]}
                        {if $tousr['link']}<a href="{$tousr['link']}">{/if}
                            <span class="prm">
                            {$tousr['display']|truncate:$maxnamestrlength}
                            </span>
                        {if $tousr['link']}</a>{/if}
                    </span>
                    {/if}
                </p>
                <p>{$item->message|safe}</p>
Pat Kira's avatar
Pat Kira committed
91
            </div>
Naomi Guyer's avatar
Naomi Guyer committed
92 93 94 95 96
            {/if}
            <div class="actions panel-footer mbl">
                <div class="url">
                    {if $item->url}
                    <a class="action" href="{$WWWROOT}{$item->url}">
97
                        <span class="icon icon-reply"></span>
Naomi Guyer's avatar
Naomi Guyer committed
98 99
                        {if $item->urltext}
                        {$item->urltext}
Pat Kira's avatar
Pat Kira committed
100
                        {/if}
Naomi Guyer's avatar
Naomi Guyer committed
101
                    </a>
Pat Kira's avatar
Pat Kira committed
102
                    {/if}
Naomi Guyer's avatar
Naomi Guyer committed
103 104
                    {if $item->return}
                    <a class="action" href="{$WWWROOT}{$item->return}">
105
                        <span class="icon icon-reply-all"></span> {$item->returnoutput}
Naomi Guyer's avatar
Naomi Guyer committed
106
                    </a>
Pat Kira's avatar
Pat Kira committed
107
                    {/if}
Naomi Guyer's avatar
Naomi Guyer committed
108
                </div>
Pat Kira's avatar
Pat Kira committed
109 110 111
            </div>
        </div>
    </div>
Naomi Guyer's avatar
Naomi Guyer committed
112
{/foreach}
113
</div>