#!/usr/bin/perl -w
# -*- perl -*-
use P4CGI ;
use strict ;
#
#################################################################
# CONFIGURATION INFORMATION
# All config info should be in P4CGI.pm
#
#################################################################
#
# List all branches
#
#################################################################
my $SORTBY=&P4CGI::cgi()->param("SORTBY") ;
$SORTBY="DATE" unless defined $SORTBY ;
my $otherSort ;
if($SORTBY eq "NAME") {
$otherSort = &P4CGI::ahref("SORTBY=DATE",
"Sort by date") ;
}
else {
$otherSort = &P4CGI::ahref("SORTBY=NAME",
"Sort by name") ;
} ;
# Print header
print "",
&P4CGI::start_page("List of branches",
&P4CGI::ul_list("<b>Name</b> -- view branch info",
$otherSort)) ;
# Get list of all brances
local *P4 ;
print "",
&P4CGI::start_table(""),
&P4CGI::table_header("Name/view branch","Updated","Description") ;
&P4CGI::p4call(*P4, "branches" );
my %rows ;
while(<P4>) {
if(/^Branch (\S+)\s+(\S+)\s+\'([^\']*)\'/) {
my ($name,$cdate,$desc) = ($1,$2,$3) ;
$desc = &P4CGI::fixSpecChar($desc) ;
$name = &P4CGI::ahref(-url => "branchView.cgi" ,
"BRANCH=$name",
"HELP=View branch info",
$name) ;
my $s = $SORTBY eq "NAME"? uc("$name $cdate") : "$cdate $name" ;
$rows{$s} = &P4CGI::table_row($name,$cdate,$desc) ;
}
}
my $s ;
if($SORTBY eq "NAME") {
foreach $s (sort keys %rows) {
print $rows{$s} ;
}
}
else {
foreach $s (sort { $b cmp $a } keys %rows) {
print $rows{$s} ;
}
} ;
print "",
&P4CGI::end_table(""),
&P4CGI::end_page("") ;
#
# That's all folks
#
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #6 | 4973 | Fredric Fredricson |
P4DB: Worked around some IE CSS-bugs. Improved page layout for branch, client and job lists. |
||
| #5 | 4239 | Fredric Fredricson | P4DB: Improved branch list and fixed text in label list | ||
| #4 | 4046 | Fredric Fredricson |
P4DB: First submit for 3.1. * Removed frame-stuff and some related files * Added new page header * Started update of documentation * Changed a lot of CGI:s to conform to new "look and feel" Still a lot to do: - clean up stuff (especially the javascript) - Fix the file list to use new annotate-command - Clean up and document css-file - and more....... |
||
| #3 | 2875 | Fredric Fredricson | P4DB 3.0 first beta... | ||
| #2 | 1920 | Fredric Fredricson |
P4DB: Mainly some user interface fixes: * Added a small arrow that points to selection in list of options * Added tooltip help * Added user prefereces to turn the above off (or on) * Some other user interface fixes And fixed a bug in jobList.cgi and some minor bugs in label and branch viewers. |
||
| #1 | 1638 | Fredric Fredricson | P4DB: Added all (I think) files for P4DB |