upgrade result page to Pylons 0.10

This commit is contained in:
Jan Dittberner 2010-04-18 21:14:04 +02:00
parent 0b3373da0e
commit 39fb201f84
3 changed files with 14 additions and 8 deletions

View file

@ -23,7 +23,10 @@
import logging
import simplejson
from pylons.i18n import N_
from pylons import request, tmpl_context as c
from pylons.i18n import N_, _
import formencode.api
import formencode.validators
from ddportfolioservice.lib.base import BaseController, render
from ddportfolioservice.model.form import DDDataRequest, DeveloperData

View file

@ -27,5 +27,7 @@ available to Controllers. This module is available to templates as 'h'.
"""
from webhelpers.html.builder import escape, literal
from webhelpers.html.tags import stylesheet_link, javascript_link, image, \
form, text, radio, submit, end_form
form, text, radio, submit, end_form, link_to
from webhelpers.text import truncate
from webhelpers.textile import textile
from routes import url_for

View file

@ -1,7 +1,8 @@
<%inherit file="base.mako" />
## -*- coding: utf-8 -*-
<%inherit file="base.mako" />\
<%doc>
Template for the url output page.
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
Copyright © 2009, 2010 Jan Dittberner <jan@dittberner.info>
This file is part of DDPortfolio service.
@ -18,7 +19,7 @@ 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>
</%doc>\
<%def name="titleaddon()">
- ${_('Your personal links')}
</%def>
@ -36,14 +37,14 @@ License along with this program. If not, see
<% urlclass = 'odd' %>
% elif row[0] == 'error':
<tr class="error">
<td>${h.textile(row[4])}</td>
<td>${h.literal(h.textile(row[4]))}</td>
<td>${_('Error during URL creation:')}
<span class="errormsg">${row[3].replace("\n",
'<br />')}</span></td>
</tr>
% else:
<tr class="url ${urlclass}">
<td>${h.textile(row[4])}</td>
<td>${h.literal(h.textile(row[4]))}</td>
<td>${h.link_to(h.truncate(row[3], length=120), row[3])}</td>
</tr>
<%
@ -58,4 +59,4 @@ License along with this program. If not, see
</table>
</fieldset>
% endif
<p>${h.link_to(_('Restart'), h.url_for(action='index'))}</p>
<p>${h.link_to(_('Restart'), h.url_for(controller='ddportfolio', action='index'))}</p>