some HTMl cleanups


			
			
				2.0@2770
			
			
		
Daniel Tiefnig 16 years ago
parent f66be94213
commit 52bbc3911b

@ -16,7 +16,7 @@ use XML::Simple;
use Catalyst::Log::Log4perl;
use Catalyst qw/ConfigLoader Static::Simple Unicode
use Catalyst qw/-Debug ConfigLoader Static::Simple Unicode
Authentication Authentication::Store::Minimal Authentication::Credential::Password
Session Session::Store::FastMmap Session::State::Cookie
/;

@ -31,13 +31,39 @@ sub index : Private {
return 1 unless $c->model('Provisioning')->get_usr_preferences($c);
return 1 unless $c->model('Provisioning')->get_call_list($c);
return 1 if $c->session->{user}{admin} and ! $c->model('Provisioning')->get_account_balance($c);
return 1 unless $c->model('Provisioning')->get_voicemails_by_limit($c);
if($c->session->{user}{admin}) {
$c->stash->{subscriber}{account}{cash_balance} = sprintf "%.2f", $c->session->{user}{account}{cash_balance} / 100;
$c->stash->{subscriber}{account}{free_time_balance} = int($c->session->{user}{account}{free_time_balance} / 60);
my $acct;
return 1 unless $c->model('Provisioning')->call_prov($c, 'billing', 'get_voip_account_by_id',
{ id => $c->session->{user}{data}{account_id} },
\$acct
);
my $bilprof = {};
if(eval { defined $$acct{billing_profile} }) {
return 1 unless $c->model('Provisioning')->call_prov($c, 'billing', 'get_billing_profile',
{ handle => $$acct{billing_profile} },
\$bilprof
);
}
return 1 unless $c->model('Provisioning')->get_account_balance($c);
# set cash balance if account or billing profile depends on or has some credits
if($$bilprof{data}{prepaid}
or $$bilprof{data}{interval_free_cash}
or $c->session->{user}{account}{cash_balance})
{
$c->stash->{subscriber}{account}{cash_balance} = sprintf "%.2f", $c->session->{user}{account}{cash_balance} / 100;
$c->stash->{show_cash_balance} = 1;
}
# set free time balance if account or billing profile has some free time
if($$bilprof{data}{interval_free_time}
or $c->session->{user}{account}{free_time_balance})
{
$c->stash->{subscriber}{account}{free_time_balance} = int($c->session->{user}{account}{free_time_balance} / 60);
$c->stash->{show_free_time_balance} = 1;
}
}
$c->stash->{subscriber}{call_list} = csc::Utils::prepare_call_list($c, $c->session->{user}{call_list}, 0)
if @{$c->session->{user}{call_list}};
delete $c->session->{user}{call_list} if exists $c->session->{user}{call_list};

@ -6,12 +6,6 @@
<div id="main">
<!-- <div id="bigmessage">
<p>
Seit Ihrem letzten Login haben Sie <a href="voicemail" class="link"><strong>3 neue Voicemails</strong></a> erhalten und <a href="anrufe_verpasst" class="link"><strong>2 Anrufe verpasst</strong></a>.
</p>
</div>
-->
<div id="topmsg">
<p> [% messages.topmsg %] </p>
</div>
@ -26,24 +20,6 @@
<h3>Letzte 10 Telefonate</h3>
<!-- <form class="anruflistenummer" action="">
<select>
<option>Alle Telefonnummern</option>
<option>0043 / 1 / 244 56 78 - 10</option>
<option>0043 / 1 / 244 56 78 - 20</option>
<option>0043 / 1 / 244 56 78 - 30</option>
<option>0043 / 1 / 244 56 78 - 40</option>
<option>0043 / 1 / 244 56 78 - 50</option>
</select>
</form>
-->
<!-- <p class="anruflisteordnen">
<a href="#" class="on"><img src="/grafik/anruf_alle_small.gif" width="14" height="13" alt="alle Anrufe"> alle</a>
<a href="#"><img src="/grafik/anruf_ein_small.gif" width="14" height="13" alt="eingehender Anruf"> eingehende</a>
<a href="#"><img src="/grafik/anruf_aus_small.gif" width="14" height="13" alt="ausgehender Anruf"> ausgehende</a>
<a href="#"><img src="/grafik/anruf_error_small.gif" width="14" height="13" alt="Anruf in Abwensenheit"> abwesend</a>
</p>
-->
<p class="anruflistesymbole">
<img src="/grafik/anruf_ein_small.gif" width="14" height="13" alt="eingehender Anruf"> eingehend
<img src="/grafik/anruf_ein_err_small.gif" width="14" height="13" alt="eingehender Anruf"> abwesend
@ -52,29 +28,6 @@
</p>
<table class="anrufliste">
<!-- <tr class="anruflisteheader">
<td colspan="5">
<h3>Heute</h3>
</td>
</tr>
<tr class="alt">
<td class="anruftyp"><img src="/grafik/anruf_ein_small.gif" width="14" height="13" alt="eingehender Anruf"></td>
<td class="anrufperson">Peter Alexander</td>
<td class="anrufnummer">0043 / 1 / 123 45 67</td>
<td class="anrufanruf">
<a href="#" title="Jetzt anrufen" class="call"><img src="/grafik/call.gif" width="12" height="14" alt="Jetzt anrufen" /></a>
<div class="functionpopup">
<ul>
<li><a href="#">anrufen</a></li>
<li><a href="#">SMS senden</a></li>
<li><a href="#">Fax senden</a></li>
<li><a href="#">als Kontakt anlegen</a></li>
</ul>
</div>
</td>
<td class="anrufzeit">Heute, 09:14</td>
</tr>
-->
<tr class="anruflisteheader">
<td colspan="5" />
@ -111,12 +64,16 @@
</div>
<div class="spalte2">
[% IF Catalyst.session.user.admin %]
[% IF show_cash_balance OR show_free_time_balance %]
<h3>Kontostatus</h3>
<div class="status">
<p>
<strong>&euro; [% subscriber.account.cash_balance %] Guthaben</strong><br />
<strong>[% subscriber.account.free_time_balance %] Freiminuten</strong><br />
[% IF show_cash_balance %]
<strong>&euro; [% subscriber.account.cash_balance %] Guthaben</strong><br />
[% END%]
[% IF show_free_time_balance %]
<strong>[% subscriber.account.free_time_balance %] Freiminuten</strong><br />
[% END %]
</p>
</div>
[% END %]
@ -127,30 +84,6 @@
</p>
<br clear="all" />
</div>
<div class="spalte3">
<h3>Rufumleitung</h3>
<p class="rufumleitung">
[% IF subscriber.fw.active %]
<img src="/grafik/umleitung_on.gif" width="42" height="43" alt="" />
Rufumleitung aktiv
[% ELSE %]
<img src="/grafik/umleitung_off.gif" width="42" height="43" alt="" />
Rufumleitung deaktiviert
[% END %]
</p>
<!--
<p class="rufumleitunginfo">
</p>
-->
<p style="clear:left">
<a href="/callforward" class="link">Einstellungen ändern</a>
</p>
<br clear="all" />
<h3>Neue Voicemails</h3>
[% IF subscriber.voicemail_list %]
<ul class="voicemailliste">
@ -185,6 +118,25 @@
<br clear="all" />
</div>
<div class="spalte3">
<h3>Rufumleitung</h3>
<p class="rufumleitung">
[% IF subscriber.fw.active %]
<img src="/grafik/umleitung_on.gif" width="42" height="43" alt="" />
Rufumleitung aktiv
[% ELSE %]
<img src="/grafik/umleitung_off.gif" width="42" height="43" alt="" />
Rufumleitung deaktiviert
[% END %]
</p>
<p style="clear:left">
<a href="/callforward" class="link">Einstellungen ändern</a>
</p>
<br clear="all" />
</div>
</div>

Loading…
Cancel
Save