本文整理汇总了PHP中Feature::getMilestoneTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Feature::getMilestoneTitle方法的具体用法?PHP Feature::getMilestoneTitle怎么用?PHP Feature::getMilestoneTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feature
的用法示例。
在下文中一共展示了Feature::getMilestoneTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayFeature
function displayFeature(Feature $feature, $view, $parent = null)
{
ob_start();
if ($feature->estimated) {
$view->featureEstimate += $feature->estimated;
$view->featureCompleted += $feature->status == 'Complete' ? $feature->estimated : 0;
}
$lateClass = $view->project->actualstart && strtotime($feature->created) > strtotime($view->project->actualstart) ? 'late-feature' : '';
$completeClass = $feature->status == 'Complete' ? 'featureComplete' : '';
$featureId = $feature->id;
?>
<li id="featurelist_<?php
echo $featureId;
?>
" class="<?php
echo $lateClass . ' ' . $completeClass;
?>
">
<input type="hidden" name="featureId" value="<?php
echo $feature->id;
?>
" />
<!-- Feature created <?php
echo $feature->created;
?>
and project started at <?php
echo $view->project->actualstart;
?>
-->
<div class="feature-title">
<h2>
<?php
$view->dialogPopin('featuredialog', $view->escape($feature->title), build_url('feature', 'edit', array('id' => $feature->id, 'projectid' => $feature->projectid)), array('title' => 'Edit Feature'));
?>
</h2>
<a title="Delete Feature" href="#" onclick="if (confirm('Are you sure')) $.post('<?php
echo build_url('feature', 'delete', array('__validation_token' => $view->requestValidator(true), 'id' => $feature->id));
?>
', function () { location.reload(false) }); return false;"><img class="small-icon" src="<?php
echo resource('images/delete.png');
?>
" /></a>
<?php
$view->dialogPopin('featuredialog', '<img src="' . resource('images/page_copy.png') . '" />', build_url('feature', 'edit', array('parent' => $feature->id, 'projectid' => $feature->projectid)));
?>
</div>
<?php
if ($feature->estimated) {
?>
<div class="feature-body">
<div class="feature-estimate">
<p class="feature-milestone"><?php
$view->o($feature->getMilestoneTitle());
?>
</p>
<p class="estimate">
<?php
$view->o($feature->estimated);
?>
</p>
</div>
<div class="feature-content">
<h3>Description</h3>
<p class="feature-description editable-feature" id="feature-<?php
echo $feature->id;
?>
-description"><?php
$view->o($feature->description);
?>
</p>
<h3>Assumptions</h3>
<p class="feature-assumptions editable-feature" id="feature-<?php
echo $feature->id;
?>
-assumptions"><?php
$view->o($feature->assumptions);
?>
</p>
<h3>Questions</h3>
<p class="feature-questions editable-feature" id="feature-<?php
echo $feature->id;
?>
-questions"><?php
$view->o($feature->questions);
?>
</p>
</div>
</div>
<?php
}
?>
<?php
$childFeatures = $feature->getChildFeatures();
if (count($childFeatures)) {
echo '<ul>';
//.........这里部分代码省略.........
示例2: displayFeature
function displayFeature(Feature $feature, $view, $pad = 0)
{
if ($feature->estimated) {
$view->featureEstimate += $feature->estimated;
$view->featureCompleted += $feature->isComplete() ? $feature->estimated : 0;
}
$bgcolor = strtotime($feature->created) > strtotime($view->project->started) ? ' style="background-color: #acc"' : '';
?>
<!-- Feature created <?php
echo $feature->created;
?>
and project started at <?php
echo $view->project->started;
?>
-->
<tr <?php
echo $bgcolor;
?>
>
<td>
<?php
echo str_repeat(" ", $pad);
?>
<?php
if ($feature->isComplete()) {
?>
<img class="small-icon" src="<?php
echo resource('images/accept.png');
?>
" />
<?php
}
?>
<a title="Show Details" href="<?php
echo build_url('feature', 'edit', array('id' => $feature->id, 'projectid' => $feature->projectid));
?>
"><?php
$view->o($feature->title);
?>
</a>
</td>
<td><a href="<?php
echo build_url('project', 'view', array('id' => $feature->milestone));
?>
"><?php
$view->o($feature->getMilestoneTitle());
?>
</a></td>
<td style="text-align: center">
<?php
$view->o($feature->estimated);
?>
</td>
<td>
<input class="action-icon" type="checkbox" value="<?php
$view->o($feature->id);
?>
" name="createfrom[]" />
<a title="Delete Feature" href="#" onclick="if (confirm('Are you sure')) location.href='<?php
echo build_url('feature', 'delete', array('id' => $feature->id));
?>
'; return false;"><img class="small-icon" src="<?php
echo resource('images/delete.png');
?>
" /></a>
<a title="Add Child Feature" href="<?php
echo build_url('feature', 'edit', array('parent' => $feature->id, 'projectid' => $feature->projectid));
?>
"><img class="small-icon" src="<?php
echo resource('images/page_copy.png');
?>
" /></a>
</td>
</tr>
<?php
$numberOfChildren = 0;
$tmpFeature = null;
foreach ($feature->getChildFeatures() as $child) {
++$numberOfChildren;
displayFeature($child, $view, $pad + 1);
$tmpFeature = $child;
}
if ($numberOfChildren > 1) {
?>
<tr>
<td>
<?php
echo str_repeat(" ", $pad + 1);
?>
<a href="<?php
echo build_url('feature', 'orderfeatures', array('id' => $feature->id));
?>
" title="Edit feature order" >Order Features</a>
</td>
<td></td><td></td><td></td>
</tr>
<?php
//.........这里部分代码省略.........