activitylistout.tpl 3.56 KB
Newer Older
Naomi Guyer's avatar
Naomi Guyer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{foreach from=$data item=item}
  <script language="JavaScript" type="text/javascript" src="js/toggle_recipient.js"> </script>
  <tr class="{cycle values='r0,r1'}">
    <td class="inboxicon">
      {if $item->read && $item->type == 'usermessage'}
        <img src="{theme_url filename=cat('images/read' $item->type '.png')}" alt="{$item->strtype} - {str tag='read' section='activity'}" />
      {elseif $item->type == 'usermessage'}
        <img src="{theme_url filename=cat('images/' $item->type '.png')}" alt="{$item->strtype}" class="unreadmessage" />
      {else}
        <img src="{theme_url filename=cat('images/' $item->type '.png')}" alt="{$item->strtype}" />
      {/if}
    </td>
    <td>{$item->fromusr|display_name|truncate:$maxnamestrlength}</td>
    <td>
      {if $item->message}
        <a href="" onclick="showHideMessage({$item->id}, '{$item->table}'); return false;">
          {$item->subject|truncate:60}
Naomi Guyer's avatar
Naomi Guyer committed
18
          <span class="accessible-hidden sr-only">{str tag='clickformore' section='artefact.multirecipientnotification'}</span>
Naomi Guyer's avatar
Naomi Guyer committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
        </a>
        <div id="message-{$item->table}-{$item->id}" class="hidden">
          {$item->message|safe}
          {if $item->url}
            <br />
            <a href="{$WWWROOT}{$item->url}">
              {if $item->urltext}
                {$item->urltext} {str tag='linkindicator' section="artefact.multirecipientnotification"}
              {else}
                {str tag="more..."}
              {/if}
            </a>
          {/if}
        </div>
      {elseif $item->url}
        <a href="{$WWWROOT}{$item->url}">{$item->subject|truncate:60}</a>
      {else}
        {$item->subject|truncate:60}
      {/if}
    </td>
    <td class="userlist">
      {if count($item->tousr) > 1}
        <span id="short{$item->id}">
          <a onclick="return toggleMe('long{$item->id}', 'short{$item->id}');" href="javascript:void(0)">
            <img class="togglebtn" src="{theme_url filename='images/expand.png'}" />
Naomi Guyer's avatar
Naomi Guyer committed
44
            {*<span class="accessible-hidden sr-only">{str tag='clickformore' section='artefact.multirecipientnotification'}</span>*}
Naomi Guyer's avatar
Naomi Guyer committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
          </a>
          {assign var="tousr" value=$item->tousr[0]}
          {if $tousr['link']}<a href="{$tousr['link']}">{/if}
            {$tousr['display']|truncate:$maxnamestrlength}
          {if $tousr['link']}</a>{/if}
        </span>
        <span style="display:none;" id="long{$item->id}">
          <a onclick="return toggleMe('short{$item->id}', 'long{$item->id}');" href="javascript:void(0)">
            <img class="togglebtn" src="{theme_url filename='images/expanded.png'}" />
          </a>
          <span class="recipientlist">
            {foreach from=$item->tousr item=tousr key=break}
              {if ($tousr['link'])}<a href="{$tousr['link']}">{/if}
                  {$tousr['display']|truncate:$maxnamestrlength}
              {if ($tousr['link'])}</a>{/if}
              <br />
            {/foreach}
          </span>
        </span>
      {else}
        {assign var="tousr" value=$item->tousr[0]}
        {if $tousr['link']}<a href="{$tousr['link']}">{/if}
          {$tousr['display']|truncate:$maxnamestrlength}
        {if $tousr['link']}</a>{/if}
      {/if}
    </td>
    <td>{$item->date}</td>
    <td class="center">
      {if $item->table === 'artefact_multirecipient_notification'}
Naomi Guyer's avatar
Naomi Guyer committed
74
        <label class="accessible-hidden sr-only" for="delete-{$item->table}-{$item->id}">{str tag='delete' section='mahara'}</label>
Naomi Guyer's avatar
Naomi Guyer committed
75 76 77 78
        <input type="checkbox" class="tocheckdel" name="delete-{$item->table}-{$item->id}" id="delete-{$item->table}-{$item->id}">
      {/if}
    </td>
  </tr>
Naomi Guyer's avatar
Naomi Guyer committed
79
{/foreach}