Commit 3bc1a060 authored by Penom Nom's avatar Penom Nom
Browse files

update user info (correction)

parent fd3a89ee
......@@ -582,7 +582,10 @@ class tx_nG6_eid {
print '2';
}
}
else if ($type == 'get_user_group'){
$id = trim(t3lib_div::_GP('id'));
print json_encode(tx_nG6_db::get_group_informations(tx_nG6_db::get_user_usergroup($id)));
}
elseif($type == 'runs_table') {
$smarty = new Smarty();
$smarty->setTemplateDir(t3lib_extMgm::extPath('nG6').'/pi1');
......
......@@ -2347,7 +2347,7 @@ class tx_nG6_db {
*/
function get_group_informations($group_id){
$queryParts = Array(
'SELECT' => 'fe_groups.uid, fe_groups.title, fe_groups.description, fe_groups.crdate, fe_groups.cruser_id ',
'SELECT' => 'fe_groups.uid, fe_groups.title, fe_groups.description, fe_groups.crdate, fe_groups.cruser_id, fe_groups.tx_nG6_organism, fe_groups.tx_nG6_location ',
'FROM' => 'fe_groups',
'WHERE' => 'fe_groups.uid='.$group_id,
'GROUPBY' => '',
......@@ -2362,7 +2362,9 @@ class tx_nG6_db {
'title' => $res_row['title'],
'description' => $res_row['description'],
'crdate' => $res_row['crdate'],
'cruser_id' => $res_row['cruser_id']
'cruser_id' => $res_row['cruser_id'],
'organism' => $res_row['tx_nG6_organism'],
'location' => $res_row['tx_nG6_location']
);
}
return $res_tab;
......
......@@ -92,15 +92,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{if $login_user}
<div class="tab-pane fade" id="users">
{* Find out if the current user needs comboboxes *}
{assign var="needs_action" value=false}
{foreach from=$project_users key=c_user_id item=user_values}
{if $projects[key($projects)].is_admin && $user_values.id!=$user_id}
{assign var="needs_action" value=true}
{elseif $projects[key($projects)].is_manager && $user_values.id!=$user_id && $user_values.right_id!='2'}
{assign var="needs_action" value=true}
{/if}
{/foreach}
<input type="hidden" id="current_project_id" value="{$projects[key($projects)].id}" />
<p>
{if $projects[key($projects)].is_admin}
......@@ -114,9 +105,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<table class="table table-striped table-bordered dataTable" id="users_data_table">
<thead>
<tr>
{if $needs_action}
<th><center><input type="checkbox" id="chk_all_user"></center></th>
{/if}
<th><center><input type="checkbox" id="chk_all_user"></center></th>
<th nowrap>Login</th>
<th>Last login</th>
<th>Creator</th>
......@@ -138,9 +127,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<tr id="tr_user_{$user_values.id}" class="{$emphasis}">
{if ($user_values.cruser_id==$user_id)
|| ($user_values.cruser_id != $user_id && $user_values.id == $user_id && ($projects[key($projects)].is_admin || $projects[key($projects)].is_manager) ) }
|| ($user_values.cruser_id != $user_id && $user_values.id == $user_id && ($projects[key($projects)].is_admin || $projects[key($projects)].is_manager) )
|| ($user_values.id == $user_id ) }
<td><center><input type="checkbox" id="chk_user_{$user_values.id}" value="user_{$user_values.id}" /></center></td>
{elseif $needs_action}
{else}
<td></td>
{/if}
......@@ -199,30 +189,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tr>
{/foreach}
</tbody>
{if $projects[key($projects)].is_admin || $projects[key($projects)].is_manager}
<tfoot>
<tr>
<th align="left" colspan="7">
With selection :
<div class="btn-group">
<button id="add_user" type="button" class="btn nou-selection-btn btn-small"><i class="icon-plus"></i> add user</button>
<button id="del_user" type="button" class="btn multipleu-selection-btn btn-small"><i class="icon-minus"></i> delete user</button>
<button id="update_user" type="button" class="btn singleu-selection-btn btn-small"><i class="icon-refresh"></i> update user</button>
</div>
</th>
</tr>
</tfoot>
{elseif $user_values.id==$user_id }
<tfoot>
<tr>
<th align="left" colspan="7">
With selection :
<button id="update_user" type="button" class="btn btn-small"><i class="icon-refresh"></i> update user</button>
</th>
</tr>
</tfoot>
{/if}
{assign var="disabled" value=""}
{assign var="nou_selection_btn" value="nou-selection-btn"}
{assign var="multipleu_selection_btn" value="multipleu-selection-btn"}
{if $projects[key($projects)].is_admin || $projects[key($projects)].is_manager}
{elseif $user_values.id==$user_id}
{assign var="disabled_delete" value="disabled"}
{assign var="disabled" value="disabled"}
{assign var="nou_selection_btn" value=""}
{assign var="multipleu_selection_btn" value=""}
{/if}
<tfoot>
<tr>
<th align="left" colspan="8">
With selection :
<div class="btn-group">
<button id="add_user" type="button" class="btn {$nou_selection_btn} btn-small" {$disabled}><i class="icon-plus"></i> add user</button>
<button id="del_user" type="button" class="btn {$multipleu_selection_btn} btn-small" {$disabled}><i class="icon-minus"></i> delete user</button>
<button id="update_user" type="button" class="btn singleu-selection-btn btn-small"><i class="icon-refresh"></i> update user</button>
</div>
</th>
</tr>
</tfoot>
</table>
</div>
{/if}
......
......@@ -162,6 +162,7 @@ ul li.parameter { list-style: none; margin-left: -25px; padding-left: 17px; back
}
.tx-nG6-pi1-add-new { text-align: justify; margin-left: 20px; font-size:14px; padding-top: 10px; height: 300px; background: url(../img/add_user.png) 10px no-repeat; background-size: 7em auto; }
.tx-nG6-pi1-update-user { text-align: justify; margin-left: 20px; font-size:14px; padding-top: 10px; height: 300px; background: url(../img/update_user.png) 10px no-repeat; background-size: 7em auto; }
.ui-autocomplete-loading { background: white url('../img/mini_light_wait.gif') right center no-repeat; }
.ui-menu-item {
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment