OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-registry                 Date:   19-Jul-2006 00:23:10
  Branch: HEAD                             Handle: 2006071823230900

  Modified files:
    openpkg-registry        registry-ui.pl

  Log:
    support mainpage with site specific configurable content

  Summary:
    Revision    Changes     Path
    1.80        +60 -1      openpkg-registry/registry-ui.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-registry/registry-ui.pl
  ============================================================================
  $ cvs diff -u -r1.79 -r1.80 registry-ui.pl
  --- openpkg-registry/registry-ui.pl   18 Jul 2006 18:17:16 -0000      1.79
  +++ openpkg-registry/registry-ui.pl   18 Jul 2006 22:23:09 -0000      1.80
  @@ -107,7 +107,31 @@
       #   entry page
       #
       page {
  -        default ""; /* "", dropxml, login, association, logout */
  +        default "main"; /* "", main, dropxml, login, association, logout */
  +        main q{
  +            <h3>Welcome to the OpenPKG Registry main entrance.</h3>
  +            The registry collects information about instances and 
packages.<br>
  +            <b>NOTICE:</b> Version 0.6 introduced uploading package 
information by default.<br>
  +            Read details in the manpage 
<code>openpkg&nbsp;man&nbsp;register</code><br>
  +            Find more information in the manpage under <code>--data</code> 
option and <code>OPENPKG_PREP</code> file.
  +            <p/>
  +            Use the following software to get the <code>openpkg 
register</code> command.
  +            <p/>
  +            <ul>
  +                <li>OpenPKG CURRENT<br>
  +                    <i>embedded in bootstrap</i></li>
  +                <li>OpenPKG 2-STABLE<br>
  +                    <i>embedded in bootstrap</i></li>
  +                <li>OpenPKG 2-STABLE-20060622 SNAPSHOT<br>
  +                    <i>embedded in bootstrap</i></li>
  +                <li>OpenPKG 2.5 RELEASE<br>
  +                    <i>embedded in bootstrap</i></li>
  +                <li>OpenPKG 2.4, 2.3, 2.2, 2.1, 2.0 RELEASE<br>
  +                    <a href="http://www.openpkg.org/download/";>Download</a> 
and install the CURRENT openpkg-registry package.</li>
  +                <li>OpenPKG 1.x<br>
  +                    <i>unsupported</i></li>
  +            </ul>
  +        };
       };
       
       ##   status line
  @@ -333,6 +357,9 @@
       elsif ($requestedpage eq "ase") {
           &viewemptypage();
       }
  +    elsif ($requestedpage eq "main") {
  +        &viewmainpage();
  +    }
       else {
           $cgi->delete_all();
           &viewemptypage();
  @@ -397,6 +424,7 @@
           $head .= "      <table class=\"menu\">\n";
           $head .= "          <tr>\n";
           $td = 0;
  +        $head .= "              " . &viewmainform() . "\n";        $td++;
           $head .= "              " . &viewdropxmlform() . "\n";     $td++;
           $head .= "              " . &viewloginform() . "\n";       $td++;
           $head .= "              " . &viewassociationform() . "\n"; $td++;
  @@ -1166,6 +1194,25 @@
       $response->{message}->undivert(0);
   }
   
  +sub viewmainpage ()
  +{
  +    my ($html, $username);
  +
  +    #   HTTP header
  +    $response->{header}->{type} = 'text/html';
  +    $response->{header}->{expires} = '+1s';
  +
  +    $html = '';
  +    $html .= &viewhtmlhead(-menu);
  +    $html .= $cfg->{page}->{main};
  +    $html .= &viewhtmltail();
  +
  +    #   HTTP message
  +    $response->{message}->divert("message");
  +    $response->{message}->append(&canvas($html));
  +    $response->{message}->undivert(0);
  +}
  +
   sub viewlogin ()
   {
       my ($html, $username);
  @@ -1284,6 +1331,18 @@
       $response->{message}->undivert(0);
   }
   
  +sub viewmainform ()
  +{
  +    my $html;
  +    $html = '';
  +    $html .= '<td>';
  +    $html .= $cgi->start_form(-action => "$myurl?page=main");
  +    $html .= "<div>" . $cgi->submit('submit','main') . "</div>";
  +    $html .= $cgi->end_form;
  +    $html .= '</td>';
  +    return $html;
  +}
  +
   sub viewdropxmlform ()
   {
       my $html;
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to