forked from jan/debianmemberportfolio
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:
parent
eb4341c0db
commit
ed65846189
6 changed files with 196 additions and 127 deletions
BIN
ddportfolioservice/public/images/agplv3-88x31.png
Normal file
BIN
ddportfolioservice/public/images/agplv3-88x31.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
ddportfolioservice/public/images/openlogo-100.jpg
Normal file
BIN
ddportfolioservice/public/images/openlogo-100.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
|
@ -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;
|
||||||
}
|
}
|
45
ddportfolioservice/templates/base.mako
Normal file
45
ddportfolioservice/templates/base.mako
Normal 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 © 2009 Jan Dittberner''')}</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -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,14 +19,11 @@ 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>
|
|
||||||
${h.form(h.url_for(action='urllist'), method='get')}
|
|
||||||
<fieldset id="ddportfolio">
|
|
||||||
<legend>${_('Debian Developer Portfolio')}</legend>
|
<legend>${_('Debian Developer Portfolio')}</legend>
|
||||||
<div id="emailfield">
|
<div id="emailfield">
|
||||||
<label for="email">${_('Email address:')}
|
<label for="email">${_('Email address:')}
|
||||||
|
@ -36,7 +32,7 @@ License along with this program. If not, see
|
||||||
<span class="errormsg">${c.messages['errors']['email']}</span>
|
<span class="errormsg">${c.messages['errors']['email']}</span>
|
||||||
% endif
|
% endif
|
||||||
</label><br />
|
</label><br />
|
||||||
${h.text('email', value=request.params.get('email', None))}<br />
|
${h.text('email', request.params.get('email', None), id='email')}<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="namefield">
|
<div id="namefield">
|
||||||
<label for="name">${_('Name:')}
|
<label for="name">${_('Name:')}
|
||||||
|
@ -45,7 +41,7 @@ License along with this program. If not, see
|
||||||
<span class="errormsg">${c.messages['errors']['name']}</span>
|
<span class="errormsg">${c.messages['errors']['name']}</span>
|
||||||
% endif
|
% endif
|
||||||
</label><br />
|
</label><br />
|
||||||
${h.text('name', value=request.params.get('name', None))}<br />
|
${h.text('name', request.params.get('name', None), id='name')}<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="gpgfpfield">
|
<div id="gpgfpfield">
|
||||||
<label for="gpgfp">${_('GPG fingerprint:')}
|
<label for="gpgfp">${_('GPG fingerprint:')}
|
||||||
|
@ -54,7 +50,7 @@ License along with this program. If not, see
|
||||||
<span class="errormsg">${c.messages['errors']['gpgfp']}</span>
|
<span class="errormsg">${c.messages['errors']['gpgfp']}</span>
|
||||||
% endif
|
% endif
|
||||||
</label><br />
|
</label><br />
|
||||||
${h.text('gpgfp', value=request.params.get('gpgfp', None))}<br />
|
${h.text('gpgfp', request.params.get('gpgfp', None), id='gpgfp')}<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="usernamefield">
|
<div id="usernamefield">
|
||||||
<label for="username">${_('Debian user name:')}
|
<label for="username">${_('Debian user name:')}
|
||||||
|
@ -63,8 +59,8 @@ License along with this program. If not, see
|
||||||
<span class="errormsg">${c.messages['errors']['username']}</span>
|
<span class="errormsg">${c.messages['errors']['username']}</span>
|
||||||
% endif
|
% endif
|
||||||
</label><br />
|
</label><br />
|
||||||
${h.text('username',
|
${h.text('username', request.params.get('username', None),
|
||||||
value=request.params.get('username', None))}<br />
|
id='username')}<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="nonddemailfield">
|
<div id="nonddemailfield">
|
||||||
<label for="nonddemail">${_('Non DD email address:')}
|
<label for="nonddemail">${_('Non DD email address:')}
|
||||||
|
@ -73,8 +69,8 @@ License along with this program. If not, see
|
||||||
<span class="errormsg">${c.messages['errors']['nonddemail']}</span>
|
<span class="errormsg">${c.messages['errors']['nonddemail']}</span>
|
||||||
% endif
|
% endif
|
||||||
</label><br />
|
</label><br />
|
||||||
${h.text('nonddemail',
|
${h.text('nonddemail', request.params.get('nonddemail', None),
|
||||||
value=request.params.get('nonddemail', None))}<br />
|
id='nonddemail')}<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="aliothusernamefield">
|
<div id="aliothusernamefield">
|
||||||
<label for="aliothusername">${_('Alioth user name:')}
|
<label for="aliothusername">${_('Alioth user name:')}
|
||||||
|
@ -84,8 +80,8 @@ License along with this program. If not, see
|
||||||
class="errormsg">${c.messages['errors']['aliothusername']}</span>
|
class="errormsg">${c.messages['errors']['aliothusername']}</span>
|
||||||
% endif
|
% endif
|
||||||
</label><br />
|
</label><br />
|
||||||
${h.text('aliothusername',
|
${h.text('aliothusername', request.params.get('username', None),
|
||||||
value=request.params.get('username', None))}<br />
|
id='aliothusername')}<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="modefield">
|
<div id="modefield">
|
||||||
<label for="mode_html">${_('Output format:')}
|
<label for="mode_html">${_('Output format:')}
|
||||||
|
@ -100,7 +96,5 @@ License along with this program. If not, see
|
||||||
'json', checked=(request.params.get('mode', 'html') == 'json'))}<br />
|
'json', checked=(request.params.get('mode', 'html') == 'json'))}<br />
|
||||||
${h.submit('submit', value=_('Build DD Portfolio URLs'))}
|
${h.submit('submit', value=_('Build DD Portfolio URLs'))}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
${h.end_form()}
|
${h.end_form()}
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -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>
|
|
||||||
% if c.urldata:
|
|
||||||
<fieldset id="ddportfolio">
|
|
||||||
<legend>${_('Debian Developer Portfolio')}</legend>
|
<legend>${_('Debian Developer Portfolio')}</legend>
|
||||||
<table>
|
<table id="urltable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>${_('Usage')}</th><th>${_('URL')}</th></tr>
|
<tr><th>${_('Usage')}</th><th>${_('URL')}</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
% for row in c.urldata:
|
% for row in c.urldata:
|
||||||
% if row[0] == 'section':
|
% if row[0] == 'section':
|
||||||
<tr><th class="sectionlabel" colspan="2">${row[2]}</th></tr>
|
<tr class="section"><th class="sectionlabel" colspan="2">${row[2]}</th></tr>
|
||||||
|
<% urlclass = 'odd' %>
|
||||||
% elif row[0] == 'error':
|
% elif row[0] == 'error':
|
||||||
<tr>
|
<tr class="error">
|
||||||
<td>${h.textile(row[4])}</td>
|
<td>${h.textile(row[4])}</td>
|
||||||
<td>${_('Error during URL creation')}<br />
|
<td>${_('Error during URL creation:')}
|
||||||
<span class="errormsg">${row[3].replace("\n",
|
<span class="errormsg">${row[3].replace("\n",
|
||||||
'<br />')}</span></td>
|
'<br />')}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
% else:
|
% else:
|
||||||
<tr>
|
<tr class="url ${urlclass}">
|
||||||
<td>${h.textile(row[4])}</td>
|
<td>${h.textile(row[4])}</td>
|
||||||
<td>${h.link_to(h.truncate(row[3], length=120), row[3])}</td>
|
<td>${h.link_to(h.truncate(row[3], length=120), row[3])}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<%
|
||||||
|
if urlclass == 'odd':
|
||||||
|
urlclass = 'even'
|
||||||
|
else:
|
||||||
|
urlclass = 'odd'
|
||||||
|
%>
|
||||||
% endif
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
% endif
|
% endif
|
||||||
<p>${h.link_to(_('Restart'), h.url_for(action='index'))}</p>
|
<p>${h.link_to(_('Restart'), h.url_for(action='index'))}</p>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
Loading…
Reference in a new issue