mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Contribute
* added option to hide contribute tabs depending on subject (screenshots for sounds .. yeah, right)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
<?php
|
||||
if (!empty($this->contribute));
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<div class="text">
|
||||
<h2><?php echo Lang::main('contribute'); ?></h2>
|
||||
@@ -12,9 +15,18 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var tabsContribute = new Tabs({parent: $WH.ge('tabs-contribute-generic')});
|
||||
tabsContribute.add(LANG.tab_addyourcomment, {id: 'add-your-comment'});
|
||||
tabsContribute.add(LANG.tab_submitascreenshot, {id: 'submit-a-screenshot'});
|
||||
if (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO))
|
||||
tabsContribute.add(LANG.tab_suggestavideo, {id: 'suggest-a-video'});
|
||||
<?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>
|
||||
<? endif; ?>
|
||||
|
||||
@@ -62,12 +62,16 @@ if (!empty($this->user)):
|
||||
echo ' us_addProfilesTab('.Util::toJSON($this->user['profileData']).");\n";
|
||||
endif;
|
||||
elseif ($relTabs):
|
||||
?>
|
||||
new Listview({template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: <?=$tabVar; ?>, parent: 'lv-generic', data: lv_comments});
|
||||
new Listview({template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: <?=$tabVar; ?>, parent: 'lv-generic', data: lv_screenshots});
|
||||
if (lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))
|
||||
new Listview({template: 'video', id: 'videos', name: LANG.tab_videos, tabs: <?=$tabVar; ?>, parent: 'lv-generic', data: lv_videos});
|
||||
<?php
|
||||
if ($this->contribute & CONTRIBUTE_CO):
|
||||
echo " new Listview({template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: ".$tabVar.", parent: 'lv-generic', data: lv_comments});\n";
|
||||
endif;
|
||||
if ($this->contribute & CONTRIBUTE_SS):
|
||||
echo " new Listview({template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: ".$tabVar.", parent: 'lv-generic', data: lv_screenshots});\n";
|
||||
endif;
|
||||
if ($this->contribute & CONTRIBUTE_VI):
|
||||
echo " if (lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))\n";
|
||||
echo " new Listview({template: 'video', id: 'videos', name: LANG.tab_videos, tabs: ".$tabVar.", parent: 'lv-generic', data: lv_videos});\n";
|
||||
endif;
|
||||
endif;
|
||||
|
||||
if ($isTabbed):
|
||||
|
||||
Reference in New Issue
Block a user