[Zope-CMF] Final questions.
Ignacio Valdes
ivaldes@hal-pc.org
Tue, 01 May 2001 22:47:05 -0500
It's been a long few days. I've toiled mightily with this and have made
good progress, from local machine to ISP/web while helping my wife with
childbirth in the middle. A few thoughts before bed: I'm down to my
final questions/problems (maybe) for my free and open source medical
project and resources database at
http://www.linuxmednews.com/linuxmednews/LMNProjectsResources/:
Thanks! -- IV
1) I want to disallow member access and even seeing the 'Members' folder
while allowing access to the root. I can't seem to make the Members
folder disappear for regular users. I tried disabling viewing of that
folder in 'Security' but it made generic folder_contents crash when I
did that. I also want to disable My Stuff, ie users being able to create
or seeing anything in the members space, I want them to only be able to
create it in a common root or a user created sub-folder space.
Nutshell: get rid of My Stuff as an option as well as even seeing
Members folder for regular users.
2) As a corollary to the above, I also want every user created content
item to be automatically published without explicitly doing so or
requiring editor/reviewer. However, notification that something is new
on the site for reviewers is desired (if you can tell me how to do
e-mail notification, you are golden!). I'd like only editors/reviewers
and creator of a LinuxMedNews Review instance or sub-category folder to
be able to modify Metadata of a LinuxMedNews Review instance or folder.
Everyone else should have only view, discuss and voting access (which
works right now).
3) Okay, I'm stupid and this isn't directly CMF, but: I'm trying to get
the folder and item listings to have a green bar all the way across the
column like http://www.linuxmednews.com that bears a remarkable
resemblance to another news site which we won't mention: why does this
table code result in a narrow stumpy green band column when I want it to
extend across the entire table space horizontally? If I turn border=1 on
it shows that it extends well past this narrow cell. I want to make the
cell as wide as the table. I've tried just about everything, width,
blah, blah. Nothing. The relevant section of folder_contents is here.
I'll put it in its entirety at the end of this message for completeness
sake:
<tr valign="top" width="100%" colspan=3>
<td>
<input type="checkbox" name="ids:list" value="&dtml-id;"
id="cb_&dtml-id;" />
</td>
<td>
</td>
<td bgcolor="<dtml-var color3>">
<dtml-if icon>
<a href="&dtml.url_quote-id;&dtml-methodID;"
><img src="&dtml-BASEPATH1;/&dtml-icon;"
alt="&dtml-Type;" border="0"></a>
</dtml-if>
<FONT color="<dtml-var color2>">
<B><dtml-var title></B></font>
</td>
</tr>
<TR valign="top">
<td>
</td>
<td>
</td>
<td>
<dtml-var content_byline>
<dtml-if description>&dtml-description;<br></dtml-if>
<FONT color="<dtml-var color3>"><a
href="&dtml.url_quote-id;&dtml-methodID;">Read More...</a></FONT>
</td>
</TR>
Complete folder_contents:
<dtml-comment>
folderfilter cookie maintenance.
</dtml-comment>
<dtml-if expr="REQUEST.get('clear_view_filter', 0)">
<dtml-call expr="RESPONSE.expireCookie('folderfilter', path='/')">
<dtml-call expr="REQUEST.set('folderfilter', '')">
<dtml-call expr="REQUEST.set('close_filter_form', '1')">
<dtml-elif expr="REQUEST.get('set_view_filter', 0)">
<dtml-let filter="encodeFolderFilter(REQUEST)">
<dtml-call expr="RESPONSE.setCookie('folderfilter', filter,
path='/', expires='Wed, 19 Feb 2020 14:28:00 GMT')">
<dtml-call expr="REQUEST.set('folderfilter', filter)">
</dtml-let>
</dtml-if>
<dtml-comment>
Folder contents display.
</dtml-comment>
<dtml-call "REQUEST.set('isDesktop', 1)">
<dtml-var standard_html_header>
<dtml-if "not portal_membership.checkPermission('Access contents
information'
, this())">
<dtml-call "RESPONSE.redirect(absolute_url())">
</dtml-if>
<!-- This is the desktop area -->
<div class="Desktop">
<h1> Desktop </h1>
<form ACTION="&dtml-absolute_url;" METHOD="POST">
<table class="FormLayout">
<tr>
<td valign="top">
<table class="ContentsList">
<dtml-if "portal_membership.checkPermission( 'Access contents
information'
, this(), 'aq_parent')">
<dtml-let upNav="_.hasattr(this().aq_parent, 'portal_url')"
upID="this().aq_parent.id"
>
<tr valign="top">
<td width="16"><br></td>
<td>
<dtml-if upNav>
<a href="../folder_contents"
><img src="&dtml-portal_url;/UpFolder_icon.gif"
alt="[Link]" border="0"></a>
</dtml-if>
</td>
<td>
<dtml-if upNav>
Up to <a href="../folder_contents"><dtml-var upID></a>
<dtml-else>
<span class="mild">Root</span>
</dtml-if>
</td>
</tr>
</dtml-let>
</dtml-if>
<dtml-in expr="contentValues(filter=decodeFolderFilter(
REQUEST.get('folderfilter', '')))"
sort="id" size="19" start=qs skip_unauthorized>
<dtml-if next-sequence>
<dtml-call "REQUEST.set('next-sequence'
, _['next-sequence-start-number'])">
</dtml-if>
<dtml-if previous-sequence>
<dtml-call "REQUEST.set('previous-sequence'
,_['previous-sequence-start-number'])">
</dtml-if>
<dtml-let obj="_.getitem('sequence-item', 0 )"
folderish=isPrincipiaFolderish
portalish="_.hasattr( obj, 'isPortalContent' )
and obj.isPortalContent"
methodID="folderish and '/folder_contents' or ( portalish
and '/view' or '' )"
icon="_.getattr(obj, 'icon', 0)"
>
<tr valign="top" width="100%" colspan=3>
<td>
<input type="checkbox" name="ids:list" value="&dtml-id;"
id="cb_&dtml-id;" />
</td>
<td>
</td>
<td bgcolor="<dtml-var color3>">
<dtml-if icon>
<a href="&dtml.url_quote-id;&dtml-methodID;"
><img src="&dtml-BASEPATH1;/&dtml-icon;"
alt="&dtml-Type;" border="0"></a>
</dtml-if>
<FONT color="<dtml-var color2>">
<B><dtml-var title></B></font>
</td>
</tr>
<TR valign="top">
<td>
</td>
<td>
</td>
<td>
<dtml-var content_byline>
<dtml-if description>&dtml-description;<br></dtml-if>
<FONT color="<dtml-var color3>"><a
href="&dtml.url_quote-id;&dtml-methodID;">Read More...</a></FONT>
</td>
</TR>
<dtml-if qs>
<dtml-if "_['sequence-index'] - _.int(qs) == 7">
</table><dtml-comment> End of first column </dtml-comment>
</td>
<td>
<table class="ContentsList">
</dtml-if>
<dtml-else> <dtml-comment> No batch </dtml-comment>
<dtml-if "_['sequence-index'] == 8">
</table><dtml-comment> End of first column </dtml-comment>
</td>
<td valign="top">
<table class="ContentsList">
</dtml-if>
</dtml-if>
</dtml-let>
</dtml-in>
</table>
</td>
</tr>
<tr>
<td align="right">
<dtml-if previous-sequence>
<a href="folder_contents?qs=&dtml-previous-sequence;">Previous
items</a>
<dtml-else>
<br>
</dtml-if>
</td>
<td align="left">
<dtml-if next-sequence>
<a href="folder_contents?qs=&dtml-next-sequence;">Next items</a>
<dtml-else>
<br>
</dtml-if>
</td>
</tr>
</table><dtml-comment> End of listing table </dtml-comment>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16"></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<dtml-if expr="portal_membership.checkPermission('Add portal content',
this())">
<INPUT TYPE="SUBMIT" NAME="folder_factories:method" VALUE="New...">
</dtml-if>
<dtml-if expr="portal_membership.checkPermission('View management
screens', this())">
<INPUT TYPE="SUBMIT" NAME="folder_rename_form:method"
VALUE="Rename">
<INPUT TYPE="SUBMIT" NAME="folder_cut:method" VALUE="Cut">
<INPUT TYPE="SUBMIT" NAME="folder_copy:method" VALUE="Copy">
<INPUT TYPE="SUBMIT" NAME="folder_paste:method" VALUE="Paste">
</dtml-if>
<dtml-if expr="portal_membership.checkPermission('Delete objects',
this())">
<INPUT TYPE="SUBMIT" NAME="folder_delete:method" VALUE="Delete">
</dtml-if>
</TD>
</TR>
</TABLE>
</FORM>
<dtml-var folder_filter_form>
<dtml-var standard_html_footer>