<commit_before><%@ page import="musement.Category" %>
<%@ page import="musement.user.User" %>
<!-- Alerts Info/Error -->
<g:render template="../category/alerts" model="[category: Category.findById(categoryId)]"/>

<div class="pull-left" style="text-align: center; width: 27%; margin: 20px auto">
    <h1>${message(code: "musement.control.panel.users.title")}</h1>

    <div class="well well-large">
        <div class="btn-group-vertical">
            <g:each in="${User.findAll().sort{it.id}}" var="user">
                <g:if test="${user.id == params.getInt("userId")}">
                    <g:link class="btn btn-success" controller="controlPanel" action="index" params='[editMode: "user", userId: user.id]'>${user.username}</g:link>
                </g:if>
                <g:else>
                    <g:link class="btn" controller="controlPanel" action="index" params='[editMode: "user", userId: user.id]'>${user.username}</g:link>
                </g:else>
            </g:each>
        </div>
    </div>
</div>

<div class="pull-right" style="width: 67%; overflow: auto;">
    <div style="margin: 50px auto auto 50px">
        <h1>${message(code: "musement.control.panel.users.description")}</h1>
        <div class="hero-unit">
            <g:set var="user" value="${User.findById(params.getInt('userId'))}" />
            <div class="badge-info">
                <g:if test="${user!= null}">
                    <span>${message(code: "musement.control.panel.users.categories")}</span>
                    <span>${user.categories.size()}</span>
                    </g:if>
            </div>
            <div class="badge-info">
                <g:if test="${user!= null}">
                    <span>${message(code: "musement.control.panel.users.posts")}</span>
                    <span>${user.posts.size()}</span>
                </g:if>
            </div>
            <g:link class="btn btn-danger" controller="userManagement" action="deleteUser" onclick="return confirm(${message(code: "musement.control.panel.users.sure")})" params='[userId: params.userId]'>${message(code: "musement.control.panel.categories.delete")}</g:link>
        </div>
    </div>
</div><commit_msg>#99 Create Control Panel Added other option in ManageUser<commit_after><%@ page import="musement.Category" %>
<%@ page import="musement.user.User" %>
<%@ page import="musement.user.Roles" %>
<!-- Alerts Info/Error -->
<g:render template="../category/alerts" model="[category: Category.findById(categoryId)]"/>

<div class="pull-left" style="text-align: center; width: 27%; margin: 20px auto">
    <h1>${message(code: "musement.control.panel.users.title")}</h1>

    <div class="well well-large">
        <div class="btn-group-vertical">
            <g:each in="${User.findAll().sort{it.id}}" var="user">
                <g:if test="${user.id == params.getInt("userId")}">
                    <g:link class="btn btn-success" controller="controlPanel" action="index" params='[editMode: "user", userId: user.id]'>${user.username}</g:link>
                </g:if>
                <g:else>
                    <g:link class="btn" controller="controlPanel" action="index" params='[editMode: "user", userId: user.id]'>${user.username}</g:link>
                </g:else>
            </g:each>
        </div>
    </div>
</div>

<div class="pull-right" style="width: 67%; overflow: auto;">
    <div style="margin: 50px auto auto 50px">
        <div class="hero-unit">
            <g:set var="user" value="${User.findById(params.getInt('userId'))}" />
                    <h4>${message(code: "musement.control.panel.users.categories")}<span class="badge badge-info">${user?.categories.size()}</span></h4>
                    <h4>${message(code: "musement.control.panel.users.posts")}<span class="badge badge-info">${user?.posts.size()}</span></h4>
            <g:link class="btn btn-danger" controller="userManagement" action="deleteUser" onclick="return confirm(${message(code: "musement.control.panel.users.sure")})" params='[userId: params.userId]'>${message(code: "musement.control.panel.categories.delete")}</g:link>
            <g:if test="${user.authorities.contains(Roles.ROLE_USER.role)}">
                <g:link class="btn btn-primary" controller="userManagement" action="makeAdmin" params='[userId: user.id]'>${message(code: "musement.control.panel.users.admin.make")}</g:link>
            </g:if>
            <g:if test="${user.authorities.contains(Roles.ROLE_ADMIN.role)}">
                <g:link class="btn btn-warning" controller="userManagement" action="removeAdmin" params='[userId: user.id]'>${message(code: "musement.control.panel.users.admin.remove")}</g:link>
            </g:if>
        </div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.20585738539898132, 'fraction_numerical': 0.006791171477079796, 'mean_word_length': 2.9738617200674535, 'pattern_counts': {'":': 0, '<': 100, '<?xml version=': 0, '>': 100, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '411865', 'n_tokens_mistral': 1512, 'n_tokens_neox': 1465, 'n_words': 237}