|
|
|
@ -1503,22 +1503,20 @@ if (!isset($folders) || $folders === false) { |
|
|
|
|
$folders = array(); |
|
|
|
|
} |
|
|
|
|
$btngroup= array('class' => 'btn btn-default'); |
|
|
|
|
$actions = '<div class="actions">'; |
|
|
|
|
$actions .= '<div class="row">'; |
|
|
|
|
$actions .= '<div class="col-md-8">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* GO TO PARENT DIRECTORY */ |
|
|
|
|
|
|
|
|
|
if ($curdirpath != '/' && $curdirpath != $group_properties['directory'] && !$is_certificate_mode) { |
|
|
|
|
|
|
|
|
|
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$parent_id.'">'; |
|
|
|
|
$actions .= Display::return_icon('folder_up.png', get_lang('Up'), '', ICON_SIZE_MEDIUM); |
|
|
|
|
$actions .= '</a>'; |
|
|
|
|
$actionsLeft = '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$parent_id.'">'; |
|
|
|
|
$actionsLeft .= Display::return_icon('folder_up.png', get_lang('Up'), '', ICON_SIZE_MEDIUM); |
|
|
|
|
$actionsLeft .= '</a>'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($is_certificate_mode && $curdirpath != '/certificates') { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('folder_up.png', get_lang('Up'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_self().'?'.api_get_cidreq().'&curdirpath='.$curdirpath |
|
|
|
|
); |
|
|
|
@ -1536,7 +1534,7 @@ if ($is_allowed_to_edit || |
|
|
|
|
// Create new document |
|
|
|
|
|
|
|
|
|
if (!$is_certificate_mode) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_document.png', get_lang('CreateDoc'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/create_document.php?'.api_get_cidreq().'&id='.$document_id |
|
|
|
|
); |
|
|
|
@ -1544,18 +1542,18 @@ if ($is_allowed_to_edit || |
|
|
|
|
// Create new draw |
|
|
|
|
if (api_get_setting('enabled_support_svg') == 'true') { |
|
|
|
|
if (api_browser_support('svg')) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_draw.png', get_lang('Draw'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/create_draw.php?'.api_get_cidreq().'&id='.$document_id |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
$actions .= Display::return_icon('new_draw_na.png', get_lang('BrowserDontSupportsSVG'), '', ICON_SIZE_MEDIUM); |
|
|
|
|
$actionsLeft .= Display::return_icon('new_draw_na.png', get_lang('BrowserDontSupportsSVG'), '', ICON_SIZE_MEDIUM); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Create new paint |
|
|
|
|
if (api_get_setting('enabled_support_pixlr') == 'true') { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_paint.png', get_lang('PhotoRetouching'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/create_paint.php?'.api_get_cidreq().'&id='.$document_id |
|
|
|
|
); |
|
|
|
@ -1563,7 +1561,7 @@ if ($is_allowed_to_edit || |
|
|
|
|
|
|
|
|
|
// Record an image clip from my webcam |
|
|
|
|
if (api_get_setting('enable_webcam_clip') == 'true') { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('webcam.png', get_lang('WebCamClip'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/webcam_clip.php?'.api_get_cidreq().'&id='.$document_id |
|
|
|
|
); |
|
|
|
@ -1571,7 +1569,7 @@ if ($is_allowed_to_edit || |
|
|
|
|
|
|
|
|
|
// Record audio (nanogong) |
|
|
|
|
if (api_get_setting('enable_nanogong') == 'true') { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_recording.png', get_lang('RecordMyVoice'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/record_audio.php?'.api_get_cidreq().'&id='.$document_id |
|
|
|
|
); |
|
|
|
@ -1579,7 +1577,7 @@ if ($is_allowed_to_edit || |
|
|
|
|
|
|
|
|
|
// Record audio (wami record) |
|
|
|
|
if (api_get_setting('enable_wami_record') == 'true') { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_recording.png', get_lang('RecordMyVoice'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/record_audio_wami.php?'.api_get_cidreq().'&id='.$document_id |
|
|
|
|
); |
|
|
|
@ -1589,7 +1587,7 @@ if ($is_allowed_to_edit || |
|
|
|
|
if (api_get_setting('enabled_text2audio') == 'true') { |
|
|
|
|
$dt2a = 'google'; |
|
|
|
|
$req_dt2a = '&dt2a='.$dt2a; |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_sound.png', get_lang('CreateAudio'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/create_audio.php?'.api_get_cidreq().'&id='.$document_id.$req_dt2a |
|
|
|
|
); |
|
|
|
@ -1598,19 +1596,19 @@ if ($is_allowed_to_edit || |
|
|
|
|
|
|
|
|
|
// Create new certificate |
|
|
|
|
if ($is_certificate_mode) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_certificate.png', get_lang('CreateCertificate'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/create_document.php?'.api_get_cidreq().'&id='.$document_id.'&certificate=true&selectcat='.$selectcat |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
// File upload link |
|
|
|
|
if ($is_certificate_mode) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('upload_certificate.png', get_lang('UploadCertificate'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/upload.php?'.api_get_cidreq().'&id='.$current_folder_id.'&certificate=true' |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('upload_file.png', get_lang('UplUploadDocument'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/upload.php?'.api_get_cidreq().'&id='.$current_folder_id |
|
|
|
|
); |
|
|
|
@ -1620,8 +1618,8 @@ if ($is_allowed_to_edit || |
|
|
|
|
echo Display::display_icon('capture.png', get_lang('CatchScreenCasts'), '', ICON_SIZE_MEDIUM).'</a>';*/ |
|
|
|
|
|
|
|
|
|
if ($capturePluginInstalled) { |
|
|
|
|
$actions .= '<span id="appletplace"></span>'; |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= '<span id="appletplace"></span>'; |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('capture.png', get_lang('CatchScreenCasts'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
'#', |
|
|
|
|
array('id' => 'jcapture') |
|
|
|
@ -1630,7 +1628,7 @@ if ($is_allowed_to_edit || |
|
|
|
|
|
|
|
|
|
// Create directory |
|
|
|
|
if (!$is_certificate_mode) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('new_folder.png', get_lang('CreateDir'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&id='.$document_id.'&createdir=1' |
|
|
|
|
); |
|
|
|
@ -1638,22 +1636,19 @@ if ($is_allowed_to_edit || |
|
|
|
|
} |
|
|
|
|
require 'document_slideshow.inc.php'; |
|
|
|
|
if ($image_present && !isset($_GET['keyword'])) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('slideshow.png', get_lang('ViewSlideshow'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/slideshow.php?'.api_get_cidreq().'&curdirpath='.$curdirpathurl |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('percentage.png', get_lang('DocumentQuota'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'document/document_quota.php?'.api_get_cidreq() |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$actions .= '</div>'; |
|
|
|
|
$actions .= '<div class="col-md-4">'; |
|
|
|
|
$actions .= '<div class="pull-right">'; |
|
|
|
|
if (!$is_certificate_mode) { |
|
|
|
|
/* BUILD SEARCH FORM */ |
|
|
|
|
|
|
|
|
@ -1670,14 +1665,8 @@ if (!$is_certificate_mode) { |
|
|
|
|
$form->addElement('hidden', 'id_session', api_get_session_id()); |
|
|
|
|
$form->addElement('hidden', 'gidReq', $groupId); |
|
|
|
|
$form->addButtonSearch(get_lang('Search')); |
|
|
|
|
$actions .= $form->returnForm(); |
|
|
|
|
$actionsRight = $form->returnForm(); |
|
|
|
|
} |
|
|
|
|
$actions .= '</div>'; |
|
|
|
|
$actions .= '</div>'; |
|
|
|
|
$actions .= '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$table_footer = ''; |
|
|
|
|
$total_size = 0; |
|
|
|
@ -1841,7 +1830,7 @@ if (!is_null($documentAndFolders)) { |
|
|
|
|
|| api_is_allowed_to_edit() |
|
|
|
|
|| api_is_platform_admin() |
|
|
|
|
) { |
|
|
|
|
$actions .= Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon( |
|
|
|
|
'save_pack.png', |
|
|
|
|
get_lang('Save').' (ZIP)', |
|
|
|
@ -1855,7 +1844,6 @@ if (!is_null($documentAndFolders)) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$actions .= '</div>'; |
|
|
|
|
|
|
|
|
|
if (!empty($moveTo)) { |
|
|
|
|
$document_id = DocumentManager::get_document_id($courseInfo, $moveTo); |
|
|
|
@ -1978,8 +1966,9 @@ if (!empty($groupId)) { |
|
|
|
|
} else { |
|
|
|
|
Display::display_introduction_section(TOOL_DOCUMENT); |
|
|
|
|
} |
|
|
|
|
$toolbar = Display::toolbarAction('toolbar-document',array(0 => $actionsLeft, 1 => $actionsRight)); |
|
|
|
|
|
|
|
|
|
echo $actions; |
|
|
|
|
echo $toolbar; |
|
|
|
|
echo $templateForm; |
|
|
|
|
echo $moveForm; |
|
|
|
|
echo $dirForm; |
|
|
|
|