[% META title = 'Desktop' %]

    <div id="headimg">
      <img src="/grafik/area.jpg" width="869" height="69" alt="" />
    </div>
    <div id="headtxt">[% Catalyst.loc('Welcome to your personal desktop.') %]</div>

    <div id="main">

      <div id="topmsg">
        <p> [% messages.topmsg %] </p>
      </div>
      <div id="toperr">
        <p> [% messages.toperr %] </p>
        <p> [% messages.prov_error %] </p>
      </div>

      <div id="spalten211">

        <div class="spalte1">

          <h3>[% Catalyst.loc('recent calls') %]</h3>

          <p class="anruflistesymbole">
            <img src="/grafik/anruf_ein_small.gif" width="14" height="13" alt=""> [% Catalyst.loc('incoming') %] 
            <img src="/grafik/anruf_aus_small.gif" width="14" height="13" alt=""> [% Catalyst.loc('outgoing') %] 
            <img src="/grafik/anruf_cf_small.gif" width="14" height="13" alt=""> [% Catalyst.loc('forwarded') %] 
          </p>

          <table class="anrufliste">

            <tr class="anruflisteheader">
              <td colspan="5" />
            </tr>

            [% IF ! subscriber.call_list %]
            <tr class="alt">
              <td colspan="5" class="anrufnummer">[% Catalyst.loc('There are no calls recorded.') %]</td>
            </tr>
            [% END %]

            [% c2di = 0 %]
            [% FOREACH callentry = subscriber.call_list %]
	    [% c2di = c2di + 1 %]
            <tr class="[% callentry.background %]">
              <td class="anruftyp"><img src="/grafik/[% callentry.direction_icon %]" width="14" height="13" alt=""></td>
              <td class="anrufnummer">
                [% IF callentry.is_voicebox %]
                  [% Catalyst.loc('Voicebox') %]
                [% ELSIF callentry.is_fax2mail %]
                  [% Catalyst.loc('Fax2Mail') %]
                [% ELSIF callentry.is_reminder %]
                  [% Catalyst.loc('Reminder') %]
                [% ELSE %]
                  [% callentry.partner %]
                [% END %]
              </td>
	      <td class="anrufanruf">
                <div class="yui-skin-sam" id="c[%c2di%]">
                  <img src="/grafik/call.gif" width="12" height="14" onclick="cl_pop('c[%c2di%]','[%callentry.partner%]')"
                       title="[% Catalyst.loc('show actions') %]" />
                </div>
              </td>
              <td class="anrufdauer">[% callentry.duration %]</td>
              <td class="anrufzeit">[% callentry.date %]</td>
            </tr>
            [% END %]

          </table>

          [% IF Catalyst.config.main_menu.calllist %]
          <p>
            <a href="/calllist" class="link">[% Catalyst.loc('all calls') %]</a>
          </p>
          [% END %]

        </div>
        <div class="spalte2">

          [% IF show_cash_balance OR show_free_time_balance %]
          <h3>[% Catalyst.loc('Account Balance') %]</h3>
          <div class="status">
            <p>
              [% IF show_cash_balance %]
                <strong>[% Catalyst.loc('[_1] [_2] credit', subscriber.account.billing_profile.data.currency, subscriber.account.cash_balance) %]</strong><br />
              [% END%]
              [% IF show_free_time_balance %]
                <strong>[% Catalyst.loc('[_1] free minutes', subscriber.account.free_time_balance) %]</strong><br />
              [% END %]
            </p>
          </div>
          [% END %]

          <h3>[% Catalyst.loc('Clients') %]</h3>
          <p class="[% subscriber.contacts.size > 0 ? 'reginforeg' : 'reginfonoreg' %]">
            [% Catalyst.loc('[_1] client devices registered', subscriber.contacts.size) %]
          </p>
          <br clear="all" />

        [% IF Catalyst.config.main_menu.voicebox  and Catalyst.session.user.data.sn %]
          <h3>[% Catalyst.loc('New Voicemails') %]</h3>
          [% IF subscriber.voicemail_list %]
            <ul class="voicemailliste">
            [% FOREACH voicemail = subscriber.voicemail_list %]
                [% c2di = c2di + 1 %]
                <li class="[% voicemail.background %]">
                  <span class="voicemailnummer">
                    <a href="/voicebox/listen?mailid=[% voicemail.id %]" title="[% Catalyst.loc('listen to voicemail') %]">
                      <img src="/grafik/voicemail.gif" width="20" height="20" alt="voicemail" /> 
                      <strong>[% voicemail.partner %]</strong>
                    </a>
                    [% IF voicemail.partner_info %]
                      <span>([% voicemail.partner_info %])</span>
                    [% END %]
                  </span>
                  <span class="anrufanruf">
                    <div class="yui-skin-sam" id="ca[%c2di%]">
                      <img src="/grafik/call.gif" width="12" height="14"
                           onclick="cl_pop('ca[%c2di%]','[% voicemail.partner_number %]')"
                           title="[% Catalyst.loc('show actions') %]" />
                    </div>
                  </span>
                </li>
            [% END %]
            </ul>
          [% ELSE %]
            <p class="rufumleitunginfo">[% Catalyst.loc('no new voicemails') %]</p>
          [% END %]
          <p>
            <a href="/voicebox" class="link">[% Catalyst.loc('all voicemails') %]</a>
          </p>
          <br clear="all" />
        [% END %]

        </div>
        <div class="spalte3">

        [% IF Catalyst.config.main_menu.callforward %]
          <h3>[% Catalyst.loc('Call Forwards') %]</h3>

          <p class="rufumleitung">
            [% IF subscriber.fw.active %]
              <img src="/grafik/umleitung_on.gif" width="42" height="43" alt="" />
              [% Catalyst.loc('call forward active') %]
            [% ELSE %]
              <img src="/grafik/umleitung_off.gif" width="42" height="43" alt="" />
              [% Catalyst.loc('call forward inactive') %]
            [% END %]
          </p>
          <p style="clear:left">
            <a href="/callforward" class="link">[% Catalyst.loc('view settings') %]</a>
          </p>
          <br clear="all" />
        [% END %]

        [% IF Catalyst.config.main_menu.reminder %]
          <h3>[% Catalyst.loc('Reminder') %]</h3>

          <p class="rufumleitung">
            [% IF subscriber.reminder.time %]
              <img src="/grafik/reminder_on.gif" width="34" height="43" alt="" />
              [% Catalyst.loc('reminder is active') %]
            [% ELSE %]
              <img src="/grafik/reminder_off.gif" width="34" height="43" alt="" />
              [% Catalyst.loc('no reminder set') %]
            [% END %]
          </p>
          <p style="clear:left">
            <a href="/reminder" class="link">[% Catalyst.loc('view settings') %]</a>
          </p>
          <br clear="all" />
        [% END %]

        </div>

      </div>

    </div><br clear="all" />
