improved design, additional texts, base template

- add style classes to output table
- add Debian and AGPL logos
- use a base template for common template code
- add proper styles for output table
This commit is contained in:
Jan Dittberner 2009-01-22 23:32:19 +01:00
parent eb4341c0db
commit ed65846189
6 changed files with 196 additions and 127 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -3,6 +3,19 @@ html, body {
font-size:10pt; font-size:10pt;
} }
#debianlogo {
float:right;
}
#content {
clear:both;
}
#agpllogo {
float:left;
margin-right:10px;
}
table { table {
border-collapse:collapse; border-collapse:collapse;
width:100%; width:100%;
@ -12,6 +25,23 @@ th, td {
border:1px solid grey; border:1px solid grey;
} }
tr.section {
background-color: #a0a0a0;
color: #f0f0f0;
}
tr.odd td {
background-color: #f0f0f0;
}
tr.even td {
background-color: #e0e0ff;
}
tr.error td {
background-color: #ffe0e0;
}
td { td {
vertical-align:top; vertical-align:top;
padding:2px; padding:2px;
@ -23,6 +53,5 @@ td p {
} }
.errormsg { .errormsg {
font-size:80%;
color:red; color:red;
} }

View file

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%doc>
Template for the data input form.
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
This file is part of DDPortfolio service.
DDPortfolio service is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
DDPortfolio service is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/>.
</%doc>
<html>
<head>
<title>${_('Debian Developer Portfolio Service')}${self.titleaddon()}</title>
${h.stylesheet_link('/stylesheets/style.css')}
</head>
<body>
<div id="header">
${h.image('/images/openlogo-100.jpg', _('Debian Logo'), 100, 100,
id='debianlogo')}
<h1>${_('Debian Developer Portfolio Service')}</h1>
<p>${_('''This service has been inspired by Stefano Zachioli's <a href="http://wiki.debian.org/DDPortfolio">DDPortfolio page in the Debian Wiki</a>. You can create a set of customized links leading to a Debian Developer's or package maintainer's information regarding Debian.''')}</p>
</div>
<div id="content">
${self.body()}
</div>
<div id="footer">
${h.image('/images/agplv3-88x31.png', _('AGPL - Free Software'), 88, 31,
id='agpllogo')}
<p>${_('''The service is available under the terms of the <a href="http://www.gnu.org/licenses/agpl.html">GNU Affero General Public License</a> as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. You can <a href="http://ddportfolio.debian.net/gitweb?p=ddportfolioservice.git;a=summary">download the source code</a> using <a href="http://git.or.cz">git</a>.''')}</p>
<p>${_('''Copyright &copy; 2009 Jan Dittberner''')}</p>
</div>
</body>
</html>

View file

@ -1,5 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <%inherit file="base.mako" />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%doc> <%doc>
Template for the data input form. Template for the data input form.
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info> Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
@ -20,87 +19,82 @@ You should have received a copy of the GNU Affero General Public
License along with this program. If not, see License along with this program. If not, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
</%doc> </%doc>
<html> <%def name="titleaddon()">
<head> - ${_('Enter your personal information')}
<title>${_('Debian Developer Portfolio')}</title> </%def>
${h.stylesheet_link('/stylesheets/style.css')} ${h.form(h.url_for(action='urllist'), method='get')}
</head> <fieldset id="ddportfolio">
<body> <legend>${_('Debian Developer Portfolio')}</legend>
${h.form(h.url_for(action='urllist'), method='get')} <div id="emailfield">
<fieldset id="ddportfolio"> <label for="email">${_('Email address:')}
<legend>${_('Debian Developer Portfolio')}</legend> % if 'email' in c.messages['errors']:
<div id="emailfield"> <br />
<label for="email">${_('Email address:')} <span class="errormsg">${c.messages['errors']['email']}</span>
% if 'email' in c.messages['errors']: % endif
<br /> </label><br />
<span class="errormsg">${c.messages['errors']['email']}</span> ${h.text('email', request.params.get('email', None), id='email')}<br />
% endif </div>
</label><br /> <div id="namefield">
${h.text('email', value=request.params.get('email', None))}<br /> <label for="name">${_('Name:')}
</div> % if 'name' in c.messages['errors']:
<div id="namefield"> <br />
<label for="name">${_('Name:')} <span class="errormsg">${c.messages['errors']['name']}</span>
% if 'name' in c.messages['errors']: % endif
<br /> </label><br />
<span class="errormsg">${c.messages['errors']['name']}</span> ${h.text('name', request.params.get('name', None), id='name')}<br />
% endif </div>
</label><br /> <div id="gpgfpfield">
${h.text('name', value=request.params.get('name', None))}<br /> <label for="gpgfp">${_('GPG fingerprint:')}
</div> % if 'gpgfp' in c.messages['errors']:
<div id="gpgfpfield"> <br />
<label for="gpgfp">${_('GPG fingerprint:')} <span class="errormsg">${c.messages['errors']['gpgfp']}</span>
% if 'gpgfp' in c.messages['errors']: % endif
<br /> </label><br />
<span class="errormsg">${c.messages['errors']['gpgfp']}</span> ${h.text('gpgfp', request.params.get('gpgfp', None), id='gpgfp')}<br />
% endif </div>
</label><br /> <div id="usernamefield">
${h.text('gpgfp', value=request.params.get('gpgfp', None))}<br /> <label for="username">${_('Debian user name:')}
</div> % if 'username' in c.messages['errors']:
<div id="usernamefield"> <br />
<label for="username">${_('Debian user name:')} <span class="errormsg">${c.messages['errors']['username']}</span>
% if 'username' in c.messages['errors']: % endif
<br /> </label><br />
<span class="errormsg">${c.messages['errors']['username']}</span> ${h.text('username', request.params.get('username', None),
% endif id='username')}<br />
</label><br /> </div>
${h.text('username', <div id="nonddemailfield">
value=request.params.get('username', None))}<br /> <label for="nonddemail">${_('Non DD email address:')}
</div> % if 'nonddemail' in c.messages['errors']:
<div id="nonddemailfield"> <br />
<label for="nonddemail">${_('Non DD email address:')} <span class="errormsg">${c.messages['errors']['nonddemail']}</span>
% if 'nonddemail' in c.messages['errors']: % endif
<br /> </label><br />
<span class="errormsg">${c.messages['errors']['nonddemail']}</span> ${h.text('nonddemail', request.params.get('nonddemail', None),
% endif id='nonddemail')}<br />
</label><br /> </div>
${h.text('nonddemail', <div id="aliothusernamefield">
value=request.params.get('nonddemail', None))}<br /> <label for="aliothusername">${_('Alioth user name:')}
</div> % if 'aliothusername' in c.messages['errors']:
<div id="aliothusernamefield"> <br />
<label for="aliothusername">${_('Alioth user name:')} <span
% if 'aliothusername' in c.messages['errors']: class="errormsg">${c.messages['errors']['aliothusername']}</span>
<br /> % endif
<span </label><br />
class="errormsg">${c.messages['errors']['aliothusername']}</span> ${h.text('aliothusername', request.params.get('username', None),
% endif id='aliothusername')}<br />
</label><br /> </div>
${h.text('aliothusername', <div id="modefield">
value=request.params.get('username', None))}<br /> <label for="mode_html">${_('Output format:')}
</div> % if 'mode' in c.messages['errors']:
<div id="modefield"> <br />
<label for="mode_html">${_('Output format:')} <span class="errormsg">${c.messages['errors']['mode']}</span>
% if 'mode' in c.messages['errors']: % endif
<br /> </label><br />
<span class="errormsg">${c.messages['errors']['mode']}</span> ${_('HTML')}&#160;${h.radio('mode', 'html',
% endif checked=(request.params.get('mode',
</label><br /> 'html') == 'html'))}&#160;${_('JSON')}&#160;${h.radio('mode',
${_('HTML')}&#160;${h.radio('mode', 'html', 'json', checked=(request.params.get('mode', 'html') == 'json'))}<br />
checked=(request.params.get('mode', ${h.submit('submit', value=_('Build DD Portfolio URLs'))}
'html') == 'html'))}&#160;${_('JSON')}&#160;${h.radio('mode', </div>
'json', checked=(request.params.get('mode', 'html') == 'json'))}<br /> </fieldset>
${h.submit('submit', value=_('Build DD Portfolio URLs'))} ${h.end_form()}
</div>
</fieldset>
${h.end_form()}
</body>
</html>

View file

@ -1,5 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <%inherit file="base.mako" />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%doc> <%doc>
Template for the url output page. Template for the url output page.
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info> Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
@ -20,41 +19,43 @@ You should have received a copy of the GNU Affero General Public
License along with this program. If not, see License along with this program. If not, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
</%doc> </%doc>
<html> <%def name="titleaddon()">
<head> - ${_('Your personal links')}
<title>${_('Debian Developer Portfolio')}</title> </%def>
${h.stylesheet_link('/stylesheets/style.css')} % if c.urldata:
</head> <fieldset id="ddportfolio">
<body> <legend>${_('Debian Developer Portfolio')}</legend>
% if c.urldata: <table id="urltable">
<fieldset id="ddportfolio"> <thead>
<legend>${_('Debian Developer Portfolio')}</legend> <tr><th>${_('Usage')}</th><th>${_('URL')}</th></tr>
<table> </thead>
<thead> <tbody>
<tr><th>${_('Usage')}</th><th>${_('URL')}</th></tr> % for row in c.urldata:
</thead> % if row[0] == 'section':
<tbody> <tr class="section"><th class="sectionlabel" colspan="2">${row[2]}</th></tr>
% for row in c.urldata: <% urlclass = 'odd' %>
% if row[0] == 'section': % elif row[0] == 'error':
<tr><th class="sectionlabel" colspan="2">${row[2]}</th></tr> <tr class="error">
% elif row[0] == 'error': <td>${h.textile(row[4])}</td>
<tr> <td>${_('Error during URL creation:')}
<td>${h.textile(row[4])}</td> <span class="errormsg">${row[3].replace("\n",
<td>${_('Error during URL creation')}<br /> '<br />')}</span></td>
<span class="errormsg">${row[3].replace("\n", </tr>
'<br />')}</span></td> % else:
</tr> <tr class="url ${urlclass}">
% else: <td>${h.textile(row[4])}</td>
<tr> <td>${h.link_to(h.truncate(row[3], length=120), row[3])}</td>
<td>${h.textile(row[4])}</td> </tr>
<td>${h.link_to(h.truncate(row[3], length=120), row[3])}</td> <%
</tr> if urlclass == 'odd':
% endif urlclass = 'even'
% endfor else:
</tbody> urlclass = 'odd'
</table> %>
</fieldset> % endif
% endif % endfor
<p>${h.link_to(_('Restart'), h.url_for(action='index'))}</p> </tbody>
</body> </table>
</html> </fieldset>
% endif
<p>${h.link_to(_('Restart'), h.url_for(action='index'))}</p>