Layout fixes

skala
Julio Montoya 13 years ago
parent 4165ad3f56
commit 8664c50003
  1. 4
      main/inc/lib/course.lib.php
  2. 41
      main/inc/lib/userportal.lib.php
  3. 28
      main/messages/new_message.php

@ -2722,8 +2722,8 @@ class CourseManager {
return $html;
}
public function course_item_parent($main_content, $sub_content) {
return '<div class="well2">'.$main_content.$sub_content.'</div>';
public function course_item_parent($main_content, $sub_content, $sub_sub_content = null) {
return '<div class="well2">'.$main_content.$sub_content.$sub_sub_content.'</div>';
}
/**

@ -1030,14 +1030,6 @@ class IndexManager {
define("CONFVAL_limitPreviewTo", SCRIPTVAL_NewEntriesOfTheDayOfLastLogin);
if (isset($_GET['history']) && intval($_GET['history']) == 1) {
echo Display::tag('h2', get_lang('HistoryTrainingSession'));
//if (empty($courses_tree[0]['sessions'])){
if (empty($courses_tree)) {
echo get_lang('YouDoNotHaveAnySessionInItsHistory');
}
}
/* PERSONAL COURSE LIST */
if (!isset ($maxValvas)) {
@ -1084,6 +1076,18 @@ class IndexManager {
}
}
$html = '';
if (isset($_GET['history']) && intval($_GET['history']) == 1) {
$html .= Display::tag('h2', get_lang('HistoryTrainingSession'));
//if (empty($courses_tree[0]['sessions'])){
if (empty($courses_tree)) {
$html .= get_lang('YouDoNotHaveAnySessionInItsHistory');
}
}
foreach ($personal_course_list as $my_course) {
$thisCourseSysCode = $my_course['k'];
$thisCoursePublicCode = $my_course['c'];
@ -1170,7 +1174,7 @@ class IndexManager {
}
} // End while mycourse...
$html = '';
if (is_array($courses_tree)) {
foreach ($courses_tree as $key => $category) {
@ -1283,38 +1287,25 @@ class IndexManager {
$params['title'] .= '</span>';
if (api_is_platform_admin()) {
$params['title'] .= '<div style="float: right;"><a href="'.api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$session['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'),22).'</a></div>';
$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$session['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'),22).'</a>';
}
$html .= CourseManager::course_item_parent(CourseManager::course_item_html($params), $html_courses_session);
//$html_sessions .= '</li>';
//$html_sessions .= $html_courses_session;
//$html_sessions .= '</ul>';
$html_sessions .= CourseManager::course_item_html($params).$html_courses_session;
}
}
if ($count_courses_session > 0) {
$params = array();
//$html .= '<div class="userportal-session-category-item span8" id="session_category_'.$category['details']['id'].'">';
//$html .= '<div class="session_category_title_box" id="session_category_title_box_'.$category['details']['id'].'" style="color: #555555;">';
$params['icon'] = Display::return_icon('folder_blue.png', get_lang('SessionCategory'), array(), ICON_SIZE_LARGE);
if (api_is_platform_admin()) {
$params['right_actions'] .= '<div style="float: right;"><a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_edit.php?&id='.$category['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(),22).'</a></div>';
$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_edit.php?&id='.$category['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(),22).'</a>';
}
$params['title'] .= $category['details']['name'];
if ($category['details']['date_end'] != '0000-00-00') {
$params['title'] .= sprintf(get_lang('FromDateXToDateY'),$category['details']['date_start'], $category['details']['date_end']);
}
//$html .= $html_sessions;
//$html .= '</div>';
$html .= CourseManager::course_item_parent(CourseManager::course_item_html($params), $html_sessions);
}
}

@ -109,8 +109,7 @@ function add_image_form() {
filepaths.appendChild(elem1);
id_elem1 = "filepath_"+counter_image;
id_elem1 = "\'"+id_elem1+"\'";
//document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.api_get_path(WEB_CODE_PATH).'img/delete.gif\"></a>";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<input type=\"text\" name=\"legend[]\" size=\"20\" />";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" class=\"span5\" />&nbsp;<input type=\"text\" name=\"legend[]\" size=\"20\" />";
if (filepaths.childNodes.length == 6) {
var link_attach = document.getElementById("link-more-attach");
if (link_attach) {
@ -180,21 +179,15 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null) {
$form->addElement('html',$sent_to);
}
if (empty($default['users'])) {
//the magic should be here
$pre_html = '<div class="row">
<div class="label">'.get_lang('SendMessageTo').'</div>
<div class="formw">';
$post = '</div></div>';
$multi_select = '<select id="users" name="users">
</select>';
$form->addElement('html',$pre_html.$multi_select.$post );
//fb select
$form->addElement('select', 'users', get_lang('SendMessageTo'), array(), array('id' => 'users'));
} else {
$form->addElement('hidden','hidden_user',$default['users'][0],array('id'=>'hidden_user'));
}
}
} else {
$group_info = GroupPortalManager::get_group_data($group_id);
$form->addElement('html','<div class="row"><div class="label">'.get_lang('ToGroup').'</div><div class="formw">'.api_xml_http_response_encode($group_info['name']).'</div></div>');
$form->addElement('hidden','group_id',$group_id);
$form->addElement('hidden','parent_id',$message_id);
@ -203,7 +196,6 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null) {
$form->add_textfield('title', get_lang('Subject'),true , array('size' => 54));
$form->add_html_editor('content', get_lang('Message'), false, false, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
//$form->addElement('textarea','content', get_lang('Message'), array('cols' => 75,'rows'=>8));
if (isset($_GET['re_id'])) {
$message_reply_info = MessageManager::get_message_by_id($_GET['re_id']);
@ -215,13 +207,13 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null) {
$default['content'] = '<br />'.sprintf(get_lang('XWroteY'), api_get_person_name($user_reply_info['firstname'], $user_reply_info['lastname']), Security::filter_terms($message_reply_info['content']));
}
if (empty($group_id)) {
$form->addElement('html','<div class="row"><div class="label">'.get_lang('FilesAttachment').'</div><div class="formw">
<span id="filepaths">
$form->addElement('advanced_settings',get_lang('FilesAttachment').'<span id="filepaths">
<div id="filepath_1">
<input type="file" name="attach_1" size="20" />
<input type="text" name="legend[]" size="20" />
</div></span></div></div>');
$form->addElement('html','<div class="row"><div class="label"></div><div class="formw"><span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')</div></div>');
<input type="file" name="attach_1" class="span5"/>
<input type="text" name="legend[]" size="20" /></div></span>');
$form->addElement('advanced_settings','<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')');
}
$form->addElement('style_submit_button','compose',api_xml_http_response_encode(get_lang('SendMessage')),'class="save"');

Loading…
Cancel
Save