Changeset 597 for WAeUP_SRP


Ignore:
Timestamp:
29 Sep 2006, 15:26:36 (18 years ago)
Author:
Henrik Bettermann
Message:

open external edit windows in faculty_index_view.pt
and showing [edit] link only if permitted

Location:
WAeUP_SRP/trunk/skins
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/faculty_index_view.pt

    r590 r597  
    3939
    4040            <td>
    41             <a tal:condition="row/isManager"
     41            <a tal:condition="row/is_edit_allowed"
    4242                href="edit" tal:attributes="href string:${row/url}/external_edit_form"
    4343                target="edit"
  • WAeUP_SRP/trunk/skins/waeup_academics/getDepartmentsInfo.py

    r590 r597  
    3939    row['title'] = rd.LongTitle()
    4040    row['url'] = ro.absolute_url()
    41     row['isManager'] = mtool.checkPermission('Modify portal content', ro)
     41    row['is_edit_allowed'] = mtool.checkPermission('Modify portal content', ro)
    4242    items.append(row)
    4343info['items'] = items
  • WAeUP_SRP/trunk/skins/waeup_default/external_edit_form.pt

    r585 r597  
    11<tal:block define="
    22    rendered_main python:here.cpsdocument_edit_render(request=request);
    3     form_action string:cpsdocument_edit;
    4     creation python:False;
     3    form_action string:external_edit;
    54    edition python:True;
    65    metadata metadata|nothing;
     
    87<metal:block define-macro="edit_form">
    98<metal:block use-macro="here/content_lib_master/macros/master">
    10   <metal:block fill-slot="style_slot">
    11     <link rel="Stylesheet" type="text/css" href=""
    12       tal:attributes="href string:${base_url}document.css" />
    139
    14     <metal:block define-macro="widgets_javascript">
    15     <!-- XXX this has to move to CPSSchemas -->
    16     <style type="text/css"
    17       tal:content="string:@import url(${base_url}calendar-win2k-1.css);"></style>
    18     <script type="text/javascript" src="calendar.js"
    19       tal:attributes="src string:${base_url}calendar.js"></script>
    20     <script type="text/javascript" src="lang/calendar-en.js"
    21       tal:define="local cpsmcat/getSelectedLanguage"
    22       tal:attributes="src string:${base_url}lang/calendar-${local}.js"></script>
    23     <script type="text/javascript" src="calendar-setup.js"
    24       tal:attributes="src string:${base_url}calendar-setup.js"></script>
    25     <script type="text/javascript" src="prototype.js"
    26       tal:attributes="src string:${base_url}prototype.js"></script>
    27     <script type="text/javascript" src="effects.js"
    28       tal:attributes="src string:${base_url}effects.js"></script>
    29     <script type="text/javascript" src="controls.js"
    30       tal:attributes="src string:${base_url}controls.js"></script>
    31     <script type="text/javascript" src="cpsdocument.js"
    32       tal:attributes="src string:${base_url}cpsdocument.js"></script>
    33     <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')">
    34       <script type="text/javascript">
    35         var popup_editor_form = 'popup_fckeditor_form';
    36         var width = 640;
    37         var height = 520;
    38       </script>
    39     </tal:block>
    40     <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.Epoz')">
    41       <script type="text/javascript">
    42         var popup_editor_form = 'popup_rte_form';
    43         var width = 640;
    44         var height = 480;
    45       </script>
    46     </tal:block>
    47     <script type="text/javascript">
    48      function popup_rte(input_id, label_edit) {
    49        var args, value;
    50        value = document.getElementById(input_id).value;
    51        args = '?input_id='+input_id+'&amp;label_edit='+escape(label_edit);
    52        str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height;
    53        popup = window.open(popup_editor_form + args, input_id, str_window_features);
    54        if (!popup.opener) {
    55          popup.opener = window;
    56        }
    57        return false;
    58      }
    59    </script>
    60    </metal:block>
    61   </metal:block>
    6210
    6311  <metal:block fill-slot="header">
    64     <h1 tal:condition="creation" i18n:translate="">
    65       Create a document of type
    66       <tal:block i18n:name="type_name" i18n:translate=""
    67             tal:define="type_name request/type_name;
    68                         type_info python:here.portal_types[type_name]"
    69             tal:content="type_info/Title">Type Title</tal:block>
    70     </h1>
    71     <h1 tal:condition="not:creation">
     12    <h3>
    7213      <tal:block condition="python: edition and not metadata"
    7314        i18n:translate="">Edit <span id="page_title" i18n:name="title"
     
    7516      <tal:block tal:condition="metadata"
    7617        i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span></tal:block>
    77     </h1>
     18    </h3>
    7819  </metal:block>
    7920
     
    8627          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
    8728                     replace="structure python:getFormUidHtml(request)"/>
    88           <input type="hidden" name="type_name" value="VALUE"
    89                  tal:condition="creation"
    90                  tal:attributes="value request/type_name" />
     29         
    9130          <input type="hidden" id="button_placeholder" name="button_placeholder" value="" />
    9231          <div id="rendered_main" tal:content="structure rendered_main">
     
    9534        </div>
    9635
    97         <tal:block condition="not:creation">
    98           <div class="tooltipArea" style="visibility: hidden;"
    99                id="transition_comments_help"
    100                onclick="showElement(false, 'transition_comments_help')"
    101                i18n:translate="help_transition_comments_modification">
    102             In this field you can give the reason for the modification
    103             on this document. Your comments may be used to notify other users.
    104           </div>
    105           <dl>
    106             <dt><label for="comments"
    107                        i18n:translate="transition_comments_modification"
    108                        >Reason of the modification</label>
    109               <button type="button" class="tooltipControl"
    110                       onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
    111             </dt>
    112             <dd>
    113               <textarea name="comments" id="comments" cols="60" rows="3"
    114                         tal:content="nothing">
    115               </textarea>
    116             </dd>
    117           </dl>
    118         </tal:block>
    119 
    120         <metal:block use-macro="here/cpsdocument_edit_buttons/macros/buttons"/>
    121        
    122        
    123        
    124        
    125         <br /> <br /> <a href="" onClick="self.close();">Close Window</a>
    126        
    127        
    128        
    129        
    130        
     36        <metal:block use-macro="here/external_edit_buttons/macros/buttons"/>
     37               
    13138      </div>
    13239    </form>
    133     <div id="ajax_psm" style="display:none">
    134       ajax feedback
    135     </div>
    13640  </metal:block>
    13741
Note: See TracChangeset for help on using the changeset viewer.