summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_main.cgi4
-rwxr-xr-xhttemplate/view/cust_main/notes.html10
-rw-r--r--httemplate/view/cust_main/tickets.html25
-rw-r--r--httemplate/view/svc_acct/tr.html9
-rw-r--r--httemplate/view/svc_mailinglist.cgi71
-rw-r--r--httemplate/view/svc_phone.cgi21
6 files changed, 125 insertions, 15 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 6e024132b..6eea2b09e 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,5 +1,5 @@
<% include('/elements/header.html', {
- 'title' => "Customer View: ". $cust_main->name,
+ 'title' => "Customer: ". $cust_main->name,
'nobr' => 1,
})
%>
@@ -128,7 +128,7 @@ Comments
'actionlabel' => 'Enter customer note',
'cust_main' => $cust_main,
'width' => 616,
- 'height' => 408,
+ 'height' => 538, #575
)
%>
diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html
index 833c92e67..71511dc93 100755
--- a/httemplate/view/cust_main/notes.html
+++ b/httemplate/view/cust_main/notes.html
@@ -11,6 +11,9 @@
% }
<TH CLASS="grid" BGCOLOR="#cccccc">Person</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Note</TH>
+% if ($curuser->access_right('Edit customer note') ) {
+ <TH CLASS="grid" BGCOLOR="#cccccc">&nbsp;</TH>
+% }
</TR>
% my $bgcolor1 = '#eeeeee';
@@ -34,7 +37,7 @@
% ";notenum=$notenum",
% 'actionlabel' => 'Edit customer note',
% 'width' => 616,
-% 'height' => 408,
+% 'height' => 538, #575
% 'frame' => 'top',
% );
% my $clickjs = qq!onclick="$onclick"!;
@@ -50,8 +53,11 @@
&nbsp;<% $note->otaker%>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- &nbsp;<%$note->comments%><% $edit %>
+ &nbsp;<%$note->comments%>
</TD>
+% if($edit) {
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $edit %></TD>
+% }
</TR>
% } #end display notes
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index 167849c76..e1f9a131e 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -1,7 +1,24 @@
+<FORM METHOD="GET" ACTION="<% $new_base %>" NAME="CreateTicketForm">
+<INPUT TYPE="submit" VALUE="Create new ticket">
+in queue
+<SELECT NAME="Queue">
+% my %queues = FS::TicketSystem->queues();
+% foreach my $queueid ( keys %queues ) {
+% #should consider whether the user has ACL to create ticket in each queue
+ <OPTION VALUE="<% $queueid %>"
+ <% $queueid == $new_param{'Queue'} ? 'SELECTED' : '' %>
+ ><% $queues{$queueid} |h %>
+% }
+</SELECT>
+% foreach my $param ( grep { $_ ne 'Queue' } keys %new_param ) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $new_param{$param} |h %>">
+% }
+</FORM>
+<BR>
+
(<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>)
(<A HREF="<% $res_link %>">View resolved tickets for this customer</A>)
-<BR>
-(<A HREF="<% $new_link %>">Create new ticket for this customer</A>)
+<BR><BR>
<% include("/elements/table-grid.html") %>
% my $bgcolor1 = '#eeeeee';
@@ -73,6 +90,10 @@ my $res_link = FS::TicketSystem->href_customer_tickets(
{ 'statuses' => [ 'resolved' ] }
);
+my( $new_base, %new_param ) = FS::TicketSystem->href_params_new_ticket(
+ $cust_main,
+ join(', ', $cust_main->invoicing_list_emailonly ) );
+
my $new_link = FS::TicketSystem->href_new_ticket(
$cust_main,
join(', ', $cust_main->invoicing_list_emailonly )
diff --git a/httemplate/view/svc_acct/tr.html b/httemplate/view/svc_acct/tr.html
deleted file mode 100644
index e2ec7d42f..000000000
--- a/httemplate/view/svc_acct/tr.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<TR>
- <TD ALIGN="right"><% $opt{'label'} %></TD>
- <TD BGCOLOR="#ffffff"><% $opt{'value'} %></TD>
-</TR>
-<%init>
-
-my %opt = @_;
-
-</%init>
diff --git a/httemplate/view/svc_mailinglist.cgi b/httemplate/view/svc_mailinglist.cgi
new file mode 100644
index 000000000..f646a417d
--- /dev/null
+++ b/httemplate/view/svc_mailinglist.cgi
@@ -0,0 +1,71 @@
+<% include('elements/svc_Common.html',
+ 'table' => 'svc_mailinglist',
+ %opt,
+ )
+%>
+<%init>
+
+my %opt = ();
+
+my $info = FS::svc_mailinglist->table_info;
+
+$opt{'name'} = $info->{'name'};
+
+my $fields = $info->{'fields'};
+my %labels = map { $_ => ( ref($fields->{$_})
+ ? $fields->{$_}{'label'}
+ : $fields->{$_}
+ );
+ }
+ keys %$fields;
+
+#$opt{'fields'} = [ keys %$fields ];
+$opt{'fields'} = [
+ 'username',
+ 'domain',
+ 'listname',
+ 'reply_to',
+ 'remove_from',
+ 'reject_auto',
+ 'remove_to_and_cc',
+];
+
+$opt{'labels'} = \%labels;
+
+$opt{'html_foot'} = sub {
+ my $svc_mailinglist = shift;
+ my $listnum = $svc_mailinglist->listnum;
+
+ my $sql = 'SELECT COUNT(*) FROM mailinglistmember WHERE listnum = ?';
+ my $sth = dbh->prepare($sql) or die dbh->errstr;
+ $sth->execute($listnum) or die $sth->errstr;
+ my $num = $sth->fetchrow_arrayref->[0];
+
+ my $add_url = $p."edit/mailinglistmember.html?listnum=$listnum";
+
+ my $add_link = include('/elements/init_overlib.html').
+ include('/elements/popup_link.html',
+ 'action' => $add_url,
+ 'label' => 'add',
+ 'actionlabel' => 'Add list member',
+ 'width' => 392,
+ 'height' => 192,
+ );
+
+ ntable('#cccccc').'<TR><TD>'.ntable('#cccccc',2). qq[
+ <TR>
+ <TD>List members</TD>
+ <TD BGCOLOR="#ffffff">
+ $num members
+ ( <A HREF="${p}search/mailinglistmember.html?listnum=$listnum">view</A>
+ | $add_link )
+ </TD>
+ </TR>
+ </TABLE></TD></TR></TABLE>
+
+ <BR><BR>
+ ]. include('svc_export_settings.html', $svc_mailinglist);
+
+};
+
+</%init>
diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi
index 76ee7397d..75591c747 100644
--- a/httemplate/view/svc_phone.cgi
+++ b/httemplate/view/svc_phone.cgi
@@ -16,6 +16,7 @@
<%init>
my $conf = new FS::Conf;
+my $countrydefault = $conf->config('countrydefault') || 'US';
my @fields = qw( countrycode phonenum );
push @fields, 'domain' if $conf->exists('svc_phone-domain');
@@ -25,6 +26,25 @@ my $html_foot = sub {
my $svc_phone = shift;
###
+ # E911 Info
+ ###
+
+ my $e911 =
+ 'E911 Information'.
+ &ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
+ '<TR><TD>Location</TD>'.
+ '<TD BGCOLOR="#FFFFFF">'.
+ $svc_phone->location_label( 'join_string' => '<BR>',
+ 'double_space' => ' &nbsp; ',
+ 'escape_function' => \&encode_entities,
+ 'countrydefault' => $countrydefault,
+ ).
+ '</TD></TR>'.
+ '</TABLE></TD></TR></TABLE>'.
+ '<BR>'
+ ;
+
+ ###
# Devices
###
@@ -123,6 +143,7 @@ my $html_foot = sub {
# concatenate & return
###
+ $e911.
$devices.
join(' | ', @links ). '<BR>'.
join(' | ', @ilinks). '<BR>';