[zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - zsp_edit.py:1.2 zsp_edit_form.pt:1.2 zsp_view.pt:1.2
Sidnei da Silva
sidnei at x3ng.com.br
Mon Jan 27 13:24:38 EST 2003
Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products
In directory cvs.zope.org:/tmp/cvs-serv12380/skins/zopeorg_products
Modified Files:
zsp_edit.py zsp_edit_form.pt zsp_view.pt
Log Message:
Improving ZSP. Adding Migration. Small CSS Cleanup
=== Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit.py 1.1 => 1.2 ===
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
-##parameters=company, summary, location, text_format, logo, external_url, contact_name, contact_email, voice, fax, service_info, service_info_file, SafetyBelt
+##parameters=company, summary, location, text_format, logo, external_url, contact_info=None, phone_info=None, service_info, service_info_file, SafetyBelt
##title=
##
context.setCompany(company)
@@ -12,10 +12,8 @@
context.setLocation(location)
context.setLogo(logo)
context.setExternalURL(external_url)
-context.setContactName(contact_name)
-context.setContactEmail(contact_email)
-context.setVoice(voice)
-context.setFax(fax)
+context.setContactInfo(contact_info)
+context.setPhoneInfo(phone_info)
context.setServiceInfo(text_format, service_info, service_info_file, SafetyBelt)
context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 +
=== Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit_form.pt 1.1 => 1.2 ===
<input type="hidden" name="SafetyBelt"
tal:attributes="value here/SafetyBelt">
<table>
- <tr><th>Company</th><td>
- <input type="text" name="company:text" size="50" value=""
- tal:attributes="value here/Company"></td></tr>
- <tr><th>Summary</th>
- <td><textarea name="summary:text" rows="5" cols="80"
- tal:content="here/Summary">edit me!</textarea>
- </td>
+ <tr>
+ <th>
+ Company
+ </th>
+ <td>
+ <input type="text" name="company:text" size="50" value=""
+ tal:attributes="value here/Company">
+ </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>Location</th><td>
- <input type="text" name="location:text" size="50" value=""
- tal:attributes="value here/Location"></td></tr>
- <tr><th>Contact Name</th><td>
- <input type="text" name="contact_name:text" size="50" value=""
- tal:attributes="value here/ContactName"></td></tr>
- <tr><th>Contact Email</th><td>
- <input type="text" name="contact_email:text" size="50" value=""
- tal:attributes="value here/ContactEmail"></td></tr>
- <tr><th>Voice</th><td>
- <input type="text" name="voice:text" size="50" value=""
- tal:attributes="value here/Voice"></td></tr>
- <tr><th>Fax</th><td>
- <input type="text" name="fax:text" size="50" value=""
- tal:attributes="value here/Fax"></td></tr>
- <tr><th>Format</th>
- <td><input type="radio" name="text_format"
+ <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>
+ Location
+ </th>
+ <td>
+ <input type="text" name="location:text" size="50" value=""
+ tal:attributes="value here/Location">
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Contact Info
+ </th>
+ <td>
+ <table>
+ <tal:block repeat="info here/ContactInfo">
+ <tr>
+ <td class="label">Name</td>
+ <td>
+ <input type="text" name="contact_info.name:text:records"
+ size="30" value=""
+ tal:attributes="value info/name">
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ Email
+ </td>
+ <td>
+ <input type="text" name="contact_info.email:text:records"
+ size="30" value=""
+ tal:attributes="value info/email">
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ Info
+ </td>
+ <td>
+ <input type="text" name="contact_info.info:text:records"
+ size="30" value=""
+ tal:attributes="value info/info">
+ </td>
+ </tr>
+ <tr><td></td><td><hr width="200px" /></td></tr>
+ </tal:block>
+ <tr>
+ <td class="label">
+ Name
+ </td>
+ <td>
+ <input type="text" name="contact_info.name:text:records"
+ size="30" value="">
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ Email
+ </td>
+ <td>
+ <input type="text" name="contact_info.email:text:records"
+ size="30" value="">
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ Info
+ </td>
+ <td>
+ <input type="text" name="contact_info.info:text:records"
+ size="30" value="">
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Phone Info
+ </th>
+ <td>
+ <table>
+ <tal:block repeat="info here/PhoneInfo">
+ <tr>
+ <td class="label">Phone</td>
+ <td>
+ <input type="text" name="phone_info.phone:text:records"
+ size="15" value=""
+ tal:attributes="value info/phone">
+ </td>
+ <td class="label">
+ Info
+ </td>
+ <td>
+ <input type="text" name="phone_info.info:text:records"
+ size="15" value=""
+ tal:attributes="value info/info">
+ </td>
+ </tr>
+ </tal:block>
+ <tr>
+ <td class="label">
+ Phone
+ </td>
+ <td>
+ <input type="text" name="phone_info.phone:text:records"
+ size="15" value="">
+ </td>
+ <td class="label">
+ Info
+ </td>
+ <td>
+ <input type="text" name="phone_info.info:text:records"
+ size="15" value="">
+ </td>
+ </tr>
+ </table>
+
+ </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>
=== Products/ZopeOrg-NV/skins/zopeorg_products/zsp_view.pt 1.1 => 1.2 ===
<p tal:condition="here/Summary"
tal:content="here/Summary">Summary</p>
- <ul tal:condition="here/ContactName|here/ContactEmail|here/Voice|here/Fax">
- <li tal:condition="here/ContactName">
- <b> Contact Name: </b><span tal:replace="here/ContactName"/>
+ <h1 tal:condition="here/ContactInfo|here/PhoneInfo|nothing">Contact</h1>
+
+ <ul tal:condition="here/ContactInfo|here/PhoneInfo|nothing">
+ <li tal:condition="here/ContactInfo" tal:repeat="info here/ContactInfo">
+ <a href="#" tal:attributes="href string:mailto:${info/email}"
+ tal:omit-tag="not:info/email">
+ <span tal:replace="info/name"/>
+ <span tal:condition="info/email"
+ tal:replace="string:<${info/email}>"/>
+ </a>
+ <span tal:condition="info/info"
+ tal:replace="info/info" />
+
</li>
- <li tal:condition="here/ContactEmail">
- <b> Contact Email: </b><span tal:replace="here/ContactEmail"/>
- </li>
- <li tal:condition="here/Voice">
- <b> Voice: </b><span tal:replace="here/Voice"/>
- </li>
- <li tal:condition="here/Fax">
- <b> Fax: </b><span tal:replace="here/Fax"/>
+
+ <li tal:condition="here/PhoneInfo" tal:repeat="info here/PhoneInfo">
+ <span tal:replace="info/phone"/>
+ <span tal:condition="info/info"
+ tal:replace="string: - ${info/info}"/>
</li>
+
</ul>
<h1 tal:condition="here/ServiceInfo">Service Info</h1>
More information about the zopeorg-checkins
mailing list