[svn r19676] form titles

form consistency
style improvement
skala
Patrick Cool 17 years ago
parent 4ad88bf292
commit 189fa71e3f
  1. 5
      main/document/create_document.php
  2. 21
      main/document/document.php
  3. 12
      main/document/edit_document.php
  4. 58
      main/document/quota.php

@ -1,4 +1,4 @@
<?php // $Id: create_document.php 18772 2009-03-03 02:31:56Z ivantcholakov $
<?php // $Id: create_document.php 19676 2009-04-09 09:14:37Z pcool $
/*
==============================================================================
@ -333,6 +333,9 @@ if (isset ($group))
// Create a new form
$form = new FormValidator('create_document');
// form title
$form->addElement('header', '', $nameTools);
$renderer = & $form->defaultRenderer();
// Hidden element with current directory

@ -1,4 +1,4 @@
<?php // $Id: document.php 19385 2009-03-27 20:48:57Z iflorespaz $
<?php // $Id: document.php 19676 2009-04-09 09:14:37Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -545,12 +545,23 @@ if($is_allowed_to_edit || $group_member_with_upload_rights) // TEACHER ONLY
//create the form that asks for the directory name
$new_folder_text = '<form action="'.api_get_self().'" method="post">';
$new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$curdirpath.'" />';
$new_folder_text .= get_lang('NewDir') .' ';
$new_folder_text .= '<input type="text" name="dirname" />';
$new_folder_text .= '<button type="submit" name="create_dir">'.get_lang('CreateFolder').'</button>';
// form title
$new_folder_text .= '<div class="row"><div class="form_header">'.get_lang('CreateDir').'</div></div>';
// folder field
$new_folder_text .= '<div class="row">';
$new_folder_text .= '<div class="label"><span class="form_required">*</span>'.get_lang('NewDir').'</div>';
$new_folder_text .= '<div class="formw"><input type="text" name="dirname" /></div>';
$new_folder_text .= '</div>';
// submit button
$new_folder_text .= '<div class="row">';
$new_folder_text .= '<div class="label">&nbsp;</div>';
$new_folder_text .= '<div class="formw"><button type="submit" name="create_dir">'.get_lang('CreateFolder').'</button></div>';
$new_folder_text .= '</div>';
$new_folder_text .= '</form>';
$new_folder_text .= '<div style="clear: both; margin-bottom: 10px;"></div>';
//show the form
Display::display_normal_message($new_folder_text,false);
echo $new_folder_text;
}

@ -1,4 +1,4 @@
<?php // $Id: edit_document.php 19397 2009-03-27 22:02:19Z iflorespaz $
<?php // $Id: edit_document.php 19676 2009-04-09 09:14:37Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -224,7 +224,6 @@ if(!is_dir($filepath))
}
/**************************************************/
$nameTools = get_lang('EditDocument');
$dbTable = Database::get_course_table(TABLE_DOCUMENT);
if(!empty($_SESSION['_gid']))
@ -597,8 +596,12 @@ if(file_exists($filepath.$doc))
- display user interface
==============================================================================
*/
// display the header
$nameTools = get_lang("EditDocument") . ': '.$file_name;
Display::display_header($nameTools,"Doc");
api_display_tool_title(get_lang("EditDocument") . ": $file_name");
// display the tool title
//api_display_tool_title($nameTools);
if(isset($msgError))
{
@ -631,6 +634,9 @@ if ($owner_id == $_user['user_id'] || api_is_platform_admin() || api_is_allowed_
$action = api_get_self().'?sourceFile='.urlencode($file_name).'&curdirpath='.urlencode($_GET['curdirpath']).'&file='.urlencode($_GET['file']).'&doc='.urlencode($doc);
$form = new FormValidator('formEdit','post',$action);
// form title
$form->addElement('header', '', $nameTools);
$renderer = $form->defaultRenderer();
$form->addElement('hidden','filename');

@ -1,4 +1,4 @@
<?php // $Id: quota.php 19485 2009-04-01 20:27:56Z juliomontoya $
<?php // $Id: quota.php 19676 2009-04-09 09:14:37Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -30,49 +30,27 @@
==============================================================================
*/
/*
==============================================================================
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
$language_file = 'document';
// global settings initialisation
// also provides access to main api (inc/lib/main_api.lib.php)
// including the global dokeos file
include("../inc/global.inc.php");
/*
-----------------------------------------------------------
Libraries
-----------------------------------------------------------
*/
//many useful functions in main_api.lib.php, by default included
// including additional libraries
include_once(api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php');
include_once(api_get_path(LIBRARY_PATH) . 'document.lib.php');
/*
-----------------------------------------------------------
Constants and variables
-----------------------------------------------------------
*/
// some constants and variables
$courseDir = $_course['path']."/document";
$maxFilledSpace = DEFAULT_DOCUMENT_QUOTA;
/*
-----------------------------------------------------------
Header
-----------------------------------------------------------
*/
// breadcrumbs
$interbreadcrumb[]=array("url" => "document.php","name" => get_lang('Document'));
$nameTools = get_lang("DocumentQuota"); // title of the page
// title of the page
$nameTools = get_lang("DocumentQuota");
// display the header
Display::display_header($nameTools,"Doc");
@ -130,28 +108,18 @@ function display_quota($course_quota, $already_consumed_space)
echo $message;
}
/*
==============================================================================
MAIN CODE
==============================================================================
*/
echo '<div class="actions-title">';
echo $nameTools;
echo '</div>';
// getting the course quota
$course_quota = DocumentManager::get_course_quota();
// setting the full path
$full_path = $baseWorkDir . $courseDir;
// calculating the total space
$already_consumed_space = documents_total_space($_course);
// displaying the quota
display_quota($course_quota, $already_consumed_space);
/*
==============================================================================
FOOTER
==============================================================================
*/
// display the footer
Display::display_footer();
?>
Loading…
Cancel
Save