2. On "Translation" page, set "search phrase" button as default button. It means when user hit ENTER, the "search" button is fired instead of "submit" button
}
$savant->assign('shortcuts', $shortcuts);
*/
+
+if (((!$content_row['content_parent_id'] && ($_SESSION['packaging'] == 'top'))
+ || ($_SESSION['packaging'] == 'all'))
+ || (isset($_current_user) && $_current_user->isAuthor($_course_id))) {
+
+ $_tool_shortcuts[] = array(
+ 'title' => _AT('export_content'),
+ 'url' => $_base_href . 'home/imscc/ims_export.php?_cid='.$cid,
+ 'icon' => $_base_href . 'images/download.png');
+}
+
+if (isset($_current_user) && $_current_user->isAuthor($_course_id)) {
+ $_tool_shortcuts[] = array(
+ 'title' => _AT('edit_this_page'),
+ 'url' => $_base_href . 'home/editor/edit_content.php?_cid='.$cid,
+ 'icon' => $_base_href . 'images/medit.gif');
+
+ if ($contentManager->_menu_info[$cid]['content_parent_id']) {
+ $_tool_shortcuts[] = array(
+ 'title' => _AT('add_sibling_folder'),
+ 'url' => $_base_href .
+ 'home/editor/edit_content_folder.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id,
+ 'icon' => $_base_href . 'images/folder_new_sibling.gif');
+ }
+ if ($contentManager->_menu_info[$cid]['content_parent_id']) {
+ $_tool_shortcuts[] = array(
+ 'title' => _AT('add_sibling_page'),
+ 'url' => $_base_href .
+ 'home/editor/edit_content.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id,
+ 'icon' => $_base_href . 'images/page_add_sibling.gif');
+ }
+ $_tool_shortcuts[] = array(
+ 'title' => _AT('delete_this_page'),
+ 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$cid,
+ 'icon' => $_base_href . 'images/page_delete.gif');
+}
+
//if it has test and forum associated with it, still display it even if the content is empty
if ($content_row['text'] == '' && empty($content_test_ids)){
$msg->addInfo('NO_PAGE_CONTENT');
function printList($current_language, $name, $id, $url) {
$delim = false;
+
foreach ($this->availableLanguages as $codes) {
$language = current($codes);
global $_base_path;
global $_pages;
global $framed, $popup;
-global $_current_user, $_course_id, $_sequence_links;
+global $_current_user, $_course_id, $_sequence_links, $_tool_shortcuts;
global $validate_content;
global $contentManager;
global $course_base_href, $content_base_href;
}
}
-// Setup array of content tools for shortcuts tool bar.
-
-$shortcuts = array();
-if (((!$content_row['content_parent_id'] && ($_SESSION['packaging'] == 'top'))
- || ($_SESSION['packaging'] == 'all'))
- || (isset($_current_user) && $_current_user->isAuthor($_course_id))) {
-
- $shortcuts[] = array(
- 'title' => _AT('export_content'),
- 'url' => $_base_href . 'tools/ims/ims_export.php?cid='.$cid,
- 'icon' => $_base_href . 'images/download.png');
-}
-
-if (isset($_current_user) && $_current_user->isAuthor($_course_id)) {
- $shortcuts[] = array(
- 'title' => _AT('edit_this_page'),
- 'url' => $_base_href . 'home/editor/edit_content.php?_cid='.$cid,
- 'icon' => $_base_href . 'images/medit.gif');
-
- if ($contentManager->_menu_info[$cid]['content_parent_id']) {
- $shortcuts[] = array(
- 'title' => _AT('add_sibling_folder'),
- 'url' => $_base_href .
- 'home/editor/edit_content_folder.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id,
- 'icon' => $_base_href . 'images/folder_new_sibling.gif');
- }
- if ($contentManager->_menu_info[$cid]['content_parent_id']) {
- $shortcuts[] = array(
- 'title' => _AT('add_sibling_page'),
- 'url' => $_base_href .
- 'home/editor/edit_content.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id,
- 'icon' => $_base_href . 'images/page_add_sibling.gif');
- }
- $shortcuts[] = array(
- 'title' => _AT('delete_this_page'),
- 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$cid,
- 'icon' => $_base_href . 'images/page_delete.gif');
-}
-$savant->assign('shortcuts', $shortcuts);
-
-
-
+$savant->assign('tool_shortcuts', $_tool_shortcuts); // array of content tools for shortcuts tool bar.
$savant->assign('content_base_href', $_tmp_base_href);
$savant->assign('lang_code', $_SESSION['lang']);
$savant->assign('lang_charset', $myLang->getCharacterSet());
<div id="footer">
<?php
-if($languageManager->getNumEnabledLanguages() > 1)
-{
+if($languageManager->getNumEnabledLanguages() > 1) {
?>
<div align="center" id="lang" style="clear: left"><br />
<?php
<div id="ajax-msg">
</div>
- <?php if ($this->shortcuts): ?>
- <div id="shortcuts">
- <ul>
- <?php foreach ($this->shortcuts as $link): ?>
- <li><a href="<?php echo $link['url']; ?>"><img src="<?php echo $link['icon']; ?>" alt="<?php echo $link['title']; ?>" title="<?php echo $link['title']; ?>" class="shortcut_icon"/><!-- <?php echo $link['title']; ?> --></a></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <?php endif; ?>
- </div>
+ <?php if (is_array($this->tool_shortcuts)): ?>
+ <div id="shortcuts">
+ <ul>
+ <?php foreach ($this->tool_shortcuts as $link): ?>
+ <li><a href="<?php echo $link['url']; ?>"><img src="<?php echo $link['icon']; ?>" alt="<?php echo $link['title']; ?>" title="<?php echo $link['title']; ?>" class="shortcut_icon"/><!-- <?php echo $link['title']; ?> --></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
- <div id="guide_box">
+ <div id="guide_box">
<!-- guide -->
<?php if (isset($this->guide)) {?>
<!-- <div> -->
$dao = new DAO();
$languagesDAO = new LanguagesDAO();
$languageTextDAO = new LanguageTextDAO();
-
+//debug($_REQUEST);exit;
if (isset($_REQUEST['reset_filter'])) unset($_REQUEST);
if (isset($_REQUEST['submit']) || isset($_REQUEST['search']))
?>
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
+ <!-- DO NOT REMOVE. It sets the "search" button as the default button, which means when user hit ENTER,
+ the "search" button is fired instead of "submit" button -->
+ <div style="display:none">
+ <input type="submit" name="search" value="<?php echo _AT('search_phase'); ?>" class="submit" />
+ </div>
<div class="input-form">
<div class="row">
<span class="required" title="<?php echo _AT('required_field'); ?>">*</span>