aowow/template/bricks/contribute.tpl.php
Sarjuuk 226f521439 Template/Endpoints (Base)
* redo page render following the logic of:
      Response ─┬─> TextResponse ─> TextResponseImpl
                └─> TemplateResponse ─> TemplateResponseImpl
    * split up giant files, one per response path
    * caching becomes a trait, implemented where necessary
        * TextResponses (Ajax) can now be cached
    * make use of previously defined php classes for js objects
        * Tabs, Listview, Tooltip, Announcement, Markup, Book, ...
    * \Aowow\Template\PageTemplate is the new class to be cached
    * do not discard error messages generated after vars have been sent to template
      and store in session for display at a later time
    * implement tracking consent management
    * move logic out of template into their respective endpoints
2025-09-25 15:32:18 +02:00

34 lines
1.2 KiB
PHP

<?php namespace Aowow; ?>
<?php
if ($this->contribute):
?>
<div class="clear"></div>
<div class="text">
<h2><?=Lang::main('contribute'); ?></h2>
</div>
<div id="tabs-contribute-generic" style="width: 50%"></div>
<div class="text" style="margin-right: 310px">
<div class="tabbed-contents" style="clear: none">
<?php
$this->localizedBrick('contrib', ['coError' => $this->community['coError'], 'ssError' => $this->community['ssError'], 'viError' => $this->community['viError']]);
?>
</div>
</div>
<script type="text/javascript">
var tabsContribute = new Tabs({parent: $WH.ge('tabs-contribute-generic')});
<?php
if ($this->contribute & CONTRIBUTE_CO):
echo " tabsContribute.add(LANG.tab_addyourcomment, {id: 'add-your-comment'});\n";
endif;
if ($this->contribute & CONTRIBUTE_SS):
echo " tabsContribute.add(LANG.tab_submitascreenshot, {id: 'submit-a-screenshot'});\n";
endif;
if ($this->contribute & CONTRIBUTE_VI):
echo " if (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO))\n";
echo " tabsContribute.add(LANG.tab_suggestavideo, {id: 'suggest-a-video'});\n";
endif;
?>
tabsContribute.flush();
</script>
<?php endif; ?>