Display: Update icons positions in action bars (more coherent between tools) of dropbox, forum, grade book, learning path and wiki

pull/2782/head
Yannick Warnier 7 years ago
parent 1b9579a47c
commit fb1b1103d7
  1. 20
      main/dropbox/index.php
  2. 27
      main/forum/index.php
  3. 30
      main/gradebook/lib/fe/displaygradebook.php
  4. 9
      main/lp/learnpath.class.php
  5. 24
      main/lp/lp_list.php
  6. 24
      main/wiki/wiki.inc.php

@ -282,6 +282,11 @@ if ($action != 'add') {
/* Menu Sent */
if (api_get_session_id() == 0) {
echo '<div class="actions">';
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
if ($view_dropbox_category_sent != 0) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM).
@ -291,15 +296,15 @@ if ($action != 'add') {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n";
}
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
echo '</div>';
} else {
if (api_is_allowed_to_session_edit(false, true)) {
echo '<div class="actions">';
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
if ($view_dropbox_category_sent != 0) {
echo get_lang('CurrentlySeeing').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
@ -309,11 +314,6 @@ if ($action != 'add') {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n";
}
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
echo '</div>';
}
}

@ -182,21 +182,8 @@ if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])) {
$url
);
}
if (!empty($allCourseForums)) {
$actionLeft .= search_link();
}
if (api_is_allowed_to_edit(false, true)) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddForumCategory'),
null,
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add&content=forumcategory&lp_id='.$lp_id
);
if (is_array($forumCategories) && !empty($forumCategories)) {
$actionLeft .= Display::url(
Display::return_icon(
@ -208,6 +195,20 @@ if (api_is_allowed_to_edit(false, true)) {
api_get_self().'?'.api_get_cidreq().'&action=add&content=forum&lp_id='.$lp_id
);
}
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddForumCategory'),
null,
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add&content=forumcategory&lp_id='.$lp_id
);
}
if (!empty($allCourseForums)) {
$actionLeft .= search_link();
}
$actions = Display::toolbarAction('toolbar-forum', [$actionLeft]);

@ -400,15 +400,6 @@ class DisplayGradebook
$actionsRight = '';
$my_api_cidreq = api_get_cidreq();
if (api_is_allowed_to_edit(null, true)) {
if (empty($grade_model_id) || $grade_model_id == -1) {
$actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.
Display::return_icon(
'new_folder.png',
get_lang('AddGradebook'),
[],
ICON_SIZE_MEDIUM
).'</a></td>';
}
if ($selectcat != '0') {
$my_category = $catobj->showAllCategoryInfo($catobj->get_id());
if ($my_api_cidreq == '') {
@ -416,18 +407,31 @@ class DisplayGradebook
}
if ($show_add_link && !$message_resource) {
$actionsLeft .= '<a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'" >'.
Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '',
ICON_SIZE_MEDIUM).'</a>';
$cats = Category::load($selectcat);
if ($cats[0]->get_course_code() != null && !$message_resource) {
$actionsLeft .= '<a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '',
ICON_SIZE_MEDIUM).'</a>';
} else {
$actionsLeft .= '<a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '',
ICON_SIZE_MEDIUM).'</a>';
}
}
}
if (empty($grade_model_id) || $grade_model_id == -1) {
$actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.
Display::return_icon(
'new_folder.png',
get_lang('AddGradebook'),
[],
ICON_SIZE_MEDIUM
).'</a></td>';
}
if ($selectcat != '0') {
if (!$message_resource) {
$actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
Display::return_icon('statistics.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>';

@ -6851,6 +6851,15 @@ class learnpath
) {
$actionsLeft = '';
$actionsRight = '';
$actionsLeft .= Display::url(
Display::return_icon(
'back.png',
get_lang('ReturnToLearningPaths'),
'',
ICON_SIZE_MEDIUM
),
'lp_controller.php?'.api_get_cidreq()
);
$actionsLeft .= Display::url(
Display::return_icon(
'preview_view.png',

@ -74,18 +74,6 @@ $actions = '';
if ($is_allowed_to_edit) {
$actionLeft = '';
if (!$sessionId) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddCategory'),
[],
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add_lp_category'
);
}
$actionLeft .= Display::url(
Display::return_icon(
'new_learnpath.png',
@ -116,6 +104,18 @@ if ($is_allowed_to_edit) {
'../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH
);
}
if (!$sessionId) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddCategory'),
[],
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add_lp_category'
);
}
$actions = Display::toolbarAction('actions-lp', [$actionLeft]);
}

@ -6033,7 +6033,7 @@ class Wiki
'addnew'
).'>'
.Display::return_icon(
'add.png',
'new_document.png',
get_lang('AddNew'),
'',
ICON_SIZE_MEDIUM
@ -6069,7 +6069,7 @@ class Wiki
get_lang('SearchPages'),
'',
ICON_SIZE_MEDIUM
).'</a></li>';
).'</a>';
///menu more
$actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=searchpages&session_id='.$session_id.'&group_id='.$groupId.'&action=more&title='.api_htmlentities(
urlencode($page)
@ -6079,18 +6079,28 @@ class Wiki
get_lang('Statistics'),
'',
ICON_SIZE_MEDIUM
).'</a></li>';
).'</a>';
// menu all pages
$actionsLeft .= '<a class="btn btn-default" href="index.php?cidReq='.$_course['id'].'&action=allpages&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
$actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=allpages&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
'allpages'
).'>'.
get_lang('AllPages').'</a>';
Display::return_icon(
'list_badges.png',
get_lang('AllPages'),
'',
ICON_SIZE_MEDIUM
).'</a>';
// menu recent changes
$actionsLeft .= '<a class="btn btn-default" href="index.php?cidReq='.$_course['id'].'&action=recentchanges&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
$actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=recentchanges&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
'recentchanges'
).'>'.
get_lang('RecentChanges').'</a>';
Display::return_icon(
'history.png',
get_lang('RecentChanges'),
'',
ICON_SIZE_MEDIUM
) .'</a>';
echo Display::toolbarAction('toolbar-wiki', [$actionsLeft]);
}

Loading…
Cancel
Save