Changeset 2265

Show
Ignore:
Timestamp:
05/20/05 22:15:17 (19 years ago)
Author:
jerome
Message:

The destination URL for a click on the logos in CGI scripts is now
configurable.
A copyright message was added to the page's footer.

Location:
pykota/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/dumpykota.cgi

    r2262 r2265  
    4444  </head> 
    4545  <body> 
    46     <form action="dumpykota.cgi" method="GET"> 
    47       <table> 
    48         <tr> 
    49           <td> 
    50             <p> 
    51               <a href="http://www.librelogiciel.com/software/"><img src="%s?version=%s" alt="PyKota's Logo" /></a> 
    52               <br /> 
    53               <a href="http://www.librelogiciel.com/software/">PyKota v%s</a> 
    54             </p> 
    55           </td> 
    56           <td colspan="2"> 
    57             <h1>%s</h1> 
    58           </td> 
    59         </tr> 
    60         <tr> 
    61           <td colspan="3" align="center"> 
    62             <input type="submit" name="report" value="%s" /> 
    63           </td> 
    64         </tr> 
    65       </table> 
    66       <p> 
    67         %s 
    68       </p>""" 
     46    <p> 
     47      <form action="dumpykota.cgi" method="GET"> 
     48        <table> 
     49          <tr> 
     50            <td> 
     51              <p> 
     52                <a href="%s"><img src="%s?version=%s" alt="PyKota's Logo" /></a> 
     53                <br /> 
     54                <a href="%s">PyKota v%s</a> 
     55              </p> 
     56            </td> 
     57            <td colspan="2"> 
     58              <h1>%s</h1> 
     59            </td> 
     60          </tr> 
     61          <tr> 
     62            <td colspan="3" align="center"> 
     63              <input type="submit" name="report" value="%s" /> 
     64            </td> 
     65          </tr> 
     66        </table> 
     67        <p> 
     68          %s 
     69        </p>""" 
    6970     
    7071footer = """ 
    71       <table> 
    72         <tr> 
    73           <td colspan="3" align="center"> 
    74             <input type="submit" name="report" value="%s" /> 
    75           </td> 
    76         </tr> 
    77       </table>   
    78     </form> 
     72        <table> 
     73          <tr> 
     74            <td colspan="3" align="center"> 
     75              <input type="submit" name="report" value="%s" /> 
     76            </td> 
     77          </tr> 
     78        </table>   
     79      </form> 
     80    </p>   
     81    <hr width="25%%" /> 
     82    <p> 
     83      <font size="-2"> 
     84        <a href="http://www.librelogiciel.com/software/">%s</a> 
     85        &copy; 2003, 2004, 2005 %s  
     86      </font> 
     87    </p> 
    7988  </body> 
    8089</html>"""   
     
    8594        """Displays the dumper interface.""" 
    8695        global header, footer 
    87         print header % (self.getCharset(), _("PyKota Data Dumper"), self.config.getLogoURL(), version.__version__, version.__version__, _("PyKota Data Dumper"), _("Dump"), _("Please click on the above button")) 
     96        print header % (self.getCharset(), _("PyKota Data Dumper"), \ 
     97                        self.config.getLogoLink(), \ 
     98                        self.config.getLogoURL(), version.__version__, \ 
     99                        self.config.getLogoLink(), \ 
     100                        version.__version__, _("PyKota Data Dumper"), \ 
     101                        _("Dump"), _("Please click on the above button")) 
    88102        print self.htmlListDataTypes(self.options.get("data", ""))  
    89103        print "<br />" 
     
    91105        print "<br />" 
    92106        print self.htmlFilterInput(" ".join(self.arguments)) 
    93         print footer % _("Dump") 
     107        print footer % (_("Dump"), version.__doc__, version.__author__) 
    94108         
    95109    def htmlListDataTypes(self, selected="") :     
  • pykota/trunk/cgi-bin/printquota.cgi

    r2262 r2265  
    4444  </head> 
    4545  <body> 
    46     <form action="printquota.cgi" method="POST"> 
    47       <table> 
    48         <tr> 
    49           <td> 
    50             <p> 
    51               <a href="http://www.librelogiciel.com/software/"><img src="%s?version=%s" alt="PyKota's Logo" /></a> 
    52               <br /> 
    53               <a href="http://www.librelogiciel.com/software/">PyKota v%s</a> 
    54             </p> 
    55           </td> 
    56           <td colspan="2"> 
    57             <h1>%s</h1> 
    58           </td> 
    59         </tr> 
    60         <tr> 
    61           <td colspan="3" align="center"> 
    62             <input type="submit" name="report" value="%s" /> 
    63           </td> 
    64         </tr> 
    65       </table>""" 
     46    <p> 
     47      <form action="printquota.cgi" method="POST"> 
     48        <table> 
     49          <tr> 
     50            <td> 
     51              <p> 
     52                <a href="%s"><img src="%s?version=%s" alt="PyKota's Logo" /></a> 
     53                <br /> 
     54                <a href="%s">PyKota v%s</a> 
     55              </p> 
     56            </td> 
     57            <td colspan="2"> 
     58              <h1>%s</h1> 
     59            </td> 
     60          </tr> 
     61          <tr> 
     62            <td colspan="3" align="center"> 
     63              <input type="submit" name="report" value="%s" /> 
     64            </td> 
     65          </tr> 
     66        </table>""" 
    6667     
    6768footer = """ 
    68       <table> 
    69         <tr> 
    70           <td colspan="3" align="center"> 
    71             <input type="submit" name="report" value="%s" /> 
    72           </td> 
    73         </tr> 
    74       </table>   
    75     </form> 
     69        <table> 
     70          <tr> 
     71            <td colspan="3" align="center"> 
     72              <input type="submit" name="report" value="%s" /> 
     73            </td> 
     74          </tr> 
     75        </table>   
     76      </form> 
     77    </p> 
     78    <hr width="25%%" /> 
     79    <p> 
     80      <font size="-2"> 
     81        <a href="http://www.librelogiciel.com/software/">%s</a> 
     82        &copy; 2003, 2004, 2005 %s  
     83      </font> 
     84    </p> 
    7685  </body> 
    7786</html>"""   
     
    8291        """Displays the administrative interface.""" 
    8392        global header, footer 
    84         print header % (self.getCharset(), _("PyKota Reports"), self.config.getLogoURL(), version.__version__, version.__version__, _("PyKota Reports"), _("Report")) 
     93        print header % (self.getCharset(), _("PyKota Reports"), \ 
     94                        self.config.getLogoLink(), \ 
     95                        self.config.getLogoURL(), version.__version__, \ 
     96                        self.config.getLogoLink(), \ 
     97                        version.__version__, _("PyKota Reports"), \ 
     98                        _("Report")) 
    8599        print self.body 
    86         print footer % _("Report") 
     100        print footer % (_("Report"), version.__doc__, version.__author__) 
    87101         
    88102    def error(self, message) : 
  • pykota/trunk/cgi-bin/pykotme.cgi

    r2262 r2265  
    4545  </head> 
    4646  <body> 
    47     <form action="pykotme.cgi" method="POST" enctype="multipart/form-data"> 
    48       <table> 
    49         <tr> 
    50           <td> 
    51             <p> 
    52               <a href="http://www.librelogiciel.com/software/"><img src="%s?version=%s" alt="PyKota's Logo" /></a> 
    53               <br /> 
    54               <a href="http://www.librelogiciel.com/software/">PyKota v%s</a> 
    55             </p> 
    56           </td> 
    57           <td colspan="2"> 
    58             <h1>%s</h1> 
    59           </td> 
    60         </tr> 
    61         <tr> 
    62           <td colspan="3" align="center"> 
    63             <input type="submit" name="report" value="%s" /> 
    64           </td> 
    65         </tr> 
    66       </table>""" 
     47    <p> 
     48      <form action="pykotme.cgi" method="POST" enctype="multipart/form-data"> 
     49        <table> 
     50          <tr> 
     51            <td> 
     52              <p> 
     53                <a href="%s"><img src="%s?version=%s" alt="PyKota's Logo" /></a> 
     54                <br /> 
     55                <a href="%s">PyKota v%s</a> 
     56              </p> 
     57            </td> 
     58            <td colspan="2"> 
     59              <h1>%s</h1> 
     60            </td> 
     61          </tr> 
     62          <tr> 
     63            <td colspan="3" align="center"> 
     64              <input type="submit" name="report" value="%s" /> 
     65            </td> 
     66          </tr> 
     67        </table>""" 
    6768     
    6869footer = """ 
    69       <table> 
    70         <tr> 
    71           <td colspan="3" align="center"> 
    72             <input type="submit" name="report" value="%s" /> 
    73           </td> 
    74         </tr> 
    75       </table>   
    76     </form> 
     70        <table> 
     71          <tr> 
     72            <td colspan="3" align="center"> 
     73              <input type="submit" name="report" value="%s" /> 
     74            </td> 
     75          </tr> 
     76        </table>   
     77      </form> 
     78    </p> 
     79    <hr width="25%%" /> 
     80    <p> 
     81      <font size="-2"> 
     82        <a href="http://www.librelogiciel.com/software/">%s</a> 
     83        &copy; 2003, 2004, 2005 %s  
     84      </font> 
     85    </p> 
    7786  </body> 
    7887</html>"""   
     
    8392        """Displays the administrative interface.""" 
    8493        global header, footer 
    85         print header % (self.getCharset(), _("PyKota Reports"), self.config.getLogoURL(), version.__version__, version.__version__, _("PyKota Quotes"), _("Quote")) 
     94        print header % (self.getCharset(), _("PyKota Quotes"), \ 
     95                        self.config.getLogoLink(), \ 
     96                        self.config.getLogoURL(), version.__version__, \ 
     97                        self.config.getLogoLink(), \ 
     98                        version.__version__, _("PyKota Quotes"), \ 
     99                        _("Quote")) 
    86100        print self.body 
    87         print footer % _("Quote") 
     101        print footer % (_("Quote"), version.__doc__, version.__author__) 
    88102         
    89103    def error(self, message) : 
  • pykota/trunk/conf/pykota.conf.sample

    r2262 r2265  
    199199logourl : http://www.librelogiciel.com/software/PyKota/pykota.png 
    200200 
     201#  
     202# The destination to which the web browser will be redirected 
     203# when you click on the logo defined above. 
     204# If not defined, the default URL is the same as the 
     205# one defined below 
     206logolink : http://www.librelogiciel.com/software/ 
     207 
     208# 
    201209# Mail server to use to warn users 
    202210# If the value is not set then localhost is used. 
  • pykota/trunk/NEWS

    r2264 r2265  
    2424    - 1.23alpha3 : 
    2525     
     26        - The destination link for the logo used in CGI scripts is  
     27          configurable. 
     28           
    2629        - Data dumper improved : it's faster and now datas are correctly  
    2730          escaped. 
  • pykota/trunk/pykota/config.py

    r2262 r2265  
    148148                   "http://www.librelogiciel.com/software/PyKota/pykota.png" 
    149149        return url.strip()            
     150         
     151    def getLogoLink(self) : 
     152        """Returns the URL to go to when the user clicks on the logo in the CGI scripts.""" 
     153        url = self.getGlobalOption("logolink", ignore=1) or \ 
     154                   "http://www.librelogiciel.com/software/" 
     155        return url.strip()            
    150156     
    151157    def getAccounterBackend(self, printername) :