[svn r18094] Minor - Adding the add session/course in the action menu

skala
Julio Montoya 16 years ago
parent 3d47563df3
commit a8e3de6d90
  1. 12
      main/admin/course_list.php
  2. 37
      main/admin/session_list.php

@ -1,4 +1,4 @@
<?php // $Id: course_list.php 18068 2009-01-29 01:38:37Z yannoo $
<?php // $Id: course_list.php 18094 2009-01-30 20:44:08Z juliomontoya $
/* For licensing terms, see /dokeos_license.txt */
/**
* This script shows a list of courses and allows searching for courses codes
@ -202,14 +202,18 @@ else
}
// Create a search-box
$form = new FormValidator('search_simple','get','','',null,false);
$form = new FormValidator('search_simple','get','','','width=200px',false);
$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span> ');
$form->addElement('text','keyword',get_lang('keyword'));
$form->addElement('submit','submit',get_lang('Search'));
$form->addElement('static','search_advanced_link',null,'<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>');
echo '<div class="actions">';
$form->display();
echo '<div style="float:right;">
<a href="'.api_get_path(WEB_CODE_PATH).'admin/course_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddCourse').'</a>
</div>';
echo '<div class="actions">';
$form->display();
echo '</div>';
// Create a sortable table with the course data
$table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data',2);

@ -121,25 +121,25 @@ else {
?>
<div id="main">
<div class="actions">
<?php
if(isset($_GET['action'])) {
Display::display_normal_message(Security::remove_XSS($_GET['message']), false);
}
echo '<div style="float:right;">
<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddSession').'</a>
</div>';
</div>';
?>
<form method="POST" action="session_list.php">
<input type="text" name="keyword" value="<?php echo Security::remove_XSS($_GET['keyword']); ?>"/>
<input type="submit" value="<?php echo get_lang('Search'); ?>"/>
<a href="session_list.php?search=advanced"><?php echo get_lang('AdvancedSearch'); ?></a>
</form>
<form method="post" action="<?php echo api_get_self(); ?>?action=delete&sort=<?php echo $sort; ?>" onsubmit="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;">
<form method="post" action="<?php echo api_get_self(); ?>?action=delete&sort=<?php echo $sort; ?>" onsubmit="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;">
<div align="left">
<?php
<?php
if(count($Sessions)==0 && isset($_POST['keyword'])) {
echo get_lang('NoSearchResults');
} else {
@ -150,26 +150,19 @@ else {
} else {
echo get_lang('Previous');
}
?>
|
<?php
if($nbr_results > $limit)
{
?>
<a href="<?php echo api_get_self(); ?>?page=<?php echo $page+1; ?>&sort=<?php echo $sort; ?>&keyword=<?php echo $_REQUEST['keyword']; ?>"><?php echo get_lang('Next'); ?></a>
?>
|
<?php
}
else
{
if($nbr_results > $limit) {
?>
<a href="<?php echo api_get_self(); ?>?page=<?php echo $page+1; ?>&sort=<?php echo $sort; ?>&keyword=<?php echo $_REQUEST['keyword']; ?>"><?php echo get_lang('Next'); ?></a>
<?php
} else {
echo get_lang('Next');
}
?>
</div>
?>
</div>
</div>
<br>

Loading…
Cancel
Save