|
From: <zy...@us...> - 2013-05-16 04:42:20
|
Revision: 11549
http://sourceforge.net/p/xoops/svn/11549
Author: zyspec
Date: 2013-05-16 04:42:11 +0000 (Thu, 16 May 2013)
Log Message:
-----------
* only display newbb info in admin polls list if poll created with newbb exists
* minor code cleanup
* include icons for search, etc.
Modified Paths:
--------------
XoopsModules/xoopspoll/branches/zyspec/admin/main.php
XoopsModules/xoopspoll/branches/zyspec/templates/admin/xoopspoll_list.html
Added Paths:
-----------
XoopsModules/xoopspoll/branches/zyspec/images/icons/
XoopsModules/xoopspoll/branches/zyspec/images/icons/index.html
XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_large.png
XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_small.png
XoopsModules/xoopspoll/branches/zyspec/images/icons/obscured.png
Modified: XoopsModules/xoopspoll/branches/zyspec/admin/main.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/admin/main.php 2013-05-15 20:53:29 UTC (rev 11548)
+++ XoopsModules/xoopspoll/branches/zyspec/admin/main.php 2013-05-16 04:42:11 UTC (rev 11549)
@@ -94,7 +94,8 @@
$topic_handler =& xoops_getmodulehandler('topic', 'newbb');
$topicFields = array('topic_id', 'topic_title', 'poll_id');
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('topic_haspoll'));
+ $criteria->add(new Criteria('topic_haspoll', 0, '>'));
+ $pollsWithTopics = array();
$topicsWithPolls = $topic_handler->getAll($criteria, $topicFields, false);
foreach ($topicsWithPolls as $pollTopics) {
$pollsWithTopics[$pollTopics['poll_id']] = array(
@@ -102,9 +103,13 @@
'topic_title' => $pollTopics['topic_title']
);
}
- $admin_class->addInfoBox(_AM_XOOPSPOLL_NEWBB_SUPPORT);
- $admin_class->addInfoBoxLine(_AM_XOOPSPOLL_NEWBB_SUPPORT, "<img src='" . $pathIcon16 . DIRECTORY_SEPARATOR . "forum.png' alt='" . _AM_XOOPSPOLL_NEWBB_SUPPORT . "' /> " . _AM_XOOPSPOLL_NEWBB_INTRO, null, null, "information");
- $newbbIntro = $admin_class->renderInfoBox();
+ if (!empty($pollsWithTopics)) {
+ $admin_class->addInfoBox(_AM_XOOPSPOLL_NEWBB_SUPPORT);
+ $admin_class->addInfoBoxLine(_AM_XOOPSPOLL_NEWBB_SUPPORT, "<img src='" . $pathIcon16 . DIRECTORY_SEPARATOR . "forum.png' alt='" . _AM_XOOPSPOLL_NEWBB_SUPPORT . "' /> " . _AM_XOOPSPOLL_NEWBB_INTRO, null, null, "information");
+ $newbbIntro = $admin_class->renderInfoBox();
+ } else {
+ $newbbIntro = "";
+ }
} else {
$pollsWithTopics = array();
$newbbIntro = "";
Added: XoopsModules/xoopspoll/branches/zyspec/images/icons/index.html
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/images/icons/index.html (rev 0)
+++ XoopsModules/xoopspoll/branches/zyspec/images/icons/index.html 2013-05-16 04:42:11 UTC (rev 11549)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_large.png
===================================================================
(Binary files differ)
Index: XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_large.png
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_large.png 2013-05-15 20:53:29 UTC (rev 11548)
+++ XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_large.png 2013-05-16 04:42:11 UTC (rev 11549)
Property changes on: XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_large.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_small.png
===================================================================
(Binary files differ)
Index: XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_small.png
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_small.png 2013-05-15 20:53:29 UTC (rev 11548)
+++ XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_small.png 2013-05-16 04:42:11 UTC (rev 11549)
Property changes on: XoopsModules/xoopspoll/branches/zyspec/images/icons/logo_small.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/xoopspoll/branches/zyspec/images/icons/obscured.png
===================================================================
(Binary files differ)
Index: XoopsModules/xoopspoll/branches/zyspec/images/icons/obscured.png
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/images/icons/obscured.png 2013-05-15 20:53:29 UTC (rev 11548)
+++ XoopsModules/xoopspoll/branches/zyspec/images/icons/obscured.png 2013-05-16 04:42:11 UTC (rev 11549)
Property changes on: XoopsModules/xoopspoll/branches/zyspec/images/icons/obscured.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsModules/xoopspoll/branches/zyspec/templates/admin/xoopspoll_list.html
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/templates/admin/xoopspoll_list.html 2013-05-15 20:53:29 UTC (rev 11548)
+++ XoopsModules/xoopspoll/branches/zyspec/templates/admin/xoopspoll_list.html 2013-05-16 04:42:11 UTC (rev 11549)
@@ -8,19 +8,19 @@
<table class='outer width100 bnone pad3 marg2'>
<thead>
<tr>
- <th class='center'><{$smarty.const._AM_XOOPSPOLL_DISPLAYBLOCK}></th>
- <th class='left'><{$smarty.const._AM_XOOPSPOLL_DISPLAYORDER}></th>
- <th class='left'><{$smarty.const._AM_XOOPSPOLL_POLLQUESTION}></th>
- <th class='center'><{$smarty.const._AM_XOOPSPOLL_VOTERS}></th>
- <th class='center'><{$smarty.const._AM_XOOPSPOLL_VOTES}></th>
- <th class='center'><{$smarty.const._AM_XOOPSPOLL_START_TIME}></th>
- <th class='center'><{$smarty.const._AM_XOOPSPOLL_EXPIRATION}></th>
- <th class='center'><{$smarty.const._AM_XOOPSPOLL_ACTIONS}></th>
- </tr>
+ <th class='center'><{$smarty.const._AM_XOOPSPOLL_DISPLAYBLOCK}></th>
+ <th class='left'><{$smarty.const._AM_XOOPSPOLL_DISPLAYORDER}></th>
+ <th class='left'><{$smarty.const._AM_XOOPSPOLL_POLLQUESTION}></th>
+ <th class='center'><{$smarty.const._AM_XOOPSPOLL_VOTERS}></th>
+ <th class='center'><{$smarty.const._AM_XOOPSPOLL_VOTES}></th>
+ <th class='center'><{$smarty.const._AM_XOOPSPOLL_START_TIME}></th>
+ <th class='center'><{$smarty.const._AM_XOOPSPOLL_EXPIRATION}></th>
+ <th class='center'><{$smarty.const._AM_XOOPSPOLL_ACTIONS}></th>
+ </tr>
</thead>
<tfoot>
<tr class='right bg3'>
- <td class='center' colspan='2'>
+ <td class='center' colspan='2'>
<input type='hidden' name='op' value='quickupdate' />
<{$securityToken}>
<input type='submit' value='<{$smarty.const._SUBMIT}>' />
@@ -40,7 +40,7 @@
</td>
<td>
-<{ if "" != $pollItem.topic_title}>
+<{ if ("" != $pollItem.topic_title)}>
<{ html_image file=$pollItem.buttons.forum.file href=$pollItem.buttons.forum.href alt=$pollItem.buttons.forum.alt title=$pollItem.buttons.forum.alt}>
<{ /if}>
<{ $pollItem.question}>
|