本文整理汇总了PHP中Issue::display_proposals_th方法的典型用法代码示例。如果您正苦于以下问题:PHP Issue::display_proposals_th方法的具体用法?PHP Issue::display_proposals_th怎么用?PHP Issue::display_proposals_th使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Issue
的用法示例。
在下文中一共展示了Issue::display_proposals_th方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html_head
if (!$issue->id) {
error(_("The requested issue does not exist."));
}
$_SESSION['ngroup'] = $issue->area()->ngroup;
if ($issue->state != 'finished') {
error(_("This issue is not finished."));
}
html_head(_("Vote result"), true);
?>
<table class="proposals">
<?
Issue::display_proposals_th(true);
list($proposals, $submitted) = $issue->proposals_list(true);
$issue->display_proposals($proposals, $submitted, count($proposals), true);
?>
</table>
<h2><?php
echo _("Votes");
?>
</h2>
<?
if ($issue->cleared) {
?>
<p><? printf(_("Raw data has been cleared at %s."), datetimeformat($issue->cleared)); ?></p>
<?
示例2: array
} else {
// default
$vote = array();
foreach ( $proposals as $proposal ) {
$vote[$proposal->id]['acceptance'] = -1; // default is abstention
if (count($proposals) > 1) $vote[$proposal->id]['score'] = 0; // default is 0
}
}
// voting form
form(BN."?issue=".$issue->id, "", "", "vote", true);
?>
<input type="hidden" name="action" value="submit">
<table class="proposals">
<?
Issue::display_proposals_th(false, count($proposals) > 1);
$issue->display_proposals($proposals, $submitted, count($proposals), false, 0, $vote);
?>
<tr>
<td></td>
<td<?
if (count($proposals) > 1) { ?> colspan="2"<? }
?> class="th"><input type="submit" value="<?php
echo _("Submit vote");
?>
"></td>
</tr>
</table>
<?
form_end();
示例3: count
// calculate period rowspan
if ($period and $issue->period == $period and !Login::$admin) {
$period_rowspan[$i] = 0;
$period_rowspan[$i_first] += count($proposals) + 1;
$separator_colspan[$i] = 0;
} else {
$period_rowspan[$i] = count($proposals);
$separator_colspan[$i] = 1;
$i_first = $i;
$period = $issue->period;
}
$i++;
$line++;
}
Issue::display_proposals_th($show_results);
// display issues and proposals
$cols = 3;
if ($show_results) $cols++;
foreach ( $issues as $i => $issue ) {
/** @var $issue Issue */
?>
<tr class="issue_separator"><td colspan="<?= $cols + $separator_colspan[$i] ?>"></td><td></td></tr>
<?
$issue->display_proposals($proposals_issue[$i], $submitted_issue[$i], $period_rowspan[$i], $show_results);
}
?>
</table>
示例4: html_head
*/
require "inc/common_http.php";
html_head(HOME_H1, true);
?>
<section>
<h2><?php
echo _("Recently interesting issues");
?>
</h2>
<table class="proposals">
<?
Issue::display_proposals_th(false, false, true);
if (Ngroup::$active_ngroups) {
$sql = "SELECT issue.* FROM issue
JOIN proposal ON proposal.issue = issue.id
JOIN area ON area.id = issue.area
WHERE area.ngroup IN (".join(",", Ngroup::$active_ngroups).")
GROUP BY issue.id";
if (Login::$ngroups) {
// show issues in the groups of the logged in member first
$sql .= ", area.ngroup
ORDER BY area.ngroup IN (".join(", ", Login::$ngroups).") DESC,";
} else {
$sql .= "
ORDER BY";
}
// order by highest activity, latest admitted, latest submitted