diff --git a/debian/changelog b/debian/changelog index d79f089..b60fba2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -sipwise-www-admin (2.0.0) UNRELEASED; urgency=low +sipwise-www-admin (2.0.0) unstable; urgency=low * speed dial * LNP database handling @@ -11,9 +11,11 @@ sipwise-www-admin (2.0.0) UNRELEASED; urgency=low * fax number configuration * reminder call configuration * new user preferences - * minor interface bugfixes + * many minor interface bugfixes + * lots of interface-quick-help title strings + * default configuration files - -- Daniel Tiefnig Mon, 01 Feb 2010 02:08:50 +0100 + -- Daniel Tiefnig Wed, 10 Mar 2010 15:15:41 +0100 sipwise-www-admin (1.2.1) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 47efead..673ac69 100755 --- a/debian/rules +++ b/debian/rules @@ -39,6 +39,8 @@ install: build cp -a lib debian/sipwise-www-admin/usr/local/admin/ cp -a root debian/sipwise-www-admin/usr/local/admin/ install -m 644 admin.yml debian/sipwise-www-admin/usr/local/admin/ + install -m 644 etc/admin.conf debian/sipwise-www-admin/usr/local/etc/ + install -m 644 etc/apache.site debian/sipwise-www-admin/usr/share/doc/sipwise-www-admin/ # we don't need admin_create.pl and admin_test.pl: install -m 755 script/admin_cgi.pl debian/sipwise-www-admin/usr/local/admin/script/ install -m 755 script/admin_fastcgi.pl debian/sipwise-www-admin/usr/local/admin/script/ diff --git a/lib/admin/Controller/account.pm b/lib/admin/Controller/account.pm index a8ee201..6dbe673 100644 --- a/lib/admin/Controller/account.pm +++ b/lib/admin/Controller/account.pm @@ -164,6 +164,17 @@ sub detail : Local { or ref $c->session->{voip_account}{subscribers} ne 'ARRAY' or $#{$c->session->{voip_account}{subscribers}} == -1; + foreach my $vas (eval { @{$c->session->{voip_account}{subscribers}} }) { + my $regcon; + return unless $c->model('Provisioning')->call_prov( $c, 'voip', 'get_registered_contacts', + { username => $$vas{username}, + domain => $$vas{domain}, + }, + \$regcon + ); + $$vas{registered_contacts} = join ", ", map { $$_{user_agent} } @$regcon if eval { @$regcon }; + } + $c->stash->{account} = $c->session->{voip_account}; $c->stash->{account}{is_locked} = 1 if $c->session->{voip_account}{status} eq 'locked'; diff --git a/lib/admin/Controller/subscriber.pm b/lib/admin/Controller/subscriber.pm index 71291d7..a51ad79 100644 --- a/lib/admin/Controller/subscriber.pm +++ b/lib/admin/Controller/subscriber.pm @@ -530,7 +530,6 @@ sub preferences : Local { if(ref $c->session->{voip_preferences} eq 'ARRAY') { - my $cftarget; my @stashprefs; foreach my $pref (@{$c->session->{voip_preferences}}) { @@ -558,19 +557,8 @@ sub preferences : Local { $$preferences{$$pref{attribute}} = 'voicebox'; } elsif($$preferences{$$pref{attribute}} =~ /\@fax2mail\.local$/) { $$preferences{$$pref{attribute}} = 'fax2mail'; - } else { - $$preferences{$$pref{attribute}} =~ s/^sip://i; - if($$preferences{$$pref{attribute}} =~ /^\+?\d+$/) { - my $scc = $c->session->{subscriber}{cc}; - $$preferences{$$pref{attribute}} =~ s/^\+*/+/; - $$preferences{$$pref{attribute}} =~ s/^\+$scc/0/; - } } } - } elsif($$pref{attribute} eq 'cli') { - if(defined $$preferences{$$pref{attribute}} and length $$preferences{$$pref{attribute}}) { - $$preferences{$$pref{attribute}} =~ s/^sip://i; - } } elsif(!$c->stash->{ncos_levels} and ($$pref{attribute} eq 'ncos' or $$pref{attribute} eq 'adm_ncos')) { my $ncoslvl; return unless $c->model('Provisioning')->call_prov( $c, 'billing', 'get_ncos_levels', @@ -578,6 +566,8 @@ sub preferences : Local { \$ncoslvl ); $c->stash->{ncos_levels} = $ncoslvl if eval { @$ncoslvl }; + } elsif($$pref{attribute} eq 'block_in_list' or $$pref{attribute} eq 'block_out_list') { + eval { @{$$preferences{$$pref{attribute}}} = map { s/^([1-9])/+$1/; $_ } @{$$preferences{$$pref{attribute}}} }; } push @stashprefs, @@ -600,12 +590,6 @@ sub preferences : Local { my @used_default_speed_dial_slots = (); if (eval { @$speed_dial_slots }) { foreach my $sdentry (sort {$a->{id} <=> $b->{id}} @$speed_dial_slots) { - $$sdentry{destination} =~ s/^sip://i; - if($$sdentry{destination} =~ /^\+?\d+$/) { - my $scc = $c->session->{subscriber}{cc}; - $$sdentry{destination} =~ s/^\+*/+/; - $$sdentry{destination} =~ s/^\+$scc/0/; - } push @{$c->stash->{speed_dial_slots}}, { id => $$sdentry{id}, number => $i++, label => 'Slot ' . $$sdentry{slot} . ': ' . $$sdentry{destination} @@ -624,18 +608,6 @@ sub preferences : Local { } } - if(ref $c->session->{subscriber}{fax_preferences} eq 'HASH' and - ref $c->session->{subscriber}{fax_preferences}{destinations} eq 'ARRAY') - { - for(@{$c->session->{subscriber}{fax_preferences}{destinations}}) { - if($$_{destination} =~ /^\+?\d+$/) { - my $scc = $c->session->{subscriber}{cc}; - $$_{destination} =~ s/^\+*/+/; - $$_{destination} =~ s/^\+$scc/0/; - } - } - } - $c->stash->{show_faxpass} = $c->request->params->{show_faxpass}; $c->stash->{edit_preferences} = $c->request->params->{edit_preferences}; $c->stash->{edit_voicebox} = $c->request->params->{edit_voicebox}; @@ -1231,13 +1203,6 @@ sub edit_speed_dial_slots : Local { $c->session->{messages}{updateerr}) : undef; #delete $c->session->{updateerrmsg}; - } else { - $$sdentry{destination} =~ s/^sip://i; - if($$sdentry{destination} =~ /^\+?\d+$/) { - my $scc = $c->session->{subscriber}{cc}; - $$sdentry{destination} =~ s/^\+*/+/; - $$sdentry{destination} =~ s/^\+$scc/0/; - } } push @{$c->stash->{speed_dial_slots}}, { id => $$sdentry{id}, number => $i++, @@ -1502,11 +1467,6 @@ sub edit_destlist : Local { my $bg = ''; my $i = 1; foreach my $entry (sort { $$a{destination} cmp $$b{destination} } @$destlist) { - if($$entry{destination} =~ /^\+?\d+$/) { - my $scc = $c->session->{subscriber}{cc}; - $$entry{destination} =~ s/^\+*/+/; - $$entry{destination} =~ s/^\+$scc/0/; - } push @{$c->stash->{list_data}}, { %$entry, background => $bg ? '' : 'tr_alt', id => $i++, diff --git a/root/css/admin.css b/root/css/admin.css index 2ed3a94..9e30d40 100644 --- a/root/css/admin.css +++ b/root/css/admin.css @@ -91,10 +91,11 @@ ul#topsubmenu { } #topsubmenu a:hover { - color: #D60808; + color: #D60808 !important; text-decoration: none; } #topsubmenu a:after { + margin-left: 0px !important; content: "" !important; } @@ -185,6 +186,7 @@ ul#topsubmenu { text-decoration: underline; } #contentplace .postlink label:after { + margin-left: 1px; content: "\bb"; font-weight: bold; } @@ -255,11 +257,13 @@ ul#topsubmenu { /* print ">>" after hyper refs */ #contentplace a:after { + margin-left: 1px; content: "\bb"; font-weight: bold; } /* no ">>" in heading */ #contentplace h3 a:after { + margin-left: 0px; content: ""; } #contentplace a.force_arrows:after { @@ -279,6 +283,9 @@ ul#topsubmenu { margin: 0 8px 0 0; font-weight: bold; } +#contentplace .actions a#lock:after { + content: "\ab"; +} /* colors for disabled input fields */ #contentplace .disabled { @@ -394,6 +401,7 @@ ul#topsubmenu { } /* no ">>" in pagination next / previous */ #contentplace .pagination li.nextpage a:after { + margin-left: 0px; content: ""; } diff --git a/root/tt/account_detail.tt b/root/tt/account_detail.tt index 822ade4..c14d71c 100644 --- a/root/tt/account_detail.tt +++ b/root/tt/account_detail.tt @@ -56,7 +56,8 @@ CustomerID: [% IF edit_account %] - + [% ELSE %] [% IF account.customer_id %] [% account.customer_id %] @@ -135,7 +136,11 @@ € [% account.balance.cash_balance %] [% IF edit_balance %] - + [% END %] @@ -145,7 +150,12 @@ [% account.balance.free_time_balance %] s [% IF edit_balance %] - + [% END %] @@ -176,6 +186,11 @@
[% IF account.subscribers %] + + + + + [% FOREACH subscriber = account.subscribers %] - + [% END %]
SIP URIPrimary NumberRegistered Devices
@@ -187,7 +202,7 @@ [% END %] [% IF subscriber.sn %]+[% subscriber.cc %] [% subscriber.ac %] [% subscriber.sn %][% END %][% subscriber.uuid %][% subscriber.registered_contacts %]
diff --git a/root/tt/admin.tt b/root/tt/admin.tt index a87e5a4..a7e0c69 100644 --- a/root/tt/admin.tt +++ b/root/tt/admin.tt @@ -20,28 +20,33 @@ [% admin.login %] [% IF admin.login == edit_admin %] -
+ - + + [% IF erefill.is_master or !erefill && admin.is_master %]checked="checked" [% END %] + title="if checked, the administrator can create and edit other administrator accounts" /> + [% IF erefill.is_active or !erefill && admin.is_active %]checked="checked" [% END %] + title="if checked, the administrator account is active and may be used" /> + [% IF erefill.read_only or !erefill && admin.read_only %]checked="checked" [% END %] + title="if checked, the administrator may not change any data" /> + [% IF erefill.show_passwords or !erefill && admin.show_passwords %]checked="checked" [% END %] + title="if checked, the new administrator may view subscriber passwords" />