Interface fix: add an hyperlink from bookmark edition page to collaborative edition of the same bookmark

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@175 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
mensonge 2008-11-25 16:58:56 +00:00
parent 111bcdec75
commit df984f2666
5 changed files with 18 additions and 6 deletions

View file

@ -33,8 +33,15 @@ isset($_POST['cancel']) ? define('POST_CANCEL', $_POST['cancel']): define('POST_
isset($_POST['hash']) ? define('POST_HASH', $_POST['hash']): define('POST_HASH', ''); isset($_POST['hash']) ? define('POST_HASH', $_POST['hash']): define('POST_HASH', '');
isset($_POST['title']) ? define('POST_TITLE', $_POST['title']): define('POST_TITLE', ''); isset($_POST['title']) ? define('POST_TITLE', $_POST['title']): define('POST_TITLE', '');
isset($_POST['description']) ? define('POST_DESCRIPTION', $_POST['description']): define('POST_DESCRIPTION', ''); isset($_POST['description']) ? define('POST_DESCRIPTION', $_POST['description']): define('POST_DESCRIPTION', '');
isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', '');
// prevent cycle between personal and common edit page
if(!isset($_POST['referrer'])) {
define('POST_REFERRER', '');
} elseif(strpos($_POST['referrer'], ROOT.'edit.php') == 0) {
define('POST_REFERRER', createUrl('history', POST_HASH));
} else {
define('POST_REFERRER', $_POST['referrer']);
}
list ($url, $hash) = explode('/', $_SERVER['PATH_INFO']); list ($url, $hash) = explode('/', $_SERVER['PATH_INFO']);

View file

@ -67,6 +67,10 @@ class BookmarkService {
return $this->_getbookmark('bHash', $hash, true); return $this->_getbookmark('bHash', $hash, true);
} }
function countBookmarks($uId) {
}
function editAllowed($bookmark) { function editAllowed($bookmark) {
if (!is_numeric($bookmark) && (!is_array($bookmark) || !is_numeric($bookmark['bId']))) if (!is_numeric($bookmark) && (!is_array($bookmark) || !is_numeric($bookmark['bId'])))
return false; return false;

View file

@ -15,7 +15,7 @@ window.onload = function() {
</script> </script>
<form action="<?php echo $formaction; ?>" method="post"> <form action="<?php echo $formaction; ?>" method="post">
<table> <table title="<?php echo T_('Collaborative description: these fields can be viewed and modified by every users') ?>">
<tr> <tr>
<th align="left"><?php echo T_('Title'); ?></th> <th align="left"><?php echo T_('Title'); ?></th>
<td><input type="text" id="title" name="title" size="75" maxlength="255" value="<?php echo $description['cdTitle']; ?>" onkeypress="this.style.backgroundImage = 'none';" /></td> <td><input type="text" id="title" name="title" size="75" maxlength="255" value="<?php echo $description['cdTitle']; ?>" onkeypress="this.style.backgroundImage = 'none';" /></td>

View file

@ -6,10 +6,6 @@ $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =& ServiceFactory::getServiceInstance('TagService');
$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService'); $cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
//$logged_on_userid = $userservice->getCurrentUserId();
//$currentUser = $userservice->getCurrentUser();
//$currentUsername = $currentUser[$userservice->getFieldName('username')];
// Momentary useful to go to object code // Momentary useful to go to object code
$currentObjectUser = $userservice->getCurrentObjectUser(); $currentObjectUser = $userservice->getCurrentObjectUser();

View file

@ -76,6 +76,11 @@ switch ($row['bStatus']) {
<input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" /> <input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" />
<?php <?php
} }
if (isset($showdelete) && $showdelete) {
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $row['bHash']).'">';
echo T_('edit common description').'</a>)';
}
if ($popup) { if ($popup) {
?> ?>
<input type="hidden" name="popup" value="1" /> <input type="hidden" name="popup" value="1" />