Start Theme Repo
This commit is contained in:
21
views/404.twig
Normal file
21
views/404.twig
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'base.twig' %}
|
||||
|
||||
{% block page %}
|
||||
|
||||
<div class="error-404 not-found type-page">
|
||||
|
||||
<header class="entry-header">
|
||||
<h1 class="page-title">{{ __( 'Oops, this page doesn\'t exist', 'romhackplaza' )|esc_html }}</h1>
|
||||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
<div class="entry-content clearfix">
|
||||
|
||||
<p>{{ __( "It seems like you have tried to open a page that doesn't exist. It could have been deleted, moved, or it never existed at all. Either way, you're welcome to search for what you are looking for with the search form in the navbar.", 'romhackplaza') }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
115
views/base.twig
Normal file
115
views/base.twig
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html {{ fn( 'language_attributes' ) }}>
|
||||
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="{{ site.charset }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<link rel="pingback" href="{{ site.pingback }}">
|
||||
|
||||
{{ fn( 'wp_head' ) }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body {{ fn( 'body_class' ) }} >
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% do action('wp_body_open') %}
|
||||
|
||||
<div id="page" class="hfeed site">
|
||||
|
||||
<a class="skip-link screen-reader-text" href="#content">{{ __( 'Skip to content', 'romhackplaza' )|esc_html }}</a>
|
||||
|
||||
<header id="masthead" class="site-header clearfix" role="banner">
|
||||
|
||||
{% block header %}
|
||||
|
||||
<div class="header-main container clearfix">
|
||||
|
||||
<div id="logo" class="site-branding clearfix">
|
||||
|
||||
{{ fn( 'the_custom_logo' ) }}
|
||||
|
||||
<!-- Site logo -->
|
||||
{% if is_home %}
|
||||
|
||||
<h1 class="site-title"><a href="{{ site.url }}/" rel="home">{{ site.title }}</a></h1>
|
||||
|
||||
{% else %}
|
||||
|
||||
<p class="site-title"><a href="{{ site.url }}/" rel="home">{{ site.title }}</a></p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.description or conditional_tag.is_customize_preview %}
|
||||
|
||||
<p class="site-description">{{ site.description }}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% include 'pieces/menus/secondary.twig' %}
|
||||
|
||||
</div>
|
||||
|
||||
{% include 'pieces/menus/primary.twig' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</header>
|
||||
|
||||
{# Add Header image here if needed... #}
|
||||
{# Add Slider if needed #}
|
||||
|
||||
<div id="content" class="site-content container clearfix">
|
||||
|
||||
<section id="primary" class="content-single content-area">
|
||||
<main id="main" class="site-main" role="main">
|
||||
|
||||
{% block page %}
|
||||
{% endblock %}
|
||||
|
||||
</main>
|
||||
</section>
|
||||
|
||||
{% block sidebar %}
|
||||
|
||||
{% if wp_sidebar %}
|
||||
|
||||
<section id="secondary" class="sidebar widget-area clearfix" role="complementary">
|
||||
|
||||
{{ wp_sidebar }}
|
||||
|
||||
</section>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer" class="footer-wrap">
|
||||
|
||||
{% block footer %}
|
||||
|
||||
<footer id="colophon" class="site-footer container clearfix" role="contentinfo">
|
||||
|
||||
{# TODO Add things later... #}
|
||||
|
||||
</footer>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{ fn( 'wp_footer') }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
14
views/capability_required.twig
Normal file
14
views/capability_required.twig
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "pages/generic.twig" %}
|
||||
|
||||
{% block page_content %}
|
||||
|
||||
<b>{{ __( 'You do not have permission to view the content on this page.', 'romhackplaza') }}</b><br>
|
||||
{{ why }}
|
||||
|
||||
{% if not user %}
|
||||
|
||||
<p>Please <a href="{{ fn( 'wp_login_url') }}">log in</a> or <a href="{{ fn('wp_registration_url') }}">register</a>.</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
5
views/index.twig
Executable file
5
views/index.twig
Executable file
@@ -0,0 +1,5 @@
|
||||
{% extends 'base.twig' %}
|
||||
|
||||
{% block page %}
|
||||
{% include 'pieces/posts/author-bio.twig' %}
|
||||
{% endblock %}
|
||||
26
views/pages/generic.twig
Normal file
26
views/pages/generic.twig
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.twig' %}
|
||||
|
||||
{% block page %}
|
||||
|
||||
<article id="post-{{ post.ID }}" {{ fn('post_class') }}>
|
||||
<header class="entry-header">
|
||||
<h1 class="page-title">{{ post.title }}</h1>
|
||||
</header>
|
||||
|
||||
{{ fn('the_post_thumbnail') }}
|
||||
|
||||
<div class="post-content">
|
||||
<div class="entry-content clearfix">
|
||||
|
||||
{% block page_content %}
|
||||
|
||||
{{ post.content }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
{% endblock %}
|
||||
68
views/pages/notifications.twig
Normal file
68
views/pages/notifications.twig
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends 'pages/generic.twig' %}
|
||||
|
||||
{% block page_content %}
|
||||
|
||||
{% for notif in notifications %}
|
||||
|
||||
{% set sender = get_user( notif.sender ) %}
|
||||
|
||||
<div class="bottom_bar"></div>
|
||||
<div id="notification-{{ notif.id }}" style="padding:10px;overflow:auto;">
|
||||
|
||||
{% if notif.readed != 1 %}
|
||||
<div id="new-info-{{ notif.id }}" style="color:red;display:block;margin-bottom:7px;text-align:right;">
|
||||
{{ __( 'New', 'romhackplaza' ) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="reviews_post_parent_details">
|
||||
<img src="{{ fn( 'get_avatar_url', notif.sender ) }}" width="40px"><span class="reviews_parent_title">{{ sender.name }}</span>
|
||||
</div>
|
||||
<div class="reviews_post_title">
|
||||
{{ notif.type }}
|
||||
</div>
|
||||
<p class="reviews_post_details">
|
||||
|
||||
{% if notif.auto == 1 %}
|
||||
{{ __( 'Automatic notification', 'romhackplaza' ) }} -
|
||||
{% endif %}
|
||||
|
||||
{{ notif.date|date }} ({{ notif.id }})
|
||||
|
||||
</p>
|
||||
<div id="review-content-{{ notif.id }}" class="reviews_post_content">
|
||||
{{ notif.content }}
|
||||
</div>
|
||||
<br>
|
||||
<div class="news-links">
|
||||
|
||||
{% if notif.readed != 1 %}
|
||||
|
||||
<span class="rhdo-project-link">
|
||||
<a class="mark-as-read" href="#mark-as-read" data-id="{{ notif.id }}">
|
||||
{{ __('Mark as read', 'romhackplaza') }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{% endif %}
|
||||
{% if notif.type_id == "message" or notif.type_id == "reply_message" %}
|
||||
|
||||
<span class="rhdo-project-link" style="float:right;display:block;">
|
||||
<a class="reply-message" href="#reply" data-id="{{ notif.id }}">
|
||||
{{ __('Reply', 'romhackplaza') }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ __( "You don't have any notifications.", 'romhackplaza') }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
85
views/pages/submission-generic.twig
Normal file
85
views/pages/submission-generic.twig
Normal file
@@ -0,0 +1,85 @@
|
||||
{% 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 %}
|
||||
85
views/pages/submit-translation.twig
Normal file
85
views/pages/submit-translation.twig
Normal file
@@ -0,0 +1,85 @@
|
||||
{% extends "pages/submission-generic.twig" %}
|
||||
|
||||
{% block form_create %}
|
||||
|
||||
{% set accordion_opened = true %}
|
||||
|
||||
{% submission_accordion "download-files" %}
|
||||
{% include "pieces/submissions/fields/file-uploader.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "about-translation" %}
|
||||
{% include "pieces/submissions/fields/entry-title.twig" %}
|
||||
{% include "pieces/submissions/fields/version-number.twig" %}
|
||||
{% include "pieces/submissions/fields/hack-status.twig" %}
|
||||
{% include "pieces/submissions/fields/release-date.twig" %}
|
||||
{% include "pieces/submissions/fields/languages.twig" %}
|
||||
{% include "pieces/submissions/fields/post-content.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% set accordion_opened = false %}
|
||||
|
||||
{% submission_accordion "game-information" %}
|
||||
{% include "pieces/submissions/fields/game.twig" %}
|
||||
{% include "pieces/submissions/fields/platform.twig" %}
|
||||
{% include "pieces/submissions/fields/genre.twig" %}
|
||||
{% include "pieces/submissions/fields/hashes.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "attachments" %}
|
||||
{% include "pieces/submissions/fields/acf-attachments.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "team-information" %}
|
||||
{% include "pieces/submissions/fields/authors.twig" %}
|
||||
{% include "pieces/submissions/fields/credits.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "extra-links" %}
|
||||
{% include "pieces/submissions/fields/extra-links.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% include "pieces/submissions/fields/save-as-draft.twig" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block form_edit %}
|
||||
|
||||
{% set accordion_opened = false %}
|
||||
|
||||
{% submission_accordion "download-files" %}
|
||||
{% include "pieces/submissions/fields/file-uploader.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "about-translation" %}
|
||||
{% include "pieces/submissions/fields/entry-title.twig" %}
|
||||
{% include "pieces/submissions/fields/version-number.twig" %}
|
||||
{% include "pieces/submissions/fields/hack-status.twig" %}
|
||||
{% include "pieces/submissions/fields/release-date.twig" %}
|
||||
{% include "pieces/submissions/fields/languages.twig" %}
|
||||
{% include "pieces/submissions/fields/post-content.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "game-information" %}
|
||||
{% include "pieces/submissions/fields/game.twig" %}
|
||||
{% include "pieces/submissions/fields/platform.twig" %}
|
||||
{% include "pieces/submissions/fields/genre.twig" %}
|
||||
{% include "pieces/submissions/fields/hashes.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "attachments" %}
|
||||
{% include "pieces/submissions/fields/acf-attachments.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "team-information" %}
|
||||
{% include "pieces/submissions/fields/authors.twig" %}
|
||||
{% include "pieces/submissions/fields/credits.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% submission_accordion "extra-links" %}
|
||||
{% include "pieces/submissions/fields/extra-links.twig" %}
|
||||
{% end_submission_accordion %}
|
||||
|
||||
{% include "pieces/submissions/fields/save-as-draft.twig" %}
|
||||
|
||||
{% endblock %}
|
||||
33
views/pieces/menus/primary.twig
Normal file
33
views/pieces/menus/primary.twig
Normal file
@@ -0,0 +1,33 @@
|
||||
{% if menu.primary %}
|
||||
|
||||
<div class="primary-navigation-wrap" {{ fn( 'RomhackPlaza\\Backwards\\treville_amp_primary_menu_is_toggled') }} >
|
||||
|
||||
<div class="primary-navigation container">
|
||||
|
||||
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="{{ __('Primary Menu', 'romhackplaza')|esc_attr }}">
|
||||
|
||||
<ul id="primary-menu" class="menu">
|
||||
{% for item in menu.primary.items %}
|
||||
<li class="{{ item.classes|join(' ') }}">
|
||||
<a href="{{ item.link }}" {{ item.is_target_blank ? 'target="_blank"' }}>{{ item.title }}</a>
|
||||
|
||||
{% if item.children %}
|
||||
<ul class="sub-menu">
|
||||
{% for child in item.children %}
|
||||
<li class="menu-item {{ child.classes|join(' ') }}">
|
||||
<a href="{{ child.link }}" {{ child.is_target_blank ? 'target="_blank"' }}>{{ child.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
40
views/pieces/menus/secondary.twig
Normal file
40
views/pieces/menus/secondary.twig
Normal file
@@ -0,0 +1,40 @@
|
||||
{% if menu.primary or menu.secondary %}
|
||||
|
||||
<button class="mobile-menu-toggle menu-toggle" aria-controls="primary-menu secondary-menu" aria-expanded="false" {{ fn( 'RomhackPlaza\\Backwards\\treville_amp_menu_toggle') }}>
|
||||
{{ svg_icon('menu') }}
|
||||
{{ svg_icon('close') }}
|
||||
<span class="menu-toggle-text screen-reader-text">{{ __('Menu', 'romhackplaza')|esc_html }}</span>
|
||||
</button>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if menu.secondary %}
|
||||
|
||||
<div class="secondary-navigation" {{ fn( 'RomhackPlaza\\Backwards\\treville_amp_secondary_menu_is_toggled') }} >
|
||||
|
||||
<nav id="header-navigation" class="top-navigation" role="navigation" aria-label="{{ __('Secondary Menu', 'romhackplaza')|esc_attr }}">
|
||||
|
||||
<ul id="secondary-menu" class="menu">
|
||||
{% for item in menu.secondary.items %}
|
||||
<li class=" {{ item.classes|join(' ') }}">
|
||||
<a href="{{ item.link }}" {{ item.is_target_blank ? 'target="_blank"' }}>{{ item.title }}</a>
|
||||
|
||||
|
||||
{% if item.children %}
|
||||
<ul class="sub-menu">
|
||||
{% for child in item.children %}
|
||||
<li class="menu-item {{ child.classes|join(' ') }}">
|
||||
<a href="{{ child.link }}" {{ child.is_target_blank ? 'target="_blank"' }}>{{ child.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
22
views/pieces/posts/author-bio.twig
Normal file
22
views/pieces/posts/author-bio.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
{% if theme_setting( 'author_bio' ) or conditional_tag.is_customize_preview %}
|
||||
|
||||
<div class="entry-author clearfix">
|
||||
<div class="author-avatar">
|
||||
|
||||
{{ fn( 'get_avatar', post.author.user_email, 128 ) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="author-heading">
|
||||
<h4 class="author-title">{{ __( 'About %s', 'romhackplaza' )|esc_html|format( '<span class="author-name">' ~ post.author.display_name ~ '</span>' ) }}</h4>
|
||||
<a class="author-link" href="{{ post.author.profile_url|esc_url }}" rel="author">
|
||||
{{ __( 'View all posts', 'romhackplaza')|esc_html }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p class="author-bio">
|
||||
{{ post.author.meta( 'description' ) }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
23
views/pieces/posts/grids/classic.twig
Normal file
23
views/pieces/posts/grids/classic.twig
Normal file
@@ -0,0 +1,23 @@
|
||||
<article id="post-{{ post.ID }}" class="article post-type-{{ post.type }}">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
<a href="{{ post.link }}">
|
||||
<h1 class="page-title">{{ post.title }}</h1>
|
||||
</a>
|
||||
|
||||
</header>
|
||||
|
||||
{{ fn( 'the_post_thumbnail' ) }}
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="entry-content clearfix">
|
||||
|
||||
{{ post.content }}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
10
views/pieces/submissions/fields/acf-attachments.twig
Normal file
10
views/pieces/submissions/fields/acf-attachments.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
<span class="label">
|
||||
{{ __( "Main Image:", 'romhackplaza' ) }}
|
||||
</span>
|
||||
<span class="field-helper">
|
||||
{{ __( "This will show up on the index and on top of the entry. A screenshot or custom cover is prefered else all hacks of same game will look the same.", 'romhackplaza' ) }}
|
||||
</span>
|
||||
<br>
|
||||
{% if can_acf %}
|
||||
{{ function( 'acf_form', attachments_settings ) }}
|
||||
{% endif %}
|
||||
11
views/pieces/submissions/fields/authors.twig
Normal file
11
views/pieces/submissions/fields/authors.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
<label for="author-name">
|
||||
{{ __( "Authors:", 'romhackplaza') }}
|
||||
</label>
|
||||
<span class="field-helper">
|
||||
{{ __( "Person or Group who created this, if it's you add/select yourself.", 'romhackplaza' ) }}
|
||||
</span>
|
||||
<select id="author-name" name="author-name[]" multiple="multiple" required>
|
||||
{% for author in value_authors %}
|
||||
<option value="{{ author.term_id|esc_attr }}" selected>{{ author.name|esc_html }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
7
views/pieces/submissions/fields/credits.twig
Normal file
7
views/pieces/submissions/fields/credits.twig
Normal file
@@ -0,0 +1,7 @@
|
||||
<label for="staff">
|
||||
{{ __( "Staff/Credits", 'romhackplaza' ) }}
|
||||
</label>
|
||||
<span class="field-helper">
|
||||
{{ __( "Optional.", 'romhackplaza') }}
|
||||
</span>
|
||||
<textarea id="staff" name="staff" rows="4">{{ value_credits }}</textarea>
|
||||
10
views/pieces/submissions/fields/entry-title.twig
Normal file
10
views/pieces/submissions/fields/entry-title.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
<label for="entryTitle">{{ entry_title_field_name }}</label>
|
||||
{% if post_type == "translations" %}
|
||||
{{ __( "If the translation has a custom title. If not, leave it blank and the game title will be taken.", 'romhackplaza' ) }}
|
||||
{% endif %}
|
||||
<input
|
||||
type="text"
|
||||
id="entryTitle"
|
||||
value="{{ value_entry_title }}"
|
||||
{% if not post_type == "translations" %}required{% endif %}
|
||||
>
|
||||
12
views/pieces/submissions/fields/extra-links.twig
Normal file
12
views/pieces/submissions/fields/extra-links.twig
Normal file
@@ -0,0 +1,12 @@
|
||||
<label for="releaseSite">
|
||||
{{ __( "Release Site:", 'romhackplaza' ) }}
|
||||
</label>
|
||||
<span class="field-helper">{{ __( 'Optional.', 'romhackplaza' ) }}</span>
|
||||
<span class="field-helper">{{ __( "Project entry on site/blog/forum/GitHub.", 'romhackplaza' ) }}</span>
|
||||
<input type="url" id="releaseSite" name="release_site" placeholder="https://example.com" value="{{ value_release_site }}">
|
||||
|
||||
<label for="youtubeVideo">
|
||||
{{ __( "YouTube Video:", 'romhackplaza' ) }}
|
||||
</label>
|
||||
<span class="field-helper">{{ __( 'Optional.', 'romhackplaza' ) }}</span>
|
||||
<input type="url" id="youtubeVideo" name="youtube_video" placeholder="https://youtube.com/watch?v=example" value="{{ value_youtube_video }}">
|
||||
32
views/pieces/submissions/fields/file-uploader.twig
Normal file
32
views/pieces/submissions/fields/file-uploader.twig
Normal file
@@ -0,0 +1,32 @@
|
||||
<span class="label">
|
||||
{{ __( "Files", 'romhackplaza' ) }}
|
||||
</span>
|
||||
<span class="field-helper">
|
||||
{{ __( "For patches, .zip is prefered. .7z/.rar accepted. <b>To enable online patcher</b>, your patch need to be compressed in a <b>ZIP file</b>", 'romhackplaza' ) }}
|
||||
</span>
|
||||
<div class="file-upload-container">
|
||||
<label class="drop-container" id="file-container">
|
||||
<span id="file-container-text" class="drop-title">{{ __( "Drop files here or click to upload the file.", 'romhackplaza' ) }}</span>
|
||||
</label>
|
||||
<span id="fileSizeDisplay"></span>
|
||||
<div class="button-container">
|
||||
<button id="cancelButton" style="display:none;">{{ __( "Cancel Upload", 'romhackplaza' ) }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="progress" style="display:none;">
|
||||
<div id="fullbar">
|
||||
<div class="bar" style="width:0%;"></div>
|
||||
<div id="status">0%</div>
|
||||
</div>
|
||||
<div id="speed">0.00 KB/s</div>
|
||||
</div>
|
||||
{% if submission_can_bypass_trashed_private %}
|
||||
<div id="chosen-server-visual" style="display:block;float:right;">
|
||||
{{ __( "Chosen server: ", 'romhackplaza' ) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="current-files">
|
||||
<span class="label">
|
||||
{{ __( "Current Files", 'romhackplaza' ) }}
|
||||
</span>
|
||||
</div>
|
||||
7
views/pieces/submissions/fields/game.twig
Normal file
7
views/pieces/submissions/fields/game.twig
Normal file
@@ -0,0 +1,7 @@
|
||||
<label for="gameTitle">{{ __( "Game Name:", 'romhackplaza' ) }}</label>
|
||||
<span class="field-helper">{{ __( "Search your game (give it a second).", 'romhackplaza' ) }}</span>
|
||||
<select id="gameTitle" name="gameTitle" data-term-id="{{ value_game_id|esc_attr }}" data-term-name="{{ value_game_name|esc_attr }}">
|
||||
{% if value_game_id == "" %}
|
||||
<option value=""></option>
|
||||
{% endif %}
|
||||
</select>
|
||||
11
views/pieces/submissions/fields/genre.twig
Normal file
11
views/pieces/submissions/fields/genre.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
<label for="genre">
|
||||
{{ __( "Genre:", 'romhackplaza' ) }}
|
||||
</label>
|
||||
<select id="genre" name="genre" class="custom-select" required>
|
||||
<option value="" disabled selected>{{ __( "Select a genre", 'romhackplaza' ) }}
|
||||
{% for term in terms_genre %}
|
||||
<option value="{{ term.id|esc_attr }}" {% if term.id == value_genre_id %}selected{% endif %}>
|
||||
{{ term.name|esc_html }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
9
views/pieces/submissions/fields/hack-status.twig
Normal file
9
views/pieces/submissions/fields/hack-status.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
<fieldset>
|
||||
<legend>{{ __( "Status:", 'romhackplaza' ) }}</legend>
|
||||
{% for term in terms_status %}
|
||||
<div class="status-option">
|
||||
<input type="radio" id="complete" name="hack-status" value="{{ term.id }}" {% if term.id in value_terms_status %}checked{% endif %} required>
|
||||
<label for="complete">{{ __( term.title, 'romhackplaza' ) }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
13
views/pieces/submissions/fields/hashes.twig
Normal file
13
views/pieces/submissions/fields/hashes.twig
Normal file
@@ -0,0 +1,13 @@
|
||||
<label for="hashes">
|
||||
{{ __( "Hashes:", 'romhackplaza' ) }}
|
||||
</label>
|
||||
<span class="field-helper">{{ __( "Hash of original, unpatched rom. Calculate it here or paste it directly below.", "romhackplaza" ) }}</span>
|
||||
|
||||
<div class="file-upload-container">
|
||||
<label class="drop-container" id="hash-container">
|
||||
<span class="drop-title" id="hash-container-text">{{ __( "Drop files here or click to upload the file", 'romhackplaza' ) }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div><span id="loading" style="display:none;">{{ __( 'Now Loading...', 'romhackplaza' ) }}</span></div>
|
||||
<textarea id="hashes" name="hashes" rows="4" required>{{ value_hashes }}</textarea>
|
||||
<button id="clearButton" type="button" style="float:right;">{{ __( "Clear", 'romhackplaza' ) }}</button>
|
||||
17
views/pieces/submissions/fields/languages.twig
Normal file
17
views/pieces/submissions/fields/languages.twig
Normal file
@@ -0,0 +1,17 @@
|
||||
<label for="language">
|
||||
{{ __( "Language", 'romhackplaza' ) }}
|
||||
{% do action( 'qm/debug', value_terms_language ) %}
|
||||
</label>
|
||||
<div class="languages-selector">
|
||||
<input type="text" id="searchBox" placeholder="{{ __( "Find languages...", 'romhackplaza' ) }}">
|
||||
<div id="checkboxGroup">
|
||||
{% for term in terms_language %}
|
||||
<div class="checkbox-wrapper">
|
||||
<label>
|
||||
<input type="checkbox" name="language[]" value="{{ term.term_id }}" {% if term.term_id in value_terms_language %}checked{% endif %} >
|
||||
{{ __( term.name, 'romhackplaza' ) }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
11
views/pieces/submissions/fields/platform.twig
Normal file
11
views/pieces/submissions/fields/platform.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
<label for="platform">
|
||||
{{ __( "Platform:", 'romhackplaza' ) }}
|
||||
</label>
|
||||
<select id="platform" name="platform" class="custom-select" required>
|
||||
<option value="" disabled selected>{{ __( "Select a platform", 'romhackplaza' ) }}
|
||||
{% for term in terms_platform %}
|
||||
<option value="{{ term.id|esc_attr }}" {% if term.id == value_platform_id %}selected{% endif %}>
|
||||
{{ term.name|esc_html }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
4
views/pieces/submissions/fields/post-content.twig
Normal file
4
views/pieces/submissions/fields/post-content.twig
Normal file
@@ -0,0 +1,4 @@
|
||||
<label for="postContent">
|
||||
{{ __( "Description:", 'romhackplaza') }}
|
||||
</label>
|
||||
{{ fn( 'wp_editor', value_post_content, "postContent", post_content_settings ) }}
|
||||
15
views/pieces/submissions/fields/release-date.twig
Normal file
15
views/pieces/submissions/fields/release-date.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
<label for="releaseDate">
|
||||
{{ __( "Last updated:", "romhackplaza" ) }}
|
||||
</label>
|
||||
<span class="field-helper">{{ __( "If only initial release exist, the release date.", "romhackplaza" ) }}</span>
|
||||
<input
|
||||
type="date"
|
||||
id="releaseDate"
|
||||
name="release_date"
|
||||
value="{{ value_release_date }}"
|
||||
required
|
||||
>
|
||||
<script>
|
||||
const today = new Date().toISOString().split("T")[0];
|
||||
document.getElementById("releaseDate").setAttribute( "max", today );
|
||||
</script>
|
||||
4
views/pieces/submissions/fields/save-as-draft.twig
Normal file
4
views/pieces/submissions/fields/save-as-draft.twig
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="drafts-checkbox">
|
||||
<input type="checkbox" id="saveToDrafts" name="saveToDrafts" value="yes" {% if submission_save_as_draft_checkbox %}checked{% endif %}>
|
||||
<label for="saveToDrafts">{{ __( "Don't publish, save to", 'romhackplaza' ) }} <a href="/my-drafts/">{{ __( "My Drafts", 'romhackplaza') }}</a></label>
|
||||
</div>
|
||||
8
views/pieces/submissions/fields/version-number.twig
Normal file
8
views/pieces/submissions/fields/version-number.twig
Normal file
@@ -0,0 +1,8 @@
|
||||
<label for="versionNumber">{{ version_number_field_name }}</label>
|
||||
<input
|
||||
type="text"
|
||||
id="versionNumber"
|
||||
name="versionNumber"
|
||||
value="{{ value_version_number }}"
|
||||
required
|
||||
>
|
||||
9
views/pieces/submissions/form-base-begin.twig
Normal file
9
views/pieces/submissions/form-base-begin.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
<form id="translationForm">
|
||||
|
||||
{% if submission_post_id != 0 %}
|
||||
<input type="hidden" name="is_edit" value="1">
|
||||
<input type="hidden" name="post_id" value="{{ submission_edit_entry }}">
|
||||
{% endif %}
|
||||
<input type="hidden" name="custom_post_type" value="{{ post_type }}">
|
||||
<input type="hidden" id="reservedPostID" name="reserved_post_id" value="">
|
||||
<input type="hidden" id="favoriteServer" name="favorite_server" value="">
|
||||
4
views/pieces/submissions/form-base-end.twig
Normal file
4
views/pieces/submissions/form-base-end.twig
Normal file
@@ -0,0 +1,4 @@
|
||||
{{ submission_save_nonce }}
|
||||
<button class="blueButton" type="submit" id="submitTranslationButton">{{ __( "Submit Changes", 'romhackplaza' ) }}</button>
|
||||
|
||||
</form>
|
||||
5
views/pieces/submissions/message-by-team.twig
Normal file
5
views/pieces/submissions/message-by-team.twig
Normal file
@@ -0,0 +1,5 @@
|
||||
{% if submission_queue_status != "" %}
|
||||
|
||||
{{ __( "Message by team:", 'romhackplaza' ) }} {{ submission_queue_status }}
|
||||
|
||||
{% endif %}
|
||||
33
views/pieces/submissions/result-message.twig
Normal file
33
views/pieces/submissions/result-message.twig
Normal file
@@ -0,0 +1,33 @@
|
||||
{% if submission_post_id == 0 %}
|
||||
|
||||
<b>{{ __( "No valid post ID provided.", "romhackplaza" ) }}</b>
|
||||
|
||||
{% elseif submission_result == "edit-successful" %}
|
||||
|
||||
{{ __( "Your changes were recorded successfully!", "romhackplaza" ) }}
|
||||
|
||||
{% include "pieces/submissions/result-what-now.twig" %}
|
||||
|
||||
{% elseif submission_result == "submit-successful" %}
|
||||
|
||||
{{ __( "Your entry was recorded!", 'romhackplaza' ) }}
|
||||
|
||||
{% if submission_author_is_verified %}
|
||||
|
||||
{{ __( "Since you are verified, your submission can be seen on the home page or on the my drafts page if you chose not to publish it.", 'romhackplaza' ) }}
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ __("Since you are not a verified member, your submission is pending review by a staff member. You can see it on the submissions queue.") }}
|
||||
<br>
|
||||
{{ __( "We'll get to it as soon as possible.", 'romhackplaza' ) }}
|
||||
<br>
|
||||
{{ __( "To avoid wait times, you can also ", "romhackplaza" ) }}<a href="/how-to-become-verified">{{ __( "become verified", 'romhackplaza') }}</a>.
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
<b>{{ __( "Do you want a coffee?", "romhackplaza" ) }}</b>
|
||||
|
||||
{% endif %}
|
||||
23
views/pieces/submissions/result-what-now.twig
Normal file
23
views/pieces/submissions/result-what-now.twig
Normal file
@@ -0,0 +1,23 @@
|
||||
{% set new_post = get_post( submission_post_id ) %}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ new_post.link }}">{{ __( "View entry", "romhackplaza") }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ submission_edit_entry }}">{{ __( "Edit Again", 'romhackplaza' ) }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>{{ __( "What now?", 'romhackplaza' ) }}</h3>
|
||||
<ul>
|
||||
<li><a href="/submit-romhack">{{ __( "Submit new Romhack", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-translation">{{ __( "Submit new Translation", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-homebrew">{{ __( "Submit new Homebrew", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-utility">{{ __( "Submit new Utility", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-document">{{ __( "Submit new Document", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-lua-script">{{ __( "Submit new LUA Script", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-tutorial">{{ __( "Submit new Tutorial", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="/submit-news">{{ __( "Submit new News", "romhackplaza" ) }}</a></li>
|
||||
<li><a href="{{ site.url }}">{{ __( "Go Home", "romhackplaza" ) }}</a></li>
|
||||
</ul>
|
||||
1
views/single.twig
Executable file
1
views/single.twig
Executable file
@@ -0,0 +1 @@
|
||||
<h2>{post.title}</h2>
|
||||
Reference in New Issue
Block a user