<commit_before><%inherit file="project/project_base.mako"/>
<%def name="title()">${node['title']} Contributors</%def>

<%include file="project/modal_generate_private_link.mako"/>
<%include file="project/modal_add_contributor.mako"/>

<div class="page-header  visible-xs">
  <h2 class="text-300">Sharing</h2>
</div>

<div class="row">
    <div class="col-lg-10 col-lg-offset-1">

            <div id="manageContributors" class="scripted">
                <h3> Contributors
                    <!-- ko if: canEdit -->
                        <a href="#addContributors" data-toggle="modal" class="btn btn-success btn-sm" style="margin-left:20px;margin-top: -3px">
                          <i class="fa fa-plus"></i> Add
                        </a>
                    <!-- /ko -->
                </h3>
                % if 'admin' in user['permissions'] and not node['is_registration']:
                    <p>Drag and drop contributors to change listing order.</p>
                % endif
                <table id="manageContributorsTable" class="table">
                    <thead>
                        <tr>
                        <th class="col-md-6">Name</th>
                        <th class="col-md-2">
                            Permissions
                            <i class="fa fa-question-circle permission-info"
                                    data-toggle="popover"
                                    data-title="Permission Information"
                                    data-container="body"
                                    data-placement="right"
                                    data-html="true"
                                ></i>
                        </th>
                        <th class="col-md-3">
                            Bibliographic Contributor
                            <i class="fa fa-question-circle visibility-info"
                                    data-toggle="popover"
                                    data-title="Bibliographic Contributor Information"
                                    data-container="body"
                                    data-placement="right"
                                    data-html="true"
                                ></i>
                        </th>
                        <th class="col-md-1">
                        </th>
                        </tr>
                    </thead>
                    <tbody data-bind="sortable: {
                            template: 'contribTpl',
                            data: contributors,
                            as: 'contributor',
                            isEnabled: canEdit,
                            options: {
                              containment: '#manageContributors'
                            }
                        }">
                    </tbody>
                  </table>

                <div data-bind="if: adminContributors.length">
                    <h4>
                      Admins on Parent Projects
                      <i class="fa fa-question-circle admin-info"
                              data-content="These users are not contributors on
                              this component but can view and register it because they
                                are administrators on a parent project."
                              data-toggle="popover"
                              data-title="Admins on Parent Projects"
                              data-container="body"
                              data-placement="right"
                              data-html="true"
                          ></i>
                    </h4>
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="col-md-6"></th>
                                <th class="col-md-2"></th>
                                <th class="col-md-3"></th>
                                <th class="col-md-1"></th>
                            </tr>
                        </thead>
                        <tbody data-bind="template: {
                                name: 'contribTpl',
                                foreach: adminContributors,
                                as: 'contributor'
                            }">
                        </tbody>
                    </table>
                </div>
                ${buttonGroup()}
            </div>


    % if 'admin' in user['permissions']:
        <h3>View-only Links
            <a href="#addPrivateLink" data-toggle="modal" class="btn btn-success btn-sm" style="margin-left:20px;margin-top: -3px">
              <i class="fa fa-plus"></i> Add
            </a>
        </h3>
        <p>Create a link to share this project so those who have the link can view&mdash;but not edit&mdash;the project.</p>
        <div class="scripted" id="linkScope">

            <table id="privateLinkTable" class="table">

                <thead>
                    <tr>
                    <th class="col-sm-3">Link</th>
                    <th class="col-sm-4">What This Link Shares</th>

                    <th class="col-sm-2">Created Date</th>
                    <th class="col-sm-2">Created By</th>
                    <th class="col-sm-1">Anonymous</th>
                    <th class="col-sm-0"></th>
                    </tr>
                </thead>

                <tbody data-bind="foreach: {data: privateLinks, afterRender: afterRenderLink}">
                    <tr>
                        <td class="col-sm-3">
                            <div>
                                <span class="link-name m-b-xs" data-bind="text: name, tooltip: {title: 'Link name'}" style="display: block; width: 100%"></span>
                            </div>

                            <div class="btn-group">
                                <button title="Copy to clipboard" class="btn btn-default btn-sm m-r-xs copy-button"
                                        data-bind="attr: {data-clipboard-text: linkUrl}" >
                                    <i class="fa fa-copy"></i>
                                </button>
                                <input class="link-url" type="text" data-bind="value: linkUrl, attr:{readonly: readonly}"  />
                            </div>
                        </td>
                        <td class="col-sm-4">
                           <ul class="private-link-list narrow-list" data-bind="foreach: nodesList, attr: {id: 'private-link-list-' + $index() }">
                               <li data-bind="style:{marginLeft: $data.scale}">
                                  <span data-bind="getIcon: $data.category"></span>
                                  <a data-bind="text:$data.title, attr: {href: $data.url}"></a>
                               </li>
                           </ul>

                        </td>

                        <td class="col-sm-2">
                            <span class="link-create-date" data-bind="text: dateCreated.local, tooltip: {title: dateCreated.utc}"></span>
                        </td>
                        <td class="col-sm-2" >
                            <a data-bind="text: creator.fullname, attr: {href: creator.url}" class="overflow-block" style="width: 300px"></a>
                        </td>
                        <td class="col-sm-1">
                            <span data-bind="html: anonymousDisplay"></span><commit_msg>Remove ids from private links [skip ci]<commit_after><%inherit file="project/project_base.mako"/>
<%def name="title()">${node['title']} Contributors</%def>

<%include file="project/modal_generate_private_link.mako"/>
<%include file="project/modal_add_contributor.mako"/>

<div class="page-header  visible-xs">
  <h2 class="text-300">Sharing</h2>
</div>

<div class="row">
    <div class="col-lg-10 col-lg-offset-1">

            <div id="manageContributors" class="scripted">
                <h3> Contributors
                    <!-- ko if: canEdit -->
                        <a href="#addContributors" data-toggle="modal" class="btn btn-success btn-sm" style="margin-left:20px;margin-top: -3px">
                          <i class="fa fa-plus"></i> Add
                        </a>
                    <!-- /ko -->
                </h3>
                % if 'admin' in user['permissions'] and not node['is_registration']:
                    <p>Drag and drop contributors to change listing order.</p>
                % endif
                <table id="manageContributorsTable" class="table">
                    <thead>
                        <tr>
                        <th class="col-md-6">Name</th>
                        <th class="col-md-2">
                            Permissions
                            <i class="fa fa-question-circle permission-info"
                                    data-toggle="popover"
                                    data-title="Permission Information"
                                    data-container="body"
                                    data-placement="right"
                                    data-html="true"
                                ></i>
                        </th>
                        <th class="col-md-3">
                            Bibliographic Contributor
                            <i class="fa fa-question-circle visibility-info"
                                    data-toggle="popover"
                                    data-title="Bibliographic Contributor Information"
                                    data-container="body"
                                    data-placement="right"
                                    data-html="true"
                                ></i>
                        </th>
                        <th class="col-md-1">
                        </th>
                        </tr>
                    </thead>
                    <tbody data-bind="sortable: {
                            template: 'contribTpl',
                            data: contributors,
                            as: 'contributor',
                            isEnabled: canEdit,
                            options: {
                              containment: '#manageContributors'
                            }
                        }">
                    </tbody>
                  </table>

                <div data-bind="if: adminContributors.length">
                    <h4>
                      Admins on Parent Projects
                      <i class="fa fa-question-circle admin-info"
                              data-content="These users are not contributors on
                              this component but can view and register it because they
                                are administrators on a parent project."
                              data-toggle="popover"
                              data-title="Admins on Parent Projects"
                              data-container="body"
                              data-placement="right"
                              data-html="true"
                          ></i>
                    </h4>
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="col-md-6"></th>
                                <th class="col-md-2"></th>
                                <th class="col-md-3"></th>
                                <th class="col-md-1"></th>
                            </tr>
                        </thead>
                        <tbody data-bind="template: {
                                name: 'contribTpl',
                                foreach: adminContributors,
                                as: 'contributor'
                            }">
                        </tbody>
                    </table>
                </div>
                ${buttonGroup()}
            </div>


    % if 'admin' in user['permissions']:
        <h3>View-only Links
            <a href="#addPrivateLink" data-toggle="modal" class="btn btn-success btn-sm" style="margin-left:20px;margin-top: -3px">
              <i class="fa fa-plus"></i> Add
            </a>
        </h3>
        <p>Create a link to share this project so those who have the link can view&mdash;but not edit&mdash;the project.</p>
        <div class="scripted" id="linkScope">

            <table id="privateLinkTable" class="table">

                <thead>
                    <tr>
                    <th class="col-sm-3">Link</th>
                    <th class="col-sm-4">What This Link Shares</th>

                    <th class="col-sm-2">Created Date</th>
                    <th class="col-sm-2">Created By</th>
                    <th class="col-sm-1">Anonymous</th>
                    <th class="col-sm-0"></th>
                    </tr>
                </thead>

                <tbody data-bind="foreach: {data: privateLinks, afterRender: afterRenderLink}">
                    <tr>
                        <td class="col-sm-3">
                            <div>
                                <span class="link-name m-b-xs" data-bind="text: name, tooltip: {title: 'Link name'}" style="display: block; width: 100%"></span>
                            </div>

                            <div class="btn-group">
                                <button title="Copy to clipboard" class="btn btn-default btn-sm m-r-xs copy-button"
                                        data-bind="attr: {data-clipboard-text: linkUrl}" >
                                    <i class="fa fa-copy"></i>
                                </button>
                                <input class="link-url" type="text" data-bind="value: linkUrl, attr:{readonly: readonly}"  />
                            </div>
                        </td>
                        <td class="col-sm-4">
                           <ul class="private-link-list narrow-list" data-bind="foreach: nodesList">
                               <li data-bind="style:{marginLeft: $data.scale}">
                                  <span data-bind="getIcon: $data.category"></span>
                                  <a data-bind="text:$data.title, attr: {href: $data.url}"></a>
                               </li>
                           </ul>

                        </td>

                        <td class="col-sm-2">
                            <span class="link-create-date" data-bind="text: dateCreated.local, tooltip: {title: dateCreated.utc}"></span>
                        </td>
                        <td class="col-sm-2" >
                            <a data-bind="text: creator.fullname, attr: {href: creator.url}" class="overflow-block" style="width: 300px"></a>
                        </td>
                        <td class="col-sm-1">
                            <span data-bind="html: anonymousDisplay"></span>
{'fraction_non_alphanumeric': 0.1200268817204301, 'fraction_numerical': 0.006048387096774193, 'mean_word_length': 0.9211205783630261, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 0, '>': 257, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3738203', 'n_tokens_mistral': 3698, 'n_tokens_neox': 3420, 'n_words': 715}