ソースを参照

Minor - cosmetic changes

Julio Montoya 12 年 前
コミット
6a41e6678d
2 ファイル変更10 行追加7 行削除
  1. 8 5
      main/newscorm/lp_list.php
  2. 2 2
      web/index.php

+ 8 - 5
main/newscorm/lp_list.php

@@ -129,22 +129,25 @@ foreach ($categories as $item) {
 
     $edit_link = null;
     $delete_link = null;
-    if ($item->getId() > 0) {
+    $moveUpLink = null;
+    $moveDownLink = null;
+
+    if ($item->getId() > 0 && api_is_allowed_to_edit()) {
         $url = 'lp_controller.php?'.api_get_cidreq().'&action=add_lp_category&id='.$item->getId();
+
         $edit_link = Display::url(Display::return_icon('edit.png', get_lang('Edit')), $url);
         $delete_url = 'lp_controller.php?'.api_get_cidreq().'&action=delete_lp_category&id='.$item->getId();
-
-
         $moveUpUrl = 'lp_controller.php?'.api_get_cidreq().'&action=move_up_category&id='.$item->getId();
         $moveDownUrl = 'lp_controller.php?'.api_get_cidreq().'&action=move_down_category&id='.$item->getId();
 
         if ($counter == 1) {
-            $moveUpLink = Display::return_icon('up_na.png', get_lang('Move'));
+            $moveUpLink = Display::url(Display::return_icon('up_na.png', get_lang('Move')), '#');
         } else {
             $moveUpLink = Display::url(Display::return_icon('up.png', get_lang('Move')), $moveUpUrl);
         }
+
         if (($total -1) == $counter) {
-            $moveDownLink = Display::return_icon('down_na.png', get_lang('Move'));
+            $moveDownLink = Display::url(Display::return_icon('down_na.png', get_lang('Move')), '#');
         } else {
             $moveDownLink = Display::url(Display::return_icon('down.png', get_lang('Move')), $moveDownUrl);
         }

+ 2 - 2
web/index.php

@@ -1,13 +1,13 @@
 <?php
 /* For licensing terms, see /license.txt */
 
-//Classic global.inc.php file now returns a Application object
+// Classic global.inc.php file now returns a Application object
 $app = require_once '../main/inc/global.inc.php';
 
 /*
     In order to execute Chamilo, $app->run() is needed.
     $app->run(); shows a page depending of the URL for example when entering in "/web/index"
-    Chamilo will render the Controller IndexController->indexAction() this is because a router was assign at the end of
+    Chamilo will render the controller IndexController->indexAction() this is because a router was assign at the end of
     global.inc.php:
 
         $app->get('/index', 'index.controller:indexAction')->bind('index');