Fixing group add button

skala
Julio Montoya 14 years ago
parent fa6888526c
commit a5a8f10156
  1. 35
      main/social/groups.php

@ -511,13 +511,14 @@ if ($group_id != 0 ) {
$my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
}
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
} else {
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
}
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
}
}
break;
@ -544,19 +545,19 @@ if ($group_id != 0 ) {
break;
}
} else {
if (count($grid_my_groups) > 0) {
if (count($grid_my_groups) > 0) {
//echo '<h2>'.get_lang('MyGroups').'</h2>';
$my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
} else {
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
}
}
$my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
}
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
} else {
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
}
}
if (count($grid_newest_groups) > 0) {
//echo '<h2>'.get_lang('Newest').'</h2>';
$newest_content = Display::return_sortable_grid('newest', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false));

Loading…
Cancel
Save