<commit_before>﻿@model PhotoDetailsViewModel

@{
    ViewBag.Title = "Photo Details";
}

<div id="photoDetails">
    <header>
        <h1>@Model.Photo.Name</h1>
    </header>

    <table class="photo-details-tbl">
        <tr>
            <td class="prev-arrow-cell">
                @if (Model.PreviousPhoto != null)
                {
                    <a href="@Url.PhotoDetails(Model.PreviousPhoto, Model.SearchResultTag, Model.SearchResultTag2)">&lt;</a>
                }
            </td>
            <td class="photo-cell">
                @Html.LargePhoto(Model.Photo, Model.PhotoTags)

                <div>
                    @{ Html.RenderPartial(MVC.Tags.Views._TagButtons, Model.PhotoTags); }
                </div>
            </td>
            <td class="next-arrow-cell">
                @if (Model.NextPhoto != null)
                {
                    <a href="@Url.PhotoDetails(Model.NextPhoto, Model.SearchResultTag, Model.SearchResultTag2)">&gt;</a>
                }
            </td>
        </tr>
    </table>

    <div id="download">
        Download this photo:
        <span class="download-link"><a href="@Url.PhotoDownloadUrl(Model.Photo, PhotoSizes.Small)"><i class="icon-download-alt"></i>Small</a> <span class="file-size">(@Model.SmallFileSize)</span></span> |
        <span class="download-link"><a href="@Url.PhotoDownloadUrl(Model.Photo, PhotoSizes.Large)"><i class="icon-download-alt"></i>Large</a> <span class="file-size">(@Model.LargeFileSize)</span></span>
    </div>

    @if (SecurityHelper.UserCanSeePrivateRecords(base.User))
    {
        <div>
            @if (Model.Photo.IsPrivate)
            {
                <span>Is Private: <strong>Yes</strong></span>
            }
            else
            {
                <span>Is Private: No</span>
            }
        </div>
    }

    @if (SecurityHelper.UserIsAdmin(base.User))
    {
        <div>
            <a href="@Url.PhotoEdit(Model.Photo)">Edit</a> |
            <a href="@Url.PhotoDelete(Model.Photo)">Delete</a> | 
            <a href="@Url.PhotoIndex()">Photo index</a>
        </div>
    }
</div><commit_msg>Add Questions to Photo Details view.<commit_after>﻿@model PhotoDetailsViewModel

@{
    ViewBag.Title = "Photo Details";
}

<div id="photoDetails">
    <header>
        <h1>@Model.Photo.Name</h1>
    </header>

    <table class="photo-details-tbl">
        <tr>
            <td class="prev-arrow-cell">
                @if (Model.PreviousPhoto != null)
                {
                    <a href="@Url.PhotoDetails(Model.PreviousPhoto, Model.SearchResultTag, Model.SearchResultTag2)">&lt;</a>
                }
            </td>
            <td class="photo-cell">
                @Html.LargePhoto(Model.Photo, Model.PhotoTags)

                <div>
                    @{ Html.RenderPartial(MVC.Tags.Views._TagButtons, Model.PhotoTags); }
                </div>
            </td>
            <td class="next-arrow-cell">
                @if (Model.NextPhoto != null)
                {
                    <a href="@Url.PhotoDetails(Model.NextPhoto, Model.SearchResultTag, Model.SearchResultTag2)">&gt;</a>
                }
            </td>
        </tr>
    </table>

    @if (Model.Questions.SafeAny())
    {
        <div>
            <h4>Questions</h4>
            <ol>
                @foreach (var question in Model.Questions)
                {
                    <li class="question">
                        @if (Model.ShowAdminLinks)
                        {
                            <div class="preserve-newline">@Html.ActionLink(@question.Text, MVC.Questions.QuestionDetails(question.ID))</div>
                        }
                        else
                        {
                            <div class="preserve-newline">@question.Text</div>
                        }
                        <div class="question-starter preserve-newline">@question.SentenceStarters</div>
                    </li>
                }
            </ol>
        </div>
    }

    @if (SecurityHelper.UserCanSeePrivateRecords(base.User))
    {
        <div>
            @if (Model.Photo.IsPrivate)
            {
                <span>Is Private: <strong>Yes</strong></span>
            }
            else
            {
                <span>Is Private: No</span>
            }
        </div>
    }

    <div id="download">
        Download this photo:
        <span class="download-link"><a href="@Url.PhotoDownloadUrl(Model.Photo, PhotoSizes.Small)"><i class="icon-download-alt"></i>Small</a> <span class="file-size">(@Model.SmallFileSize)</span></span> |
        <span class="download-link"><a href="@Url.PhotoDownloadUrl(Model.Photo, PhotoSizes.Large)"><i class="icon-download-alt"></i>Large</a> <span class="file-size">(@Model.LargeFileSize)</span></span>
    </div>

    @if (Model.ShowAdminLinks)
    {
        <div>
            @Html.ActionLink("Create Question", MVC.Questions.QuestionCreate(Model.Photo.ID))
        </div>
        
        <div>
            @Html.ActionLink("Edit", MVC.Photos.PhotoEdit(Model.Photo.ID)) |
            @Html.ActionLink("Delete", MVC.Photos.PhotoDelete(Model.Photo.ID)) |
            @Html.ActionLink("Photo Index", MVC.Photos.PhotoIndex())
        </div>
    }
</div>
{'fraction_non_alphanumeric': 0.15494568324757005, 'fraction_numerical': 0.001905850962454736, 'mean_word_length': 1.6385118149824032, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5900972', 'n_tokens_mistral': 1565, 'n_tokens_neox': 1486, 'n_words': 213}