[zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - zsp_edit.py:1.1 zsp_edit_form.pt:1.1 zsp_view.pt:1.1 casestudy_edit.py:1.2

Sidnei da Silva sidnei at x3ng.com.br
Mon Jan 20 14:52:36 EST 2003


Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products
In directory cvs.zope.org:/tmp/cvs-serv6968/skins/zopeorg_products

Modified Files:
	casestudy_edit.py 
Added Files:
	zsp_edit.py zsp_edit_form.pt zsp_view.pt 
Log Message:
ZSP management views

=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit.py ===
## Script (Python) "zsp_edit"
##bind container=container
##bind context=context
##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
##title=
##
context.setCompany(company)
context.setSummary(summary)
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.setServiceInfo(text_format, service_info, service_info_file, SafetyBelt)

context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 +
 '/zsp_edit_form?portal_status_message=ZSP%20changed.')


=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit_form.pt ===
<html metal:use-macro="here/main_template/macros/master">

<head>
<title tal:content="here/Title">ZSP 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="zsp_edit" method="post" enctype="multipart/form-data">
    <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>
      <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"
                     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"> Service Info </th>
          <td class="TextField">
          <textarea name="service_info:text" rows="10" cols="80"
                    tal:content="here/editableServiceInfo">edit me!</textarea>
          </td>
      </tr>
      <tr><th> Upload Service Info </th><td><input type="file" name="service_info_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/zsp_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">

    <h1 tal:condition="here/Company">Company</h1>

    <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>

    <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"/>
      </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>
    </ul>
      
    <h1 tal:condition="here/ServiceInfo">Service Info</h1>
 
    <span tal:condition="here/ServiceInfo"
          tal:replace="structure here/ServiceInfo" />


</div>
</body>
</html>


=== Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_edit.py 1.1 => 1.2 ===
-## Script (Python) "tip_edit"
+## Script (Python) "casestudy_edit"
 ##bind container=container
 ##bind context=context
 ##bind namespace=





More information about the zopeorg-checkins mailing list