<!DOCTYPE html>
<html lang="en">
<%- include('partials/head', { title: lang.global.activity_feed }); %>
<body>
<%- include('partials/nav_bar', { selection: -1, pid: pid }); %>
<div id="body">
    <header id="header">
        <h1 id="page-title" class="left">
            <%if(post.removed) {%>
                Removed Post
            <%} else {%>
                <%= post.screen_name %>
            <%}%>
        </h1>
        <%if(!post.removed) {%>
        <% if(((community.allows_comments && community.open) || (community.admins && community.admins.indexOf(pid) !== -1)) && userSettings.pid !== 1000000000 && userSettings.account_status === 0) {%>
        <a id="header-post-button" class="header-button" href="#" data-module-hide="post" data-module-show="add-post-page" data-header="false" data-menu="false">Reply</a>
        <%}%>
        <% if(post.pid === pid || moderator) {%>
            <a id="header-communities-button" class="delete" href="#" data-post="<%=post.id%>" onclick="deletePost(this)">Delete Post</a>
        <%} else {%>
            <a id="report-launcher" style="display: none" data-module-hide="post" data-module-show="report-post-page" data-header="false" data-menu="false"></a>
            <a id="header-communities-button" class="report" href="#" data-post="<%= post.id %>" onclick="reportPost(this)">Report Post</a>
        <%}%>
        <%}%>
    </header>
    <div class="body-content post-list" id="post">
        <div class="post-wrapper parent">
            <%- include('partials/post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false, pid: pid, yeah: true }); %>
        </div>
        <% replies.forEach(function(post) { %>
            <%- include('partials/post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: true, pid: pid  }); %>
        <% }); %>
    </div>
    <% if(((community.allows_comments && community.open) || (community.admins && community.admins.indexOf(pid) !== -1)) && userSettings.pid !== 1000000000 && userSettings.account_status === 0) {%>
    <%- include('partials/new_post', { pid, lang, id: post.community_id, name: post.screen_name, url: `/posts/${post.id}/new`, show: 'post', message_pid: '' }); %>
    <%}%>
    <div id="report-post-page" class="add-post-page official-user-post" style="display: none">
        <header class="add-post-page-header">
            <h1 class="page-title">Report Post</h1>
        </header>
        <form method="post" action="/posts/<%=post.id%>/report" id="report-form" name="report" data-is-own-title="1" data-is-identified="1">
            <input type="hidden" name="post_id" value="<%= post.id %>"/>
            <div class="add-post-page-content report">
                <p>
                    You are about to report a post with content which violates the Juxtaposition Code of Conduct.
                    This report will be sent to Pretendo's Juxtaposition administrators and not to the creator of the post.
                </p>
                <div>
                    <h4>Violation Type:</h4>
                    <select name="reason" id="report">
                        <option value="0">Spoiler</option>
                        <option value="1">Personal Information</option>
                        <option value="2">Violent Content</option>
                        <option value="3">Inappropriate/Harmful Conduct</option>
                        <option value="4">Hateful/Bullying</option>
                        <option value="5">Advertising</option>
                        <option value="6">Sexually Explicit</option>
                        <option value="7">Piracy</option>
                        <option value="8">Inappropriate Behavior in Game</option>
                        <option value="9">Other</option>
                    </select>
                </div>
                <textarea name="message" class="textarea-text" value="" maxlength="280" placeholder="Enter additional comments or information"></textarea>
            </div>
            <input type="button" class="olv-modal-close-button fixed-bottom-button left"
                   value="Cancel" data-sound="SE_WAVE_CANCEL"
                   data-module-show="post" data-module-hide="report-post-page"
                   data-header="true" data-menu="true">
            <input type="submit" class="post-button fixed-bottom-button" value="Submit" onclick="wiiuBrowser.lockUserOperation(true);">
        </form>
    </div>
</div>
</body>
</html>
