[Zope-CVS] CVS: Products/OSCOM/NOTSite/skins/NOTContent - section_edit_form.pt:1.1 section_preview.pt:1.1 section_view.pt:1.1 story_edit.py:1.1 story_edit_form.pt:1.1 story_preview.pt:1.1 story_view.pt:1.1 tease_edit_form.pt:1.1 tease_preview.pt:1.1 tease_view.pt:1.1 README.txt:NONE

Tres Seaver tseaver@zope.com
Mon, 26 May 2003 01:51:37 -0400


Update of /cvs-repository/Products/OSCOM/NOTSite/skins/NOTContent
In directory cvs.zope.org:/tmp/cvs-serv19799/skins/NOTContent

Added Files:
	section_edit_form.pt section_preview.pt section_view.pt 
	story_edit.py story_edit_form.pt story_preview.pt 
	story_view.pt tease_edit_form.pt tease_preview.pt 
	tease_view.pt 
Removed Files:
	README.txt 
Log Message:
 - Add initial pass at content and site skins.

=== Added File Products/OSCOM/NOTSite/skins/NOTContent/section_edit_form.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">	  
<div class="Desktop">
<h2>Edit: <span tal:replace="here/getId">My ID</span></h2>
 
<form action="section_edit" method="post"
      tal:attributes="action string:${here/absolute_url}/section_edit"
>
<table class="FormLayout">
 
 <tr valign="top">
  <th align="right"> Title
  </th>
  <td colspan="3">
   <input type="text"
          name="title"
          value=""
		  tal:attributes="value here/title"
          size="65">
  </td>
 </tr>
  
 <tr valign="top">
  <th align="right"> Description
  </th>
  <td colspan="3">
   <textarea name="description:text" rows="5"
             cols="65" wrap="soft"
			 tal:content="here/Description">
   </textarea>
  </td>
 </tr>

 <tr valign="top">
  <td> <br> </td>
  <td>
   <input type="submit" name="choice" value=" Change ">
   <input type="submit" name="choice" value=" Change and View ">
  </td>
 </tr>
 
</table>
</form>
</div>
</div>
</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/section_preview.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master" >
<body>

<div metal:fill-slot="main">
 <iframe src="." width="100%" height="500"
         tal:attributes="src here/absolute_url"
 />
</div>

</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/section_view.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/site_template/macros/master">
<body>

<div metal:fill-slot="main">

WAAA!
</div>

</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/story_edit.py ===
## Script (Python) "story_edit"
##parameters=content, metadata, SafetyBelt='', choice=' Change '
##title=Edit a News Story
try:
    context.setTitle( metadata.title )
    context.setDescription( metadata.description )

    from Products.CMFDefault.utils import scrubHTML
    # Strip Javascript, etc.
    file = scrubHTML( content.file and content.file.read() or '' )
    text = scrubHTML( content.text )
    context.edit( content.text_format
                , text
                , file
                , safety_belt=SafetyBelt
                )

    qst='portal_status_message=Story+updated.'

    if choice == ' Change and View ':
        target_action = context.getTypeInfo().getActionById( 'preview' )
    else:
        target_action = context.getTypeInfo().getActionById( 'edit' )

    context.REQUEST.RESPONSE.redirect( '%s/%s?%s' % ( context.absolute_url()
                                                , target_action
                                                , qst
                                                ) )
except Exception, msg:
    raise
    target_action = context.getTypeInfo().getActionById( 'edit' )
    context.REQUEST.RESPONSE.redirect(
        '%s/%s?portal_status_message=%s' % ( context.absolute_url()
                                           , target_action
                                           , msg
                                           ) )


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/story_edit_form.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">	  
<div class="Desktop">
<h2>Edit <span tal:replace="here/getId">ID</span></h2>

<form action="story_edit" method="post" enctype="multipart/form-data"
      tal:attributes="action string:${here/absolute_url}/story_edit"
>

 <input type="hidden" name="SafetyBelt" value=""
        tal:attributes="value here/SafetyBelt">

<table class="FormLayout">

 <tr style="background-color: #CCCCCC">
  <td colspan="2" align="center"><strong>Metadata</strong></td>
 </tr>

 <tr>
  <th>
    Title
  </th>
  <td>
   <input type="text" size="40" name="metadata.title:record" value="TITLE"
          tal:attributes="value here/Title" />
  </td>
 </tr>

 <tr>
  <th>
    Description
  </th>
  <td>
   <textarea rows="5" cols="80" name="metadata.description:record"
             tal:content="here/Description">DESCRIPTION</textarea>
  </td>
 </tr>

 <tr style="background-color: #CCCCCC">
  <td colspan="2" align="center"><strong>Content</strong></td>
 </tr>

 <tr>
  <th>
   Format
  </th>
  <td tal:define="text_format here/text_format">

   <input type="radio" id="cb_structuredtext"
          name="content.text_format:record"
          value="structured-text"
          tal:attributes="checked python: text_format == 'structured-text'" />
   <label for="cb_structuredtext">structured-text</label>

   <input type="radio" id="cb_plain"
          name="content.text_format:record" value="plain"
          tal:attributes="checked python: text_format == 'plain'" />
   <label for="cb_plain">plain text</label>

   <input type="radio" id="cb_html"
          name="content.text_format:record" value="html"
          tal:attributes="checked python: text_format == 'html'" />
   <label for="cb_html">html</label>

  </td>
 </tr>

 <tr>
  <th> Upload </th>
  <td>
   <input type="file" name="content.file:record" size="25">
  </td>
 </tr>

 <tr>
  <th class="TextField"> Edit </th>
  <td class="TextField">
   <textarea name="content.text:text:record" rows="20" cols="80" wrap="soft"
                    tal:content="here/EditableBody"></textarea>
  </td>
 </tr>

 <tr>
  <td> <br> </td>
  <td>
    <input type="submit" name="choice" value=" Change ">
    <input type="submit" name="choice" value=" Change and View ">
  </td>
 </tr>
</table>
</form>
</div>
</div>
</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/story_preview.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master">
<body>

<div metal:fill-slot="main">
 <iframe src="." width="100%" height="500"
         tal:attributes="src here/absolute_url"
 />
</div>

</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/story_view.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/site_template/macros/master">
<body>


<div metal:fill-slot="main">

 <h1 tal:content="here/Title">Story Title</h1>

 <div metal:use-macro="here/content_byline/macros/byline">By Me</div>

 <div tal:replace="structure here/CookedBody">Cooked Body</div>

</div>

</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/tease_edit_form.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">	  
<div class="Desktop">


<span tal:replace="request/message"
   tal:condition="request/message|nothing"><hr></span>

<div class="Link">

<h2>Edit <span tal:replace="here/getId">My ID</span></h2>

<form action="tease_edit" method="post"
      tal:attributes="action string:${here/absolute_url}/tease_edit"
>
<table class="FormLayout">
 <tr>
  <th>
   Title
  </th>
  <td> <span tal:replace="here/Title">My Title</span> </td>
 </tr>
 <tr>
  <th>
   URL
  </th>
  <td>
   <input type="text" name="remote_url" value="" tal:attributes="value here/remote_url">
  </td>
 </tr>
 <tr>
  <td> <br> </td>
  <td>
   <input type="submit" name="choice" value=" Change ">
   <input type="submit" name="choice" value=" Change and View ">
  </td>
 </tr>
</table>
</form>

</div>
</div>

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


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/tease_preview.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master">
<body>

<div metal:fill-slot="main">

  <div metal:use-macro="here/tease_view/macros/tease_rendered" />

</div>

</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTContent/tease_view.pt ===
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/site_template/macros/master">
<body>

<div metal:fill-slot="main">

 <div metal:define-macro="tease_rendered">
  <p tal:define="obj here/getObject;
                title python: obj and obj.Title() or here.Title();
                desc python: obj and obj.Description() or here.Description();
               ">
  <a href="URL"
     tal:attributes="href here/getRemoteUrl"
     tal:content="title">TITLE</a><br />
  <em tal:content="desc">DESCRIPTION</em>

  </p>
 </div>

</div>

</body>
</html>

=== Removed File Products/OSCOM/NOTSite/skins/NOTContent/README.txt ===