<commit_before><% from MaKaC.common.fossilize import fossilize %>
<% import MaKaC.webinterface.urlHandlers as urlHandlers %>
<table width="90%" align="left" border="0" style="padding-top:10px;">
    <tr>
        <td id="revControlPRMHelp"  colspan="3" class="groupTitle"><%= _("Assign reviewers by track")%></td>
    </tr>
    <tr>
        <td colspan="3">
            <div style="padding:5px; color:gray;">
                <% if tracks: %>
                    <span class="collShowBookingsText"><%=_("Note that the reviewers will be track coordinators of that track.")%></span>
                <% end %>
                <% else: %>
                    <span class="collShowBookingsText"><%=_("There are no tracks created yet. Please go to the menu ")%><a href="<%= urlHandlers.UHConfModifProgram.getURL(conf) %>"><%= _("Programme")%></a><%=_(" to create tracks.")%></span>
                <% end %>
            </div>
        </td>
    </tr>
</table>
<table width="50%" align="left">
<% for track in tracks: %>
    <tr>
        <td>
            <table width="50%" align="left" style="padding-left:20px; padding-bottom:15px; width:500px;">
                <tr>
                    <td class="subGroupTitle"><%= track.getTitle() %></td>
                </tr>
                <tr>
                    <td width="80%" style="padding-top: 5px; padding-left:3px;"><div id="track_<%=track.getId()%>"></div></td>
                </tr>
            </table>
        </td>
    </tr>
<% end %>
</table>

<script type="text/javascript">

var trackIds = <%= trackIds %>;

var listOfAddHandlers = {};

<% for i in trackIds: %>
    // set the track id
    trackId = 'track_'+ '<%= i %>';

    // Create the handlers
    var addReviewerHandler = function(userList, setResult) {
        indicoRequest(
                'abstractReviewing.team.addReviewer',
                {
                    conference: '<%= conf.getId() %>',
                    track: '<%= i %>',
                    userList: useList
                },
                function(result,error) {
                    if (!error) {
                        setResult(true);
                    } else {
                        IndicoUtil.errorReport(error);
                        setResult(false);
                    }
                }
        );
    };

    var removeReviewerHandler = function(user, setResult) {
    	indicoRequest(
                'abstractReviewing.team.removeReviewer',
                {
                    conference: '<%= conf.getId() %>',<commit_msg>[FIX] Bug from previous commit<commit_after><% from MaKaC.common.fossilize import fossilize %>
<% import MaKaC.webinterface.urlHandlers as urlHandlers %>
<table width="90%" align="left" border="0" style="padding-top:10px;">
    <tr>
        <td id="revControlPRMHelp"  colspan="3" class="groupTitle"><%= _("Assign reviewers by track")%></td>
    </tr>
    <tr>
        <td colspan="3">
            <div style="padding:5px; color:gray;">
                <% if tracks: %>
                    <span class="collShowBookingsText"><%=_("Note that the reviewers will be track coordinators of that track.")%></span>
                <% end %>
                <% else: %>
                    <span class="collShowBookingsText"><%=_("There are no tracks created yet. Please go to the menu ")%><a href="<%= urlHandlers.UHConfModifProgram.getURL(conf) %>"><%= _("Programme")%></a><%=_(" to create tracks.")%></span>
                <% end %>
            </div>
        </td>
    </tr>
</table>
<table width="50%" align="left">
<% for track in tracks: %>
    <tr>
        <td>
            <table width="50%" align="left" style="padding-left:20px; padding-bottom:15px; width:500px;">
                <tr>
                    <td class="subGroupTitle"><%= track.getTitle() %></td>
                </tr>
                <tr>
                    <td width="80%" style="padding-top: 5px; padding-left:3px;"><div id="track_<%=track.getId()%>"></div></td>
                </tr>
            </table>
        </td>
    </tr>
<% end %>
</table>

<script type="text/javascript">

var trackIds = <%= trackIds %>;

var listOfAddHandlers = {};

<% for i in trackIds: %>
    // set the track id
    trackId = 'track_'+ '<%= i %>';

    // Create the handlers
    var addReviewerHandler = function(userList, setResult) {
        indicoRequest(
                'abstractReviewing.team.addReviewer',
                {
                    conference: '<%= conf.getId() %>',
                    track: '<%= i %>',
                    userList: userList
                },
                function(result,error) {
                    if (!error) {
                        setResult(true);
                    } else {
                        IndicoUtil.errorReport(error);
                        setResult(false);
                    }
                }
        );
    };

    var removeReviewerHandler = function(user, setResult) {
    	indicoRequest(
                'abstractReviewing.team.removeReviewer',
                {
                    conference: '<%= conf.getId() %>',
{'fraction_non_alphanumeric': 0.16463174478141002, 'fraction_numerical': 0.009058684521465145, 'mean_word_length': 1.6887241926945473, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 121, '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': '2765158', 'n_tokens_mistral': 1581, 'n_tokens_neox': 1409, 'n_words': 308}