85 lines
2.9 KiB
Twig
85 lines
2.9 KiB
Twig
{% extends 'pages/generic.twig' %}
|
|
{% set accordion_opened = false %}
|
|
|
|
{% block page_content %}
|
|
|
|
<div class="container custom-uploader {{ post_type_singular }}">
|
|
|
|
{% if submission_result != "" %}
|
|
|
|
{% include 'pieces/submissions/result-message.twig' %}
|
|
|
|
{% elseif submission_post_id != 0 %} {# Edition #}
|
|
|
|
{% set entry = get_post( submission_post_id ) %}
|
|
|
|
{% if entry and entry.post_type == post_type %}
|
|
|
|
{% if submission_can_edit %} {# Is the author or a staff member. #}
|
|
|
|
{% if entry.status != "locked" or submission_can_bypass_locked %}
|
|
|
|
{% if ( entry.status != "trashed" and entry.status != "private" ) or submission_can_bypass_trashed_private %}
|
|
|
|
{% if not submission_public_edit_disabled %}
|
|
|
|
{# Finally you can edit your entry ! #}
|
|
{{ fn( 'do_action', 'RomhackPlaza\\Extenders\\Submissions\\Get_A_File_Server', entry.id ) }}
|
|
{% include "pieces/submissions/form-base-begin.twig" %}
|
|
{% block form_edit %}
|
|
{% endblock %}
|
|
{% include "pieces/submissions/form-base-end.twig" %}
|
|
|
|
{% else %}
|
|
|
|
{% if submission_can_bypass_trashed_private %} {# Administrator #}
|
|
|
|
{# TODO: Must include Quick tools pieces #}
|
|
|
|
{% endif %}
|
|
|
|
{{ __( "Sorry, you cannot edit this entry as it has been blocked by an administrator.") }}
|
|
|
|
{% include "pieces/submissions/message-by-team.twig" %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{{ __( "You don't have permission to edit this entry. (Entry trashed.)", 'romhackplaza' ) }}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{{ __( "You don't have permission to edit this entry. (Entry locked by a staff member)", 'romhackplaza' ) }}
|
|
|
|
{% include "pieces/submissions/message-by-team.twig" %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{{ __( "You don't have permission to edit this entry.", 'romhackplaza' ) }}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{{ __( "Post ID doesn't exist.", 'romhackplaza' ) }}
|
|
|
|
{% endif %}
|
|
|
|
{% else %} {# New entry #}
|
|
|
|
{{ function( 'do_action', "RomhackPlaza\\Extenders\\Submissions\\Get_A_File_Server", '0' ) }}
|
|
{% include "pieces/submissions/form-base-begin.twig" %}
|
|
{% block form_create %}
|
|
{% endblock %}
|
|
{% include "pieces/submissions/form-base-end.twig" %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %} |