Sfoglia il codice sorgente

[svn r21636] - Add button to search pages: edit, history, delete, discussion, what link here ?
- search pages: clarification of the text of the column headers

Juan Carlos Raña 15 anni fa
parent
commit
b6ecaee028
1 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. 9 1
      main/wiki/index.php

+ 9 - 1
main/wiki/index.php

@@ -3786,6 +3786,13 @@ function display_wiki_search_results($search_term, $search_content=0)
 			$row[] = '<a href="'.api_get_self().'?cidReq='.$_course[id].'&action=showpage&title='.urlencode($obj->reflink).'&group_id='.Security::remove_XSS($_GET['group_id']).'">'.$obj->title.'</a>';
 			$row[] = $obj->user_id <>0 ? '<a href="../user/userInfo.php?uInfo='.$userinfo['user_id'].'">'.$userinfo['lastname'].', '.$userinfo['firstname'].'</a>' : get_lang('Anonymous').' ('.$obj->user_ip.')';
 			$row[] = $year.'-'.$month.'-'.$day.' '.$hours.":".$minutes.":".$seconds;
+			
+			if(api_is_allowed_to_edit()|| api_is_platform_admin())
+			{
+				$showdelete=' <a href="'.api_get_self().'?cidReq='.$_course[id].'&action=delete&title='.urlencode(Security::remove_XSS($obj->reflink)).'&group_id='.Security::remove_XSS($_GET['group_id']).'"><img src="../img/delete.gif" title="'.get_lang('Delete').'" alt="'.get_lang('Delete').'" />';
+			}			
+			$row[] = '<a href="'.api_get_self().'?cidReq='.$_course[id].'&action=edit&title='.urlencode(Security::remove_XSS($obj->reflink)).'&group_id='.Security::remove_XSS($_GET['group_id']).'"><img src="../img/lp_quiz.png" title="'.get_lang('EditPage').'" alt="'.get_lang('EditPage').'" /></a> <a href="'.api_get_self().'?cidReq='.$_course[id].'&action=discuss&title='.urlencode(Security::remove_XSS($obj->reflink)).'&group_id='.Security::remove_XSS($_GET['group_id']).'"><img src="../img/comment_bubble.gif" title="'.get_lang('Discuss').'" alt="'.get_lang('Discuss').'" /></a> <a href="'.api_get_self().'?cidReq='.$_course[id].'&action=history&title='.urlencode(Security::remove_XSS($obj->reflink)).'&group_id='.Security::remove_XSS($_GET['group_id']).'"><img src="../img/history.gif" title="'.get_lang('History').'" alt="'.get_lang('History').'" /></a> <a href="'.api_get_self().'?cidReq='.$_course[id].'&action=links&title='.urlencode(Security::remove_XSS($obj->reflink)).'&group_id='.Security::remove_XSS($_GET['group_id']).'"><img src="../img/lp_link.png" title="'.get_lang('LinksPages').'" alt="'.get_lang('LinksPages').'" /></a>'.$showdelete;		
+			
 			$rows[] = $row;
 		}
 
@@ -3796,7 +3803,8 @@ function display_wiki_search_results($search_term, $search_content=0)
 		$table->set_header(1,get_lang('Title'), true);
 		$table->set_header(2,get_lang('Author').' ('.get_lang('LastVersion').')', true);
 		$table->set_header(3,get_lang('Date').' ('.get_lang('LastVersion').')', true);
-
+		$table->set_header(4,get_lang('Actions'), true, array ('style' => 'width:100px;'));
+		
 		$table->display();
 	}
 	else