[zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - casestudy_edit.py:1.1 casestudy_edit_form.pt:1.1 casestudy_view.pt:1.1
Sidnei da Silva
sidnei at x3ng.com.br
Mon Jan 20 14:02:36 EST 2003
Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products
In directory cvs.zope.org:/tmp/cvs-serv32678/skins/zopeorg_products
Added Files:
casestudy_edit.py casestudy_edit_form.pt casestudy_view.pt
Log Message:
Initialize content types and add a few management views.
=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_edit.py ===
## Script (Python) "tip_edit"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=title, summary, logo, external_url, text_format, case_facts, case_facts_file, problem, problem_file, solution, solution_file, SafetyBelt
##title=
##
context.setTitle(title)
context.setSummary(summary)
context.setLogo(logo)
context.setExternalURL(external_url)
context.setCaseFacts(text_format, case_facts, case_facts_file, SafetyBelt)
context.setProblem(text_format, problem, problem_file, SafetyBelt)
context.setSolution(text_format, solution, solution_file, SafetyBelt)
context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 +
'/casestudy_edit_form?portal_status_message=Case%20Study%20changed.')
=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_edit_form.pt ===
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="here/Title">Case Study Edit Form</title>
<link rel="stylesheet" type="text/css" href="/portal/Global.css" />
</head>
<body>
<div metal:fill-slot="main">
<h2>Edit <span tal:replace="here/id">This</span></h2>
<form action="casestudy_edit" method="post" enctype="multipart/form-data">
<input type="hidden" name="SafetyBelt"
tal:attributes="value here/SafetyBelt">
<table>
<tr><th>Title</th><td>
<input type="text" name="title:text" size="50" value=""
tal:attributes="value here/Title"></td></tr>
<tr><th>Summary</th>
<td><textarea name="summary:text" rows="5" cols="80"
tal:content="here/Summary">edit me!</textarea>
</td>
</tr>
<tr><th>Logo</th><td>
<input type="text" name="logo:text" size="50" value=""
tal:attributes="value here/Logo"></td></tr>
<tr><th>External URL</th><td>
<input type="text" name="external_url:text" size="50" value=""
tal:attributes="value here/ExternalURL"></td></tr>
<tr><th>Format</th>
<td><input type="radio" name="text_format"
value="structured-text"
tal:attributes="checked python: path('here/text_format') == 'structured-text'" />
<label for="cb_structuredtext">structured-text</label>
<input type="radio" name="text_format" value="html"
tal:attributes="checked python: path('here/text_format') == 'html'" />
<label for="cb_html">html</label>
</td>
</tr>
<tr><th class="TextField"> Case Facts </th>
<td class="TextField">
<textarea name="case_facts:text" rows="10" cols="80"
tal:content="here/editableCaseFacts">edit me!</textarea>
</td>
</tr>
<tr><th> Upload Case Facts </th><td><input type="file" name="case_facts_file" size="25"></td></tr>
<tr><th class="TextField"> Problem </th>
<td class="TextField">
<textarea name="problem:text" rows="10" cols="80"
tal:content="here/editableProblem">edit me!</textarea>
</td>
</tr>
<tr><th> Upload Problem</th><td><input type="file" name="problem_file" size="25"></td></tr>
<tr><th class="TextField"> Solution </th>
<td class="TextField">
<textarea name="solution:text" rows="10" cols="80"
tal:content="here/editableSolution">edit me!</textarea>
</td>
</tr>
<tr><th> Upload Solution</th><td><input type="file" name="solution_file" size="25"></td></tr>
<tr><td> <br /> </td>
<td><input type="submit" value=" Change "></td>
</tr>
</table>
</form>
</div>
</body>
</html>
=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_view.pt ===
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="here/Title">Master Template</title>
<link rel="stylesheet" type="text/css" href="/portal/Global.css" />
</head>
<body>
<div metal:fill-slot="main">
<img src="logo.jpg"
tal:condition="here/getLogo"
tal:attributes="src python:here.getLogo().absolute_url()" />
<p tal:condition='here/ExternalURL'>
<a href="#" tal:attributes="href here/ExternalURL"
tal:content="here/ExternalURL">
External URL
</a>
</p>
<h1 tal:condition="here/Summary">Summary</h1>
<p tal:condition="here/Summary"
tal:content="here/Summary">Summary</p>
<h1 tal:condition="here/CaseFacts">Case Facts</h1>
<span tal:condition="here/CaseFacts"
tal:replace="structure here/CaseFacts" />
<h1 tal:condition="here/Problem">Problem</h1>
<span tal:condition="here/Problem"
tal:replace="structure here/Problem" />
<h1 tal:condition="here/Solution">Solution</h1>
<span tal:condition="here/Solution"
tal:replace="structure here/Solution" />
</div>
</body>
</html>
More information about the zopeorg-checkins
mailing list