Update of /cvsroot/webnotes/webnotes/themes/phpnet
In directory usw-pr-cvs1:/tmp/cvs-serv6789/themes/phpnet
Modified Files:
theme_api.php
Log Message:
- Fixed a typo in the name of note_update_visibility()
- Added to the phpnet theme the [ actions ] to change the visibility of a note.
- Display in phpnet theme the visibility of notes if the user can moderate.
- Filtering all notes in the pages based on access rights, rather than only viewing accepted independent of access rights.
Index: theme_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- theme_api.php 19 Sep 2002 04:15:48 -0000 1.13
+++ theme_api.php 19 Sep 2002 05:15:47 -0000 1.14
@@ -67,16 +67,36 @@
# function. The theme should check that a field is defined in
# the array before using it.
function theme_notes_echo( $p_page, $p_url, $p_note_info_array, $p_preview = false ) {
- if ( access_check_action( ACTION_NOTES_MODERATE ) ) {
- # @@@@ replace this with [ actions ]
- $t_moderation = "This user can moderator";
- } else {
- $t_moderation = '';
+ $t_moderation = '';
+
+ if ( false === $p_preview ) {
+ if ( access_check_action( ACTION_NOTES_MODERATE ) ) {
+ $t_url = $p_url; # . "#" . $p_note_info_array['id'];
+ $t_moderation = '<small>';
+
+ $t_moderation .= link_note_action( $p_note_info_array['id'], 'accept', $t_url,
+ access_check_action( ACTION_NOTES_MODERATE_ACCEPT ) ) . ' ';
+
+ $t_moderation .= link_note_action( $p_note_info_array['id'], 'decline', $t_url,
+ access_check_action( ACTION_NOTES_MODERATE_DECLINE ) ) . ' ';
+
+ $t_moderation .= link_note_action( $p_note_info_array['id'], 'archive', $t_url,
+ access_check_action( ACTION_NOTES_MODERATE_ARCHIVE ) ) . ' ';
+
+ $t_moderation .= link_note_action( $p_note_info_array['id'], 'delete', $t_url,
+ access_check_action( ACTION_NOTES_MODERATE_DELETE ) );
+
+ $t_moderation .= '</small>';
+ }
}
if ( isset( $p_note_info_array['id'] ) && ( $p_note_info_array['id'] != 0 ) ) {
$t_id = '#' . (integer)$p_note_info_array['id'];
- $t_id_view = '<pre>' . $t_id . '<br />' . $t_moderation . '</pre>';
+ $t_visibility = '';
+ if ( NOTE_VISIBLE_ACCEPTED != $p_note_info_array['visible'] ) {
+ $t_visibility = '(' . note_get_visibility_str( $p_note_info_array['visible'] ) . ') - ';
+ }
+ $t_id_view = "<pre>$t_visibility$t_id<br />$t_moderation</pre>";
$t_id_bookmark = "<a name=\"$t_id\"></a>";
} else {
$t_id_view = ' ';
|