Changeset 49

Show
Ignore:
Timestamp:
29/01/06 23:38:22
Author:
sjudge
Message:

Added Help Centre to default content. Changed Schemata to allow resource software browsing... and more.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/PloneSoftwareCenter/config.py

    r46 r49  
    2222RELEASES_ID = 'downloads' 
    2323IMPROVEMENTS_ID = 'roadmap' 
    24 DOCUMENTATION_ID = 'documentation
     24DOCUMENTATION_ID = 'help
    2525TRACKER_ID = 'problems' 
    26 FAQ_ID = 'FAQ' 
    2726POLL_ID = 'Vote' 
    2827 
  • trunk/PloneSoftwareCenter/content/PSCProject.py

    r48 r49  
    2121    folder_modify_fti(fti, allowed=('PSCReleaseFolder', 
    2222                                    'PSCImprovementProposalFolder', 
    23                                     #'PSCDocumentationFolder', 
     23                                    'PSCDocumentationFolder', 
    2424                                    'PlonePopoll', 
    25                                     'FAQTheme', 
    2625                                    'PoiPscTracker', 
     26                                    'HelpCenter', 
    2727                                    #'Collector', 
    2828                                    ), 
     
    7171        OrderedBaseFolder.initializeArchetype(self,**kwargs) 
    7272         
    73         # if self.haveHelpCenter() and \ 
    74         #        not self.objectIds('PSCDocumentationFolder'): 
    75         #    self.invokeFactory('PSCDocumentationFolder', 
    76         #                       config.DOCUMENTATION_ID) 
     73        if self.haveHelpCenter() and not self.objectIds('PSCDocumentationFolder'): 
     74            self.invokeFactory('PSCDocumentationFolder', 
     75                               config.DOCUMENTATION_ID, title=config.DOCUMENTATION_ID) 
    7776         
    7877        if not self.objectIds('PSCReleaseFolder'): 
     
    8786        poll.setVisible() 
    8887 
    89         self.invokeFactory(id='FAQ', type_name='FAQTheme', title=config.FAQ_ID, description='Frequently asked questions.') 
    90         FAQ = getattr(self, 'FAQ') 
    91         FAQ._setProperty("allow_discussion",0) 
    92   
     88        # POI and ImprovementFolders can be added by the developer....         
     89         
    9390        #self.invokeFactory(id='PoiPscTracker', type_name='PoiPscTracker', title=config.TRACKER_ID, description='Bug Tracker') 
    9491  
    95         #if not self.objectIds('PSCImprovementProposalFolder'): 
     92        #if not self.objectIds('PSCImprovementProposalFolder'): 
    9693             #self.invokeFactory('PSCImprovementProposalFolder', 
    9794                                #config.IMPROVEMENTS_ID) 
     
    303300        else: 
    304301            return False 
     302         
     303    security.declareProtected(CMFCorePermissions.View, 'getDocumentationID')  
     304    def getDocumentationID(self): 
     305        return config.DOCUMENTATION_ID 
     306     
     307    security.declareProtected(CMFCorePermissions.View, 'getTrackerID')      
     308    def getTrackerID(self): 
     309        return config.TRACKER_ID 
     310     
    305311registerType(PSCProject, config.PROJECTNAME) 
  • trunk/PloneSoftwareCenter/content/schemata.py

    r48 r49  
    1313from Products.PloneSoftwareCenter.config import * 
    1414from Products.PloneSoftwareCenter.utils import changeWidgetLabel 
     15 
     16from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import * 
     17 
     18from AccessControl import ClassSecurityInfo 
     19from Products.MasterSelectWidget.MasterSelectWidget import MasterSelectWidget 
    1520 
    1621from validators import ProjectIdValidator 
     
    2833#         import ReferenceBrowserWidget 
    2934#except ImportError: 
    30 ReferenceBrowserWidget = ReferenceWidget 
     35#ReferenceBrowserWidget = ReferenceWidget 
    3136 
    3237# We need to make sure that the right storage is set at Field 
     
    5661    'listing': (16, 16), 
    5762} 
     63 
     64slave_fields = ({'name': 'ResourceSoftware', 
     65                 'action': 'hide', 
     66                 'hide_values': ('no',), 
     67                 },)# disables ResourceSoftware 
    5868 
    5969############################## 
     
    383393        default='', 
    384394        searchable=1, 
     395        required=1, 
    385396        accessor="Title", 
    386397        widget=StringWidget( 
     
    493504    ), 
    494505 
    495    BooleanField( 
    496         name='resource_project', 
    497        schemata='Advanced Information', 
    498         searchable=1, 
    499         default=0, 
    500         widget=BooleanWidget( 
     506    StringField('resource_project', 
     507        schemata='Advanced Information', 
     508        index='KeywordIndex:schema', 
     509        searchable=1, 
     510        default='no', 
     511        vocabulary=['yes','no'], 
     512        widget=MasterSelectWidget( 
     513            slave_fields = slave_fields, 
    501514            label="Is this project a resource project?", 
    502515            label_msgid="label_resource_project", 
     
    506519        ), 
    507520     ),     
    508  
    509   BooleanField( 
     521     
     522    ReferenceField('ResourceSoftware', 
     523        schemata='Advanced Information', 
     524        index='KeywordIndex:schema', 
     525        relationship='ResourcesSoftware', 
     526        multiValued=1, 
     527        allowed_types=('PSCProject',), 
     528        widget=ReferenceBrowserWidget( 
     529            show_indexes=0, 
     530            label="Resource Software", 
     531            description='If the related software is on OATS, please choose it from this list:', 
     532            startup_directory='/software', 
     533            ), 
     534        ), 
     535 
     536   
     537 
     538    BooleanField( 
    510539        name='request_oats', 
    511540        schemata='Advanced Information', 
     
    513542        default=0, 
    514543        index='KeywordIndex:schema', 
    515         widget=BooleanWidget( 
     544        widget=BooleanWidget( 
    516545            label="Would you like this project to be hosted on the OATS server?", 
    517546            label_msgid="label_oats_project", 
     
    522551     ),  
    523552 
    524    BooleanField( 
     553    BooleanField( 
    525554        name='recommended', 
    526555        schemata='Reviewer', 
     
    11961225        column_names=('id', 'title', 'description'), 
    11971226        default=[ 
    1198             'XXXXXXXstandalone|Stand-alone products|Projects that are self-contained.',  
    1199             'add-on|Add-on components|Projects that provide additional functionality.',  
    1200             'infrastructure|Infrastructure|Projects that provide services.', 
     1227            'OnScreenKeyboards|On Screen Keyboard Projects|On Screen Keyboards allow typing using a switch, cursor or other alternative device to a keyboard', 
     1228            'SymbolSet|Symol Library|A project related to symbols', 
     1229            'TextToSpeech|Text to Speech|Text to speech engines, implementations or tools', 
     1230            'Automation|Computer Automation|Projects which make computer interaction easier through automating tasks', 
     1231            'SwitchInput|Switch Input Software|Allows access to a computer using a switch', 
     1232            'AAC|Alternative and Augmentative Communication|Software or resources related to communication', 
     1233            'EC|Environmental Control|Projects related to Environmental Control - control of electronic devices in a users (home/work/etc) environment', 
     1234            'Educational|Educational and Learning|Resources and software to aid and promote learning', 
     1235            'Other|Other function|Put it here if it does not match any of the above - we will then considering creating a category for it!', 
    12011236        ], 
    12021237        widget=SimpleDataGridWidget( 
     
    12151250        column_names=('id', 'title', 'description'), 
    12161251        default=[ 
    1217             'XXXXXXXstandalone|Stand-alone products|Projects that are self-contained.',  
    1218             'add-on|Add-on components|Projects that provide additional functionality.',  
    1219             'infrastructure|Infrastructure|Projects that provide services.', 
     1252            'Typing|Text input Projects|Projects related to text input to a computer or other aspects of typing', 
     1253            'Mouse|Using the Mouse|Projects realated to control of the cursor or other forms of mouse control', 
     1254            'ViewingScreen|Viewing the screen|Projects that aid with seeing or interpreting the screen and graphical user interface (e.g. Screen Readers and Magnifiers),' 
     1255            'Speaking|Communication|Projects involved with Alternative or Augmentative communication', 
     1256            'Internet|Accessing the Web|Projects involved with access to the internet', 
     1257            'Symbols|Symbols|Projects relating to the use of symbols to aid communication or interaction', 
     1258            'Alternative|Alternative Access|Projects relating to the use of switch or other alternative access methods', 
     1259            'Learning|Learning and Eductation|Projects that may help with learning and education', 
     1260            'Other|Other need|Put it here if it does not match any of the above - we will then considering creating a category for it!', 
    12201261        ], 
    12211262        widget=SimpleDataGridWidget( 
     
    12411282            'OSI|Other OSI Approved|http://opensource.org/licenses', 
    12421283            'ZPL|Zope Public License (ZPL)|http://opensource.org/licenses/zpl', 
    1243             'Commercial|Commercial License|http://plone.org/documentation/faq/plone-license', 
     1284            'Commercial|Commercial License|http://en.wikipedia.org/wiki/Software_licence', 
    12441285        ], 
    12451286        widget=SimpleDataGridWidget( 
     
    13761417    ), 
    13771418 
     1419   SimpleDataGridField( 
     1420        name='availableResourceSoftware', 
     1421        columns=4, 
     1422        column_names=('id', 'title', 'url','description'), 
     1423        default=[ 
     1424            'TheGrid|The Grid|http://www.sensorysoftware.com|The Grid is commercial software for communication and computer access.', 
     1425            'Clicker|Clicker|http://www.cricksoft.com/uk/products/clicker/default.asp|Clicker is a writing support and multimedia tool used mainly in education.', 
     1426            'Other|Other Software|Put it here if it does not match any of the above - we will then considering creating a category for it!', 
     1427        ], 
     1428        widget=SimpleDataGridWidget( 
     1429            label='Software (not in the repository) that may have associated resources', 
     1430            label_msgid='label_ResourceSoftware_vocab', 
     1431            description='Define the available Software (not in the repository) that may have associated resources. The format is Short Name | Long name | URL | Description. The id must be unique.', 
     1432            description_msgid='help_ResourceSoftware_vocab', 
     1433            i18n_domain='plonesoftwarecenter', 
     1434            rows=6, 
     1435        ), 
     1436    ),   
     1437 
    13781438 
    13791439)) 
  • trunk/PloneSoftwareCenter/skins/plonesoftwarecenter/forge_product_view.pt

    r39 r49  
    1717<body> 
    1818 
    19  
    20  
    2119<div metal:fill-slot="main"> 
    2220 
    23   <div metal:define-macro="main" tal:define="latestrelease here/getLatestRelease"> 
     21  <div metal:define-macro="main" tal:define="latestrelease here/getLatestRelease; 
     22                                             herePath python:'/'.join(here.getPhysicalPath())"> 
    2423 
    25         <p class="portalMessage" 
    26            i18n:translate="description_cannot_add_before_approved" 
    27            tal:condition="python: is_editable and wtool.getInfoFor(here, 'review_state')!='published'"> 
    28            Thanks for submitting the project details, if a software release is avaliable for this project, please submit it. 
    29            When you have completed editing it, you must SUBMIT this project using the button above.  This project will then be reviewed by the OATS team before being published. 
    30         </p> 
     24        <tal:syndicate condition="syntool/isSiteSyndicationAllowed"> 
     25           <a class="feedButton" href="" tal:attributes="href string:$here_url/search_rss?portal_type=PSCRelease&sort_on=Date&sort_order=reverse&path=${herePath}&review_state=published"> 
     26              <img i18n:attributes="title title_rss_feed; alt label_rss_feed;" 
     27                   tal:attributes="src string:$portal_url/rss.gif" 
     28                   src="rss.gif" 
     29                   alt="RSS Feed" 
     30                   title="RSS feed of the latest releaes in this category" /> 
     31           </a> 
     32        </tal:syndicate> 
     33 
     34        <div metal:use-macro="here/document_actions/macros/document_actions"> 
     35            Document actions (print, sendto etc) 
     36        </div> 
    3137 
    3238        <h1 class="documentFirstHeading"> 
     
    3642        </h1> 
    3743 
    38         <div metal:use-macro="here/document_actions/macros/document_actions"> 
    39             Document actions (print, sendto etc) 
     44       <div class="discreet"> 
     45            Category: <span tal:replace="python: ', '.join(here.getCategoryTitles())" /> 
    4046        </div> 
    4147 
     
    4551                This is a recommended project. 
    4652        </span> 
    47         <span class = "discreet" tal:condition="python:here.getOats_status() == ('OATSProject',)"> 
     53        <span class = "discreet" tal:condition="python:here.getOats_status() == ('OATSProject',)"> 
    4854 
    4955        <img tal:replace="structure here/forge_icon.gif" /> 
    5056                This is an OATS project. 
    5157        </span> 
     58 
    5259        </div> 
    5360 
     
    6774        <div class="visualClear"></div> 
    6875 
     76        <p class="portalMessage" 
     77           i18n:translate="description_cannot_add_before_approved" 
     78           tal:condition="python: is_editable and wtool.getInfoFor(here, 'review_state')!='published'"> 
     79          Thanks. For this project to be considered you <b>must SUBMIT it</b> to do this click the 'State' button above and choose 'submit'.  See the <a href="/Info/HowTos/SubmissionGuide">submission guide</a> for more details. 
     80        </p> 
     81     
     82        <h2 tal:condition="latestrelease"> 
     83            <a href="#" 
     84               i18n:translate="heading_latest_release_project" 
     85               tal:attributes="href latestrelease/absolute_url"> 
     86              Latest release: 
     87              <span tal:replace="latestrelease/Title" 
     88                    i18n:name="project">Ploneboard 1.0</span></a> 
     89        </h2> 
     90 
    6991        <tal:noreleases tal:condition="not:latestrelease"> 
    7092 
    71             <p class="discreet" 
    72                tal:condition="python:is_editable and wtool.getInfoFor(here, 'review_state')=='published'"> 
     93            <p class="discreet"> 
    7394                 <tal:noreleases i18n:translate="description_no_available_releases"> 
    74                     There are no published releases in this project yet. 
     95                    Sorry - there are no downloads for this project yet. 
    7596                 </tal:noreleases> 
    7697            </p> 
    7798            <p class="discreet" 
    78                tal:condition="python: is_editable">  
     99               tal:condition="python: is_editable and wtool.getInfoFor(here, 'review_state')=='published'"> 
    79100                <a i18n:translate="label_goto_release_folder" 
    80101                   tal:attributes="href string:$here_url/releases"> 
    81                   Go to the release folder to add or publish a release
     102                  Go to the downloads folder to add or publish a download
    82103                </a> 
    83104            </p> 
     
    85106        </tal:noreleases> 
    86107 
    87         <div class="visualClear"></div> 
    88  
    89         <h2>Project Description</h2> 
    90  
    91         <div class="discreet"> 
    92             Category: <span tal:replace="python: ', '.join(here.getCategoryTitles())" /> 
    93         </div> 
    94  
    95         <fieldset style="float: right; margin-left: 0.5em; margin-top: 0;"> 
    96             <legend>Additional resources</legend> 
    97  
    98             <ul style="list-style-type: none; list-style-image: none; margin-left: 0;"> 
    99                  
    100                 <li tal:condition="python:'documentation' in here.objectIds()"> 
    101                     <img src="" alt="" 
    102                          tal:attributes="src string:${portal_url}/documentation_icon.gif" /> 
    103                     <a href="" 
    104                        class="link-plain" 
    105                        title="Documentation for this project" 
    106                        tal:attributes="href string:${here/absolute_url}/documentation">Documentation</a> 
    107                 </li> 
    108                  
    109                 <li tal:condition="python:'documentation' not in here.objectIds() and here.getDocumentationLink()"> 
    110                     <img src="" alt="" 
    111                          tal:attributes="src string:${portal_url}/documentation_icon.gif" /> 
    112                     <a href="" 
    113                        class="link-plain" 
    114                        title="Documentation for this project" 
    115                        tal:attributes="href here/getDocumentationLink">Documentation</a> 
    116                 </li> 
    117                  
    118                  
    119                 <li tal:repeat="resource python:here.getAdditionalContainedResources(ignore=('PSCDocumentationFolder',))"> 
    120                     <img tal:attributes="src resource/getIcon"  
    121                          alt="" /> 
    122                     <a href="" 
    123                        class="link-plain" 
    124                        tal:attributes="href resource/getId; 
    125                                        title resource/Description;" 
    126                        tal:content="resource/Title">Additional resource</a> 
    127                 </li> 
    128                  
    129                 <li tal:condition="here/getContactAddress"> 
    130                     <img src="" alt="" 
    131                          tal:attributes="src string:${portal_url}/mail_icon.gif" /> 
    132                     <a href="" 
    133                        class="link-plain" 
    134                        title="Contact address for this project" 
    135                        tal:attributes="href here/getContactAddress">Contact address</a> 
    136                 </li> 
    137                 <li tal:condition="here/getHomepage"> 
    138                     <img src="" alt="" 
    139                          tal:attributes="src string:${portal_url}/link_icon.gif" /> 
    140                     <a href="" 
    141                        class="link-plain" 
    142                        title="Additional home page for this project" 
    143                        tal:attributes="href here/getHomepage">Project home page</a> 
    144                 </li> 
    145  
    146                 <li tal:condition="here/getTracker"> 
    147                     <img src="" alt="" 
    148                          tal:attributes="src string:${portal_url}/issuetracker_icon.gif" /> 
    149                     <a href="" 
    150                        class="link-plain" 
    151                        title="A place to submit bug reports and feature requests for this project" 
    152                        tal:attributes="href here/getTracker">Issue tracker</a> 
    153                 </li> 
    154  
    155                 <li tal:condition="here/getMailingList"> 
    156                     <img src="" alt="" 
    157                          tal:attributes="src string:${portal_url}/info_icon.gif" /> 
    158                     <a href="" 
    159                        class="link-plain" 
    160                        title="Support options for this product" 
    161                        tal:attributes="href here/getMailingList">Support</a> 
    162                 </li> 
    163  
    164                 <li tal:condition="here/getRepository"> 
    165                     <img src="" alt="" 
    166                          tal:attributes="src string:${portal_url}/sitemap_icon.gif" /> 
    167                     <a href="" 
    168                        class="link-plain" 
    169                        title="Version control repository location for this project" 
    170                        tal:attributes="href here/getRepository">Development repository</a> 
    171                 </li> 
    172      
    173             </ul> 
    174  
    175  
    176         </fieldset> 
    177  
    178         <div tal:replace="structure here/getText" /> 
    179  
    180         <div class="visualClear"></div> 
    181  
    182         <h2>Contributing and Managing this project</h2> 
    183  
    184  
    185         <div>To add software releases to this project use the 'add' buttons above, you will also need to ensure that you select 'released' as it's state (using the button above).</div> 
    186         <div>It is important that you make this project as visible as possible to users - you can do this in a number of ways:</div> 
    187         <div> 
    188         <ul> 
    189         <li>A TRAC will be automatically created for you if this is an OATS project, or if you request it.  It will only be visible to users if you enter the URL to it in the project description (by clicking edit).</li> 
    190         <li>You can add a discussion board to the project using the 'add' button above.</li> 
    191         <li>You can add a roadmap section to the project using the 'add' button above.</li> 
    192         </ul> 
    193         </div> 
    194  
    195  
    196         <div class="visualClear"></div> 
    197  
    198         <h2>Latest releases for this project</h2> 
    199  
    200        <tal:releases condition="latestrelease"> 
     108        <tal:releases condition="latestrelease"> 
    201109 
    202110            <div class="visualIEFloatFix" style="margin-top: 1em;"> 
     
    206114                       tal:attributes="href string:${latestrelease/absolute_url}/screenshot/image_view_fullscreen"> 
    207115                        <img tal:replace="structure latestrelease/screenshot_thumb" /> 
    208                         <img tal:replace="structure here/search_icon.gif" />                        <br /> 
    209  
     116                        <br /> 
     117                        <img tal:replace="structure here/search_icon.gif" /> 
    210118                        <span i18n:translate="label_click_to_enlarge"> 
    211119                            Click to enlarge 
     
    213121                    </a> 
    214122                </div> 
     123 
     124                <p> 
     125                    <span tal:replace="latestrelease/Description"> 
     126                    Main focus for this release is blah blah. 
     127                    </span> 
     128 
     129                    <br /> 
     130                    <img tal:replace="structure here/document_icon.gif" /> 
     131                    <a href="#" 
     132                       i18n:translate="label_read_more" 
     133                       tal:attributes="href latestrelease/absolute_url">Read more</a> 
     134                </p> 
    215135 
    216136                <dl> 
     
    243163                  </tal:file> 
    244164                </dl> 
     165            </div> 
    245166 
     167        </tal:releases> 
    246168 
    247                 <p style="float: right; clear:both;" 
    248                     tal:define="releaseFolder here/getReleaseFolder; 
    249                                 roadmapFolder here/getRoadmapFolder"> 
    250  
    251                     <tal:block condition="releaseFolder"> 
    252                         <img tal:replace="structure here/product_icon.gif" /> 
    253                         <a i18n:translate="label_show_all_releases" 
    254                            tal:attributes="href releaseFolder/absolute_url"> 
    255                            Show all releases&hellip;</a> 
    256                     </tal:block> 
    257  
    258                     <tal:block condition="roadmapFolder"> 
    259                         <img tal:replace="structure here/improvementproposal_icon.gif" /> 
    260                         <a i18n:translate="label_show_upcoming_releases" 
    261                            tal:attributes="href roadmapFolder/absolute_url"> 
    262                            Show Roadmap&hellip;</a> 
    263                     </tal:block> 
    264                 </p> 
    265                  
    266             </div> 
    267         </tal:releases>         
    268  
    269  
     169        <div class="visualClear"></div> 
     170  
     171  
     172        <div tal:replace="structure here/getText" /> 
    270173 
    271174<tal:comment replace="nothing"> 
  • trunk/PloneSoftwareCenter/skins/plonesoftwarecenter/listing.pt

    r48 r49  
    5959                  <tal:package tal:repeat="package packages"> 
    6060                   
    61                     <dt tal:condition="package/getLogo"> 
     61                    <dt tal:condition="here/getLogo| nothing"> 
    6262                      <a tal:attributes="href package/getURL"> 
    63                       <img tal:replace="structure package/getLogo" /> 
     63                      <img tal:replace="structure here/getLogo" /> 
    6464                      </a>  
    6565                   </dt> 
    66                    <dt tal:condition="not: package/getLogo"> 
     66                   <dt tal:condition="not: package/getLogo| nothing"> 
    6767                      <a tal:attributes="href package/getURL"> 
    6868                      <img tal:replace="structure here/product_icon.gif" /> 
  • trunk/PloneSoftwareCenter/version.txt

    r48 r49  
    1 1.0 beta 7  PSC2.1 Integration branch - OATS beta 48 
     11.0 beta 7  PSC2.1 Integration branch - OATS beta 50