<commit_before>[[ define "discussCommentsPage" ]]
<!doctype html>
<html ng-app="DBHub" ng-controller="discussCommentsView">
[[ template "headawesome" . ]]
<body>
<style>
    .notImplementedYet {
        color: gray;
        text-decoration: none;
    }

    .notImplementedYet:hover {
        color: gray;
        text-decoration: none;
    }

    tbody > tr > td > div.ng-binding > h1 {
        margin-top: 0;
    }

    tbody > tr > td > div.ng-binding > h2 {
        margin-top: 0;
    }

    tbody > tr > td > div.ng-binding > h3 {
        margin-top: 0;
    }

    tbody > tr > td > div.ng-binding > h4 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h1 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h2 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h3 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h4 {
        margin-top: 0;
    }
</style>
[[ template "header" . ]]
<div style="margin-left: 2%; margin-right: 2%; padding-left: 2%; padding-right: 2%;">
    <div class="row">
        <div class="col-md-12">
            <h2 id="viewdb" style="margin-top: 10px;">
                <div class="pull-left">
                    <div>
                        <a class="blackLink" href="/[[ .Meta.Owner ]]">[[ .Meta.Owner ]]</a> /
                        <a class="blackLink" href="/[[ .Meta.Owner ]]/[[ .Meta.Database ]]">[[ .Meta.Database ]]</a>
                    </div>
                    [[ if .Meta.ForkOwner ]]
                    <div style="font-size: small">
                        forked from <a href="/[[ .Meta.ForkOwner ]]">[[ .Meta.ForkOwner ]]</a> /
                        [[ if not .Meta.ForkDeleted ]]
                            <a href="/[[ .Meta.ForkOwner ]]/[[ .Meta.ForkDatabase ]]">[[ .Meta.ForkDatabase ]]</a>
                        [[ else ]]
                            deleted database
                        [[ end ]]
                    </div>
                    [[ end ]]
                </div>
                <div class="pull-right">
                    <div class="btn-group">
                        <button type="button" class="btn btn-default" ng-disabled="true" ng-click="toggleWatch()"><i class="fa fa-eye"></i> Watch</button>
                        <button type="button" class="btn btn-default" ng-bind="meta.Watchers"></button>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-default" ng-bind-html="starsText" ng-click="toggleStars()"></button>
                        <button type="button" class="btn btn-default" ng-bind="meta.Stars" ng-click="starsPage()"></button>
                    </div>
                    <div class="btn-group">
                        [[ if ne .Meta.Owner .Meta.LoggedInUser ]]
                        <button type="button" class="btn btn-default" ng-click="forkDB()"><i class="fa fa-sitemap"></i> Fork</button>
                        [[ else ]]
                        <button type="button" class="btn btn-default" ng-disabled="true"><i class="fa fa-sitemap"></i> Fork</button>
                        [[ end ]]
                        <button type="button" class="btn btn-default" ng-bind="meta.Forks" ng-click="forksPage()"></button>
                    </div>
                </div>
            </h2>
        </div>
    </div>
    <div class="row" style="padding-bottom: 5px; padding-top: 10px;">
        <div class="col-md-12">
            <label id="viewdata" style="font-weight: 600; font-family: 'arial black';"><a href="/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" title="Data"><i class="fa fa-database"></i> Data</a></label> &nbsp; &nbsp; &nbsp;
            <label id="viewdiscuss" style="font-weight: 600; font-family: 'arial black'; border-bottom: 1px grey dashed;"><a href="/discuss/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" title="Discussions"><i class="fa fa-commenting"></i> Discussions:</a> {{ meta.Discussions }}</label> &nbsp; &nbsp; &nbsp;
            <label id="viewmrs" style="font-weight: 600; font-family: 'arial black';"><a href="" class="notImplementedYet" title="Not yet implemented"><i class="fa fa-clone"></i> Merge Requests: </a>{{ meta.MRs }}</label> &nbsp; &nbsp; &nbsp;
            [[ if eq .Meta.Owner .Meta.LoggedInUser ]]
                <label id="settings" style="font-weight: 600; font-family: 'arial black';"><a class="blackLink" href="/settings/[[ .Meta.Owner ]]/[[ .Meta.Database ]]"><i class="fa fa-cog"></i> Settings</a></label>
            [[ end ]]
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="pull-left">
                <button class="btn btn-success" ng-click="createDiscussion()">Start a new discussion</button>
            </div>
            <br /><br />
        </div>
    </div>
    <div class="row" ng-if="statusMessage != ''">
        <div class="col-md-12">
            <div style="text-align: center; padding-bottom: 8px;">
                <h4 style="color: {{ statusMessageColour }};">&nbsp;{{ statusMessage }}</h4>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <span ng-if="DiscussionList != ''">
                <table class="table table-responsive" style="margin-bottom: 0px;">
                    <tbody>
                        <tr style="border: none;">
                            <td width="10%" style="text-align: center; vertical-align: text-top; border-top: none;">
                                <div style="font-size: x-large; color: #333;"># {{ Disc.disc_id }}</div>
                                <div ng-if="Disc.open == true" class="btn btn-success" style="font-size: medium;"><i class="fa fa-minus-square-o"></i> Open</div>
                                <div ng-if="Disc.open != true" class="btn btn-danger" style="font-size: medium;"><i class="fa fa-check-square-o"></i> Closed</div>
                            </td>
                            <td style="border: none;">
                                <div style="border: 1px solid #CCC; border-bottom: none; padding: 10px; background-color: #EFEFEF; border-radius: 7px 7px 0px 0px;">
                                    <div>
                                        <div ng-switch="editDiscTitle">
                                            <div ng-switch-when="title">
                                                <a href="/discuss/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?id={{ Disc.disc_id }}" style="font-size: x-large; color: #333;">{{ Disc.title }}</a>
                                                <span ng-if="Disc.creator == '[[ .Meta.LoggedInUser ]]' || '[[ .Meta.Owner ]]' == '[[ .Meta.LoggedInUser ]]'" class="pull-right" style="font-size: medium;">
                                                    <a class="blackLink" ng-click="editDiscussion()"><i class="fa fa-pencil fa-fw"></i></a>
                                                </span>
                                            </div>
                                            <div ng-switch-when="edit">
                                                <input style="font-size: x-large; color: #333; width: 100%;" id="disctitle" value="{{ Disc.title }}" />
                                            </div>
                                        </div>
                                    </div>
                                    <div>Opened <span title="{{ Disc.creation_date | date : 'medium' }}" style="color: grey;">{{ getTimePeriodTxt(Disc.creation_date, true) }}</span> by <a class="blackLink" href="/{{ Disc.creator }}">{{ Disc.creator }}</a></div>
                                </div>
                                <div style="padding: 10px; border: 1px solid #CCC; border-radius: 0px 0px 7px 7px;">
                                    <div ng-show="editDisc === true" style="text-align: center;">
                                        <uib-tabset active="activeDisc">
                                            <uib-tab index="0">
                                                <uib-tab-heading><span style="color: #555;">Edit</span></uib-tab-heading>
                                                <textarea id="disctext" name="disctext" rows="10" style="margin-top: 2px; width: 100%;" ng-bind-html="editDiscBody"></textarea>
                                            </uib-tab>
                                            <uib-tab index="1" select="getMarkdownDisc()">
                                                <uib-tab-heading><span style="color: #555;">Preview</span></uib-tab-heading>
                                                <div style="text-align: left; margin-top: 2px; min-height: 80px;" ng-bind-html="editDiscBodyPreview"></div>
                                            </uib-tab>
                                        </uib-tabset>
                                        <input type="submit" class="btn btn-default" value="Cancel" style="margin-top: 10px;" ng-click="editDiscussion()">
                                        <input type="submit" class="btn btn-success" value="Save" style="margin-top: 10px;" ng-click="updateDiscussion()">
                                    </div>
                                    <div ng-hide="editDisc === true" ng-bind-html="Disc.body_rendered"></div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <span ng-repeat="row in CommentList">
                    <table ng-if="row.entry_type == 'txt'" class="table table-responsive" style="margin-bottom: 0px;">
                        <tbody>
                            <tr>
                                <td style="border: none;" width="10%">&nbsp;</td>
                                <td style="border: none;">
                                    <div style="border: 1px solid #CCC; border-bottom: none; padding: 10px; background-color: #EFEFEF; border-radius: 7px 7px 0px 0px;">
                                        <a class="blackLink" href="/{{ row.commenter }}">{{ row.commenter }}</a> commented <span title="{{ row.creation_date | date : 'medium' }}" style="color: grey;">{{ getTimePeriodTxt(row.creation_date, true) }}</span>
                                        <span ng-if="row.commenter == '[[ .Meta.LoggedInUser ]]' || '[[ .Meta.Owner ]]' == '[[ .Meta.LoggedInUser ]]'" class="pull-right" style="font-size: medium;">
                                            <a class="blackLink" ng-click="editComment(row.com_id)"><i class="fa fa-pencil fa-fw"></i></a>
                                            <a class="blackLink" ng-click="deleteComment(row.com_id)"><i class="fa fa-trash-o fa-fw"></i></a>
                                        </span>
                                    </div>
                                    <span ng-switch="getCommentState(row.com_id)">
                                        <div ng-switch-when="static" style="padding-left: 10px; padding-top: 10px; border: 1px solid #CCC; border-radius: 0px 0px 7px 7px;" ng-bind-html="getCommentTextRendered(row.com_id)"></div>
                                        <div ng-switch-when="edit" style="padding: 10px; border: 1px solid #CCC; border-radius: 0px 0px 7px 7px;">
                                            <uib-tabset>
                                                <uib-tab index="0">
                                                    <uib-tab-heading><span style="color: #555;">Edit</span></uib-tab-heading>
                                                    <textarea id="com{{ row.com_id }}" name="com{{ row.com_id }}" rows="10" style="margin-top: 2px; width: 100%;" ng-bind-html="getCommentText(row.com_id)"></textarea><commit_msg>Display raw text when editing discussions and their comments<commit_after>[[ define "discussCommentsPage" ]]
<!doctype html>
<html ng-app="DBHub" ng-controller="discussCommentsView">
[[ template "headawesome" . ]]
<body>
<style>
    .notImplementedYet {
        color: gray;
        text-decoration: none;
    }

    .notImplementedYet:hover {
        color: gray;
        text-decoration: none;
    }

    tbody > tr > td > div.ng-binding > h1 {
        margin-top: 0;
    }

    tbody > tr > td > div.ng-binding > h2 {
        margin-top: 0;
    }

    tbody > tr > td > div.ng-binding > h3 {
        margin-top: 0;
    }

    tbody > tr > td > div.ng-binding > h4 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h1 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h2 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h3 {
        margin-top: 0;
    }

    tbody > tr > td > span > div.ng-binding > h4 {
        margin-top: 0;
    }
</style>
[[ template "header" . ]]
<div style="margin-left: 2%; margin-right: 2%; padding-left: 2%; padding-right: 2%;">
    <div class="row">
        <div class="col-md-12">
            <h2 id="viewdb" style="margin-top: 10px;">
                <div class="pull-left">
                    <div>
                        <a class="blackLink" href="/[[ .Meta.Owner ]]">[[ .Meta.Owner ]]</a> /
                        <a class="blackLink" href="/[[ .Meta.Owner ]]/[[ .Meta.Database ]]">[[ .Meta.Database ]]</a>
                    </div>
                    [[ if .Meta.ForkOwner ]]
                    <div style="font-size: small">
                        forked from <a href="/[[ .Meta.ForkOwner ]]">[[ .Meta.ForkOwner ]]</a> /
                        [[ if not .Meta.ForkDeleted ]]
                            <a href="/[[ .Meta.ForkOwner ]]/[[ .Meta.ForkDatabase ]]">[[ .Meta.ForkDatabase ]]</a>
                        [[ else ]]
                            deleted database
                        [[ end ]]
                    </div>
                    [[ end ]]
                </div>
                <div class="pull-right">
                    <div class="btn-group">
                        <button type="button" class="btn btn-default" ng-disabled="true" ng-click="toggleWatch()"><i class="fa fa-eye"></i> Watch</button>
                        <button type="button" class="btn btn-default" ng-bind="meta.Watchers"></button>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-default" ng-bind-html="starsText" ng-click="toggleStars()"></button>
                        <button type="button" class="btn btn-default" ng-bind="meta.Stars" ng-click="starsPage()"></button>
                    </div>
                    <div class="btn-group">
                        [[ if ne .Meta.Owner .Meta.LoggedInUser ]]
                        <button type="button" class="btn btn-default" ng-click="forkDB()"><i class="fa fa-sitemap"></i> Fork</button>
                        [[ else ]]
                        <button type="button" class="btn btn-default" ng-disabled="true"><i class="fa fa-sitemap"></i> Fork</button>
                        [[ end ]]
                        <button type="button" class="btn btn-default" ng-bind="meta.Forks" ng-click="forksPage()"></button>
                    </div>
                </div>
            </h2>
        </div>
    </div>
    <div class="row" style="padding-bottom: 5px; padding-top: 10px;">
        <div class="col-md-12">
            <label id="viewdata" style="font-weight: 600; font-family: 'arial black';"><a href="/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" title="Data"><i class="fa fa-database"></i> Data</a></label> &nbsp; &nbsp; &nbsp;
            <label id="viewdiscuss" style="font-weight: 600; font-family: 'arial black'; border-bottom: 1px grey dashed;"><a href="/discuss/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" title="Discussions"><i class="fa fa-commenting"></i> Discussions:</a> {{ meta.Discussions }}</label> &nbsp; &nbsp; &nbsp;
            <label id="viewmrs" style="font-weight: 600; font-family: 'arial black';"><a href="" class="notImplementedYet" title="Not yet implemented"><i class="fa fa-clone"></i> Merge Requests: </a>{{ meta.MRs }}</label> &nbsp; &nbsp; &nbsp;
            [[ if eq .Meta.Owner .Meta.LoggedInUser ]]
                <label id="settings" style="font-weight: 600; font-family: 'arial black';"><a class="blackLink" href="/settings/[[ .Meta.Owner ]]/[[ .Meta.Database ]]"><i class="fa fa-cog"></i> Settings</a></label>
            [[ end ]]
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="pull-left">
                <button class="btn btn-success" ng-click="createDiscussion()">Start a new discussion</button>
            </div>
            <br /><br />
        </div>
    </div>
    <div class="row" ng-if="statusMessage != ''">
        <div class="col-md-12">
            <div style="text-align: center; padding-bottom: 8px;">
                <h4 style="color: {{ statusMessageColour }};">&nbsp;{{ statusMessage }}</h4>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <span ng-if="DiscussionList != ''">
                <table class="table table-responsive" style="margin-bottom: 0px;">
                    <tbody>
                        <tr style="border: none;">
                            <td width="10%" style="text-align: center; vertical-align: text-top; border-top: none;">
                                <div style="font-size: x-large; color: #333;"># {{ Disc.disc_id }}</div>
                                <div ng-if="Disc.open == true" class="btn btn-success" style="font-size: medium;"><i class="fa fa-minus-square-o"></i> Open</div>
                                <div ng-if="Disc.open != true" class="btn btn-danger" style="font-size: medium;"><i class="fa fa-check-square-o"></i> Closed</div>
                            </td>
                            <td style="border: none;">
                                <div style="border: 1px solid #CCC; border-bottom: none; padding: 10px; background-color: #EFEFEF; border-radius: 7px 7px 0px 0px;">
                                    <div>
                                        <div ng-switch="editDiscTitle">
                                            <div ng-switch-when="title">
                                                <a href="/discuss/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?id={{ Disc.disc_id }}" style="font-size: x-large; color: #333;">{{ Disc.title }}</a>
                                                <span ng-if="Disc.creator == '[[ .Meta.LoggedInUser ]]' || '[[ .Meta.Owner ]]' == '[[ .Meta.LoggedInUser ]]'" class="pull-right" style="font-size: medium;">
                                                    <a class="blackLink" ng-click="editDiscussion()"><i class="fa fa-pencil fa-fw"></i></a>
                                                </span>
                                            </div>
                                            <div ng-switch-when="edit">
                                                <input style="font-size: x-large; color: #333; width: 100%;" id="disctitle" value="{{ Disc.title }}" />
                                            </div>
                                        </div>
                                    </div>
                                    <div>Opened <span title="{{ Disc.creation_date | date : 'medium' }}" style="color: grey;">{{ getTimePeriodTxt(Disc.creation_date, true) }}</span> by <a class="blackLink" href="/{{ Disc.creator }}">{{ Disc.creator }}</a></div>
                                </div>
                                <div style="padding: 10px; border: 1px solid #CCC; border-radius: 0px 0px 7px 7px;">
                                    <div ng-show="editDisc === true" style="text-align: center;">
                                        <uib-tabset active="activeDisc">
                                            <uib-tab index="0">
                                                <uib-tab-heading><span style="color: #555;">Edit</span></uib-tab-heading>
                                                <textarea id="disctext" name="disctext" rows="10" style="margin-top: 2px; width: 100%;" ng-bind="editDiscBody"></textarea>
                                            </uib-tab>
                                            <uib-tab index="1" select="getMarkdownDisc()">
                                                <uib-tab-heading><span style="color: #555;">Preview</span></uib-tab-heading>
                                                <div style="text-align: left; margin-top: 2px; min-height: 80px;" ng-bind-html="editDiscBodyPreview"></div>
                                            </uib-tab>
                                        </uib-tabset>
                                        <input type="submit" class="btn btn-default" value="Cancel" style="margin-top: 10px;" ng-click="editDiscussion()">
                                        <input type="submit" class="btn btn-success" value="Save" style="margin-top: 10px;" ng-click="updateDiscussion()">
                                    </div>
                                    <div ng-hide="editDisc === true" ng-bind-html="Disc.body_rendered"></div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <span ng-repeat="row in CommentList">
                    <table ng-if="row.entry_type == 'txt'" class="table table-responsive" style="margin-bottom: 0px;">
                        <tbody>
                            <tr>
                                <td style="border: none;" width="10%">&nbsp;</td>
                                <td style="border: none;">
                                    <div style="border: 1px solid #CCC; border-bottom: none; padding: 10px; background-color: #EFEFEF; border-radius: 7px 7px 0px 0px;">
                                        <a class="blackLink" href="/{{ row.commenter }}">{{ row.commenter }}</a> commented <span title="{{ row.creation_date | date : 'medium' }}" style="color: grey;">{{ getTimePeriodTxt(row.creation_date, true) }}</span>
                                        <span ng-if="row.commenter == '[[ .Meta.LoggedInUser ]]' || '[[ .Meta.Owner ]]' == '[[ .Meta.LoggedInUser ]]'" class="pull-right" style="font-size: medium;">
                                            <a class="blackLink" ng-click="editComment(row.com_id)"><i class="fa fa-pencil fa-fw"></i></a>
                                            <a class="blackLink" ng-click="deleteComment(row.com_id)"><i class="fa fa-trash-o fa-fw"></i></a>
                                        </span>
                                    </div>
                                    <span ng-switch="getCommentState(row.com_id)">
                                        <div ng-switch-when="static" style="padding-left: 10px; padding-top: 10px; border: 1px solid #CCC; border-radius: 0px 0px 7px 7px;" ng-bind-html="getCommentTextRendered(row.com_id)"></div>
                                        <div ng-switch-when="edit" style="padding: 10px; border: 1px solid #CCC; border-radius: 0px 0px 7px 7px;">
                                            <uib-tabset>
                                                <uib-tab index="0">
                                                    <uib-tab-heading><span style="color: #555;">Edit</span></uib-tab-heading>
                                                    <textarea id="com{{ row.com_id }}" name="com{{ row.com_id }}" rows="10" style="margin-top: 2px; width: 100%;" ng-bind="getCommentText(row.com_id)"></textarea>
{'fraction_non_alphanumeric': 0.16689800210304942, 'fraction_numerical': 0.011692954784437434, 'mean_word_length': 1.413562074916252, 'pattern_counts': {'":': 0, '<': 421, '<?xml version=': 0, '>': 493, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 150, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7646062', 'n_tokens_mistral': 6900, 'n_tokens_neox': 6329, 'n_words': 1373}