• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tbg_formatTime函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tbg_formatTime函数的典型用法代码示例。如果您正苦于以下问题:PHP tbg_formatTime函数的具体用法?PHP tbg_formatTime怎么用?PHP tbg_formatTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了tbg_formatTime函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: foreach

<?php

if (count($comments)) {
    ?>
	<table cellpadding=0 cellspacing=0 style="margin: 5px;">
		<?php 
    $prev_date = null;
    ?>
		<?php 
    foreach ($comments as $comment) {
        ?>
			<?php 
        $date = tbg_formatTime($comment->getPosted(), 5);
        ?>
			<?php 
        if ($date != $prev_date) {
            ?>
				<tr>
					<td class="latest_action_dates" colspan="2"><?php 
            echo $date;
            ?>
</td>
				</tr>
			<?php 
        }
        ?>
			<?php 
        include_component('main/commentitem', array('comment' => $comment, 'include_project' => true));
        ?>
			<?php 
        $prev_date = $date;
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:_dashboardviewrecentcomments.inc.php


示例2: foreach

    ?>
			<ul class="article_list">
				<?php 
    foreach ($latest_articles as $article) {
        ?>
					<li>
						<div>
							<?php 
        echo image_tag('news_item_medium.png', array('style' => 'float: left;'), false, 'publish');
        ?>
							<?php 
        echo link_tag(make_url('publish_article', array('article_name' => $article->getName())), get_spaced_name($article->getTitle()));
        ?>
							<br>
							<span><?php 
        echo __('%time, by %user', array('%time' => tbg_formatTime($article->getPostedDate(), 3), '%user' => '<b>' . ($article->getAuthor() instanceof TBGIdentifiable ? '<a href="javascript:void(0);" onclick="TBG.Main.Helpers.Backdrop.show(\'' . make_url('get_partial_for_backdrop', array('key' => 'usercard', 'user_id' => $article->getAuthor()->getID())) . '\');">' . $article->getAuthor()->getName() . '</a>' : __('System')) . '</b>'));
        ?>
</span>
						</div>
					</li>
				<?php 
    }
    ?>
			</ul>
		<?php 
} else {
    ?>
			<div class="no_items"><?php 
    echo __('There are no recent pages here');
    ?>
</div>
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:_latestArticles.inc.php


示例3: __

    ?>
</option>
											<?php 
}
?>
										</select>
									</td>
								</tr>
								<tr>
									<td class="config_explanation" colspan="2">
										<?php 
echo __('This setting is used to display issues, comments and more in your local timezone.');
?>
<br>
 										<?php 
echo __('The time is now: %time%', array('%time%' => tbg_formatTime(time(), 1)));
?>
									</td>
								</tr>
								<tr>
									<td style="width: 200px; padding: 5px;"><label for="profile_timezone"><?php 
echo __('Language');
?>
</label></td>
									<td>
										<select name="profile_language" id="profile_language" style="width: 300px;">
											<option value="sys"<?php 
if ($tbg_user->getLanguage() == 'sys') {
    ?>
 selected<?php 
}
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:myaccount.html.php


示例4: tbg_formatTime

 - <?php 
        echo tbg_formatTime($milestone->getScheduledDate(), 22, true, true);
        ?>
)
            <?php 
    } elseif ($milestone->getStartingDate() && !$milestone->isScheduled()) {
        ?>
                (<?php 
        echo __('Starting %start_date', array('%start_date' => tbg_formatTime($milestone->getStartingDate(), 22, true, true)));
        ?>
)
            <?php 
    } elseif (!$milestone->getStartingDate() && $milestone->isScheduled()) {
        ?>
                (<?php 
        echo __('Ends %end_date', array('%end_date' => tbg_formatTime($milestone->getScheduledDate(), 22, true, true)));
        ?>
)
            <?php 
    }
    ?>
        </span>
        <div id="selected_burndown_image" class="graph_view" style="margin: 15px; width: 750px; height: 360px;"></div>
        <?php 
    //echo image_tag(make_url('project_scrum_sprint_burndown_image', array('project_key' => $selected_project->getKey(), 'sprint_id' => $milestone->getID())), array('style' => 'margin: 15px 0 15px 0;', 'id' => 'selected_burndown_image'), true);
    ?>
        <table id="milestone_details_issue_list" cellpadding="0" cellspacing="0" border="0">
            <thead>
                <tr>
                    <th>&nbsp;</td>
                    <th><?php 
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:_milestonedetails.inc.php


示例5: link_tag

        ?>
</td>
				<td>
					<span class="faded_out smaller"><?php 
        echo link_tag(make_url('project_dashboard', array('project_key' => $theIssue->getProject()->getKey())), '[' . $theIssue->getProject()->getKey() . ']');
        ?>
</span>
					<?php 
        echo link_tag(make_url('viewissue', array('project_key' => $theIssue->getProject()->getKey(), 'issue_no' => $theIssue->getFormattedIssueNo())), $theIssue->getFormattedTitle(true));
        ?>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="faded_out" style="padding-bottom: 15px;">
					<?php 
        echo __('<strong>%status%</strong>, updated %updated_at%', array('%status%' => $theIssue->getStatus() instanceof TBGDatatype ? $theIssue->getStatus()->getName() : __('Status not determined'), '%updated_at%' => tbg_formatTime($theIssue->getLastUpdatedTime(), 12)));
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		</table>
	<?php 
} else {
    ?>
		<div class="faded_out" style="padding: 5px 5px 15px 5px;"><?php 
    echo __($default_message);
    ?>
</div>
	<?php 
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:_results_view.inc.php


示例6: do_execute

 public function do_execute()
 {
     $this->cliEcho('Showing detailed information about ');
     $this->cliEcho($this->getProvidedArgument('project_key'), 'green');
     $this->cliEcho(' issue ');
     $print_issue_number = $this->getProvidedArgument('issue_number');
     if (is_numeric($print_issue_number)) {
         $print_issue_number = '#' . $print_issue_number;
     }
     $this->cliEcho($print_issue_number, 'yellow');
     $this->cliEcho(' on ');
     $this->cliEcho($this->_getCurrentRemoteServer(), 'white', 'bold');
     $this->cliEcho("\n");
     $url_options = array('project_key' => $this->project_key, 'issue_no' => $this->issue_number, 'format' => 'json');
     $this->cliEcho("\n");
     $issue = $this->getRemoteResponse($this->getRemoteURL('api_viewissue', $url_options));
     \thebuggenie\core\framework\Context::loadLibrary('common');
     $this->cliEcho($print_issue_number, 'green', 'bold');
     $this->cliEcho(" - ");
     $state = $issue->state == \thebuggenie\core\entities\Issue::STATE_OPEN ? 'OPEN' : 'CLOSED';
     $this->cliEcho("[{$state}] ", 'cyan');
     $this->cliEcho(html_entity_decode($issue->title), 'white', 'bold');
     $this->cliEcho("\n");
     $this->cliEcho("State: ", 'white', 'bold');
     $this->cliEcho($state);
     $this->cliEcho("\n");
     $this->cliEcho("Posted: ", 'white', 'bold');
     $this->cliEcho(tbg_formatTime($issue->created_at, 21, true, true) . ' (' . $issue->created_at . ')');
     $this->cliEcho("\n");
     $this->cliEcho("Posted by: ", 'white', 'bold');
     if ($issue->posted_by) {
         $this->cliEcho($issue->posted_by->name);
     } else {
         $this->cliEcho('-');
     }
     $this->cliEcho("\n");
     $this->cliEcho("Updated: ", 'white', 'bold');
     $this->cliEcho(tbg_formatTime($issue->updated_at, 21, true, true) . ' (' . $issue->updated_at . ')');
     $this->cliEcho("\n");
     $this->cliEcho("Assigned to: ", 'white', 'bold');
     if ($issue->assignee) {
         $this->cliEcho($issue->assignee->name);
     } else {
         $this->cliEcho('-');
     }
     $this->cliEcho("\n");
     $this->cliEcho("Status: ", 'white', 'bold');
     if ($issue->status) {
         $this->cliEcho($issue->status->name);
     } else {
         $this->cliEcho('-');
     }
     $this->cliEcho("\n");
     foreach ($issue->visible_fields as $field => $details) {
         $name = ucfirst(str_replace('_', ' ', $field));
         $this->cliEcho("{$name}: ", 'white', 'bold');
         if (isset($issue->{$field})) {
             if ($field == 'estimated_time' || $field == 'spent_time') {
                 if (isset($issue->{$field}->points)) {
                     $this->cliEcho($issue->{$field}->points . 'p, ' . $issue->{$field}->hours . 'h, ' . $issue->{$field}->days . 'd, ' . $issue->{$field}->weeks . 'w, ' . $issue->{$field}->months . 'mo');
                 } else {
                     $this->cliEcho('-');
                 }
             } else {
                 if (is_object($issue->{$field})) {
                     $this->cliEcho($issue->{$field}->name);
                 } else {
                     $this->cliEcho($issue->{$field});
                 }
             }
         } else {
             $this->cliEcho('-');
         }
         $this->cliEcho("\n");
     }
     if ($this->getProvidedArgument('include_comments', 'no') == 'yes') {
         $this->cliEcho("\n");
         $this->cliEcho("Comments: \n", 'white', 'bold');
         if (count($issue->comments) > 0) {
             foreach ($issue->comments as $comment) {
                 if ($comment->system_comment && $this->getProvidedArgument('include_system_comments', 'no') != 'yes') {
                     continue;
                 }
                 $this->cliEcho('Comment #' . $comment->comment_number, 'yellow', 'bold');
                 $this->cliEcho("\n");
                 $this->cliEcho('Posted by: ', 'white', 'bold');
                 if ($comment->posted_by) {
                     $this->cliEcho($comment->posted_by->name);
                 } else {
                     $this->cliEcho("Unknown user");
                 }
                 $this->cliEcho("\n");
                 $this->cliEcho('Posted: ', 'white', 'bold');
                 $this->cliEcho(tbg_formatTime($comment->created_at, 21, true, true) . ' (' . $comment->created_at . ')');
                 $this->cliEcho("\n");
                 $this->cliEcho('Comment: ', 'white', 'bold');
                 $this->cliEcho($comment->content);
                 $this->cliEcho("\n");
                 $this->cliEcho('----------', 'white', 'bold');
                 $this->cliEcho("\n\n");
//.........这里部分代码省略.........
开发者ID:LogosLabs,项目名称:thebuggenie-module-api,代码行数:101,代码来源:ShowIssue.php


示例7: image_tag

            ?>
"><?php 
            echo image_tag($issue->getIssueType()->getIcon() . '_tiny.png', array('class' => 'informal'));
            ?>
<div><?php 
            echo __('Issue %issue_no - %title', array('%issue_no' => $issue->getFormattedIssueNo(true), '%title' => mb_strlen($issue->getTitle()) <= 32 ? $issue->getTitle() : str_pad(mb_substr($issue->getTitle(), 0, 32), 35, '...')));
            ?>
</div><span class="informal"><?php 
            if ($issue->isClosed()) {
                ?>
[<?php 
                echo mb_strtoupper(__('Closed'));
                ?>
] <?php 
            }
            echo __('Last updated %updated_at', array('%updated_at' => tbg_formatTime($issue->getLastUpdatedTime(), 6)));
            ?>
</span><span class="informal url"><?php 
            echo make_url('viewissue', array('project_key' => $issue->getProject()->getKey(), 'issue_no' => $issue->getFormattedIssueNo()));
            ?>
</span><div class="informal extra"><?php 
            echo __('Status: %status', array('%status' => '<span>' . $issue->getStatus()->getName() . '</span>'));
            ?>
</div><?php 
            if ($issue->isResolutionVisible()) {
                ?>
<div class="informal extra"><?php 
                echo __('Resolution: %resolution', array('%resolution' => '<span>' . ($issue->getResolution() instanceof \thebuggenie\core\entities\Resolution ? $issue->getResolution()->getName() : '<span class="faded_out">' . __('Not determined') . '</span>') . '</span>'));
                ?>
</div><?php 
            }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:quicksearch.html.php


示例8: getDateString

 public function getDateString()
 {
     framework\Context::loadLibrary('common');
     $i18n = framework\Context::getI18n();
     if ($this->hasStartingDate() && $this->hasScheduledDate()) {
         if ($this->getStartingDate() < NOW && $this->getScheduledDate() < NOW) {
             return $i18n->__('%milestone_name (started %start_date - ended %end_date)', array('%milestone_name' => '', '%start_date' => tbg_formatTime($this->getStartingDate(), 23, true, true), '%end_date' => tbg_formatTime($this->getScheduledDate(), 23, true, true)));
         } elseif ($this->getStartingDate() < NOW && $this->getScheduledDate() > NOW) {
             return $i18n->__('%milestone_name (started %start_date - ends %end_date)', array('%milestone_name' => '', '%start_date' => tbg_formatTime($this->getStartingDate(), 23, true, true), '%end_date' => tbg_formatTime($this->getScheduledDate(), 23, true, true)));
         } elseif ($this->getStartingDate() > NOW) {
             return $i18n->__('%milestone_name (starts %start_date - ended %end_date)', array('%milestone_name' => '', '%start_date' => tbg_formatTime($this->getStartingDate(), 23, true, true), '%end_date' => tbg_formatTime($this->getScheduledDate(), 23, true, true)));
         }
     } elseif ($this->hasStartingDate()) {
         if ($this->getStartingDate() < NOW) {
             return $i18n->__('%milestone_name (started %start_date)', array('%milestone_name' => '', '%start_date' => tbg_formatTime($this->getStartingDate(), 23, true, true)));
         } else {
             return $i18n->__('%milestone_name (starts %start_date)', array('%milestone_name' => '', '%start_date' => tbg_formatTime($this->getStartingDate(), 23, true, true)));
         }
     } elseif ($this->hasScheduledDate()) {
         if ($this->getScheduledDate() < NOW) {
             return $i18n->__('%milestone_name (released: %date)', array('%milestone_name' => '', '%date' => tbg_formatTime($this->getScheduledDate(), 23, true, true)));
         } else {
             return $i18n->__('%milestone_name (will be released: %date)', array('%milestone_name' => '', '%date' => tbg_formatTime($this->getScheduledDate(), 23, true, true)));
         }
     } elseif ($this->hasReachedDate()) {
         return $i18n->__('%milestone_name (reached: %date)', array('%milestone_name' => '', '%date' => tbg_formatTime($this->getReachedDate(), 23, true, true)));
     }
     return $i18n->__('Not scheduled');
 }
开发者ID:JonathanRH,项目名称:thebuggenie,代码行数:29,代码来源:Milestone.php


示例9: tbg_formatTime

 $sheet->setCellValueByColumnAndRow(12, $cc, $severity);
 $sheet->setCellValueByColumnAndRow(13, $cc, $resolution);
 $sheet->setCellValueByColumnAndRow(14, $cc, $milestone);
 $sheet->setCellValueByColumnAndRow(15, $cc, tbg_formatTime($issue->getPosted(), 21));
 $sheet->setCellValueByColumnAndRow(16, $cc, tbg_formatTime($issue->getLastUpdatedTime(), 21));
 $sheet->setCellValueByColumnAndRow(17, $cc, $issue->getPercentCompleted() . '%');
 $sheet->setCellValueByColumnAndRow(18, $cc, !$issue->hasEstimatedTime() ? '-' : \thebuggenie\core\entities\Issue::getFormattedTime($issue->getEstimatedTime(true, true)));
 $sheet->setCellValueByColumnAndRow(19, $cc, !$issue->hasSpentTime() ? '-' : \thebuggenie\core\entities\Issue::getFormattedTime($issue->getSpentTime(true, true)));
 $sheet->setCellValueByColumnAndRow(20, $cc, $issue->getUserpain());
 $sheet->setCellValueByColumnAndRow(21, $cc, $issue->getVotes());
 $start_column = 22;
 foreach ($custom_columns as $column) {
     $value = $issue->getCustomField($column->getKey());
     switch ($column->getType()) {
         case \thebuggenie\core\entities\CustomDatatype::DATE_PICKER:
             $value = strtotime($value) !== false ? tbg_formatTime($value, 20) : '';
             break;
         case \thebuggenie\core\entities\CustomDatatype::DROPDOWN_CHOICE_TEXT:
         case \thebuggenie\core\entities\CustomDatatype::RADIO_CHOICE:
             $value = $value instanceof \thebuggenie\core\entities\CustomDatatypeOption ? $value->getValue() : '';
             break;
         case \thebuggenie\core\entities\CustomDatatype::CLIENT_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::COMPONENTS_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::EDITIONS_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::MILESTONE_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::RELEASES_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::STATUS_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::TEAM_CHOICE:
         case \thebuggenie\core\entities\CustomDatatype::USER_CHOICE:
             $value = $value instanceof \thebuggenie\core\entities\common\Identifiable ? $value->getName() : '';
             break;
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:_results_normal_sheet.inc.php


示例10: runCheckIncomingAccount

 /**
  * Check incoming email accounts for incoming emails
  *
  * @Route(url="/mailing/incoming_account/:account_id/check", name="check_account")
  * @param \thebuggenie\core\framework\Request $request
  * @return type
  * @throws \Exception
  */
 public function runCheckIncomingAccount(framework\Request $request)
 {
     framework\Context::loadLibrary('common');
     if ($account_id = $request['account_id']) {
         try {
             $account = new \thebuggenie\modules\mailing\entities\IncomingEmailAccount($account_id);
             try {
                 if (!function_exists('imap_open')) {
                     throw new \Exception($this->getI18n()->__('The php imap extension is not installed'));
                 }
                 framework\Context::getModule('mailing')->processIncomingEmailAccount($account);
             } catch (\Exception $e) {
                 $this->getResponse()->setHttpStatus(400);
                 return $this->renderJSON(array('error' => $e->getMessage()));
             }
             return $this->renderJSON(array('account_id' => $account->getID(), 'time' => tbg_formatTime($account->getTimeLastFetched(), 6), 'count' => $account->getNumberOfEmailsLastFetched()));
         } catch (\Exception $e) {
             $this->getResponse()->setHttpStatus(400);
             return $this->renderJSON(array('error' => $this->getI18n()->__('This is not a valid mailing account')));
         }
     } else {
         $this->getResponse()->setHttpStatus(400);
         return $this->renderJSON(array('error' => $this->getI18n()->__('This is not a valid mailing account')));
     }
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:33,代码来源:Main.php


示例11: isset

        </td>
        <td style="clear: both;<?php 
    if (!isset($include_issue_title) || $include_issue_title) {
        ?>
 padding-bottom: <?php 
        echo isset($extra_padding) && $extra_padding ? 15 : 10;
        ?>
px;<?php 
    }
    ?>
">
            <?php 
    if ((!isset($include_issue_title) || $include_issue_title) && (isset($include_time) && $include_time == true)) {
        ?>
<span class="time "><?php 
        echo tbg_formatTime($log_action['timestamp'], 19);
        ?>
</span>&nbsp;<?php 
    }
    ?>
            <?php 
    if (!isset($include_issue_title) || $include_issue_title) {
        ?>
                <?php 
        if (isset($include_project) && $include_project == true) {
            ?>
<span class="faded_out smaller"><?php 
            echo image_tag($issue->getProject()->getSmallIconName(), array('class' => 'issuelog-project-logo'), $issue->getProject()->hasSmallIcon());
            ?>
</span><?php 
        }
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:_logitem.inc.php


示例12: date

<?php

if ($item instanceof \thebuggenie\core\entities\LogItem) {
    ?>
    <li>
        <span class="date"><?php 
    echo date('YmdHis', $previous_time) != date('YmdHis', $item->getTime()) ? tbg_formatTime($item->getTime(), 6) : '';
    ?>
</span>&nbsp;
        <?php 
    $previous_value = null;
    $new_value = null;
    try {
        switch ($item->getChangeType()) {
            case \thebuggenie\core\entities\tables\Log::LOG_ISSUE_CREATED:
                echo image_tag('icon_open_new.png');
                echo __('The issue was created');
                break;
            case \thebuggenie\core\entities\tables\Log::LOG_ISSUE_CLOSE:
                echo image_tag('icon_close.png');
                echo __('The issue was closed');
                break;
            case \thebuggenie\core\entities\tables\Log::LOG_ISSUE_REOPEN:
                echo image_tag('icon_open_new.png');
                echo __('The issue was reopened');
                break;
            case \thebuggenie\core\entities\tables\Log::LOG_ISSUE_DEPENDS:
                echo image_tag('icon_new_related_issue.png');
                echo __('The issues dependency changed: %change', array('%change' => '<strong>' . $item->getText() . '</strong>'));
                break;
            case \thebuggenie\core\entities\tables\Log::LOG_ISSUE_UPDATE:
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:_issuelogitem.inc.php


示例13: runTransitionIssues

 public function runTransitionIssues(TBGRequest $request)
 {
     try {
         try {
             $transition = TBGContext::factory()->TBGWorkflowTransition($request['transition_id']);
         } catch (Exception $e) {
             $this->getResponse()->setHttpStatus(400);
             return $this->renderJSON(array('error' => $this->getI18n()->__('This is not a valid transition')));
         }
         $issue_ids = $request['issue_ids'];
         $status = null;
         $closed = false;
         foreach ($issue_ids as $issue_id) {
             $issue = TBGContext::factory()->TBGIssue($issue_id);
             if (!$issue->isWorkflowTransitionsAvailable() || !$transition->validateFromRequest($request)) {
                 $this->getResponse()->setHttpStatus(400);
                 return $this->renderJSON(array('error' => TBGContext::getI18n()->__('The transition could not be applied to issue %issue_number because of %errors', array('%issue_number' => $issue->getFormattedIssueNo(), '%errors' => join(', ', $transition->getValidationErrors())))));
             }
             try {
                 $transition->transitionIssueToOutgoingStepFromRequest($issue, $request);
             } catch (Exception $e) {
                 $this->getResponse()->setHttpStatus(400);
                 TBGLogging::log(TBGLogging::LEVEL_WARNING, 'Transition ' . $transition->getID() . ' failed for issue ' . $issue_id);
                 TBGLogging::log(TBGLogging::LEVEL_WARNING, $e->getMessage());
                 return $this->renderJSON(array('error' => $this->getI18n()->__('The transition failed because of an error in the workflow. Check your workflow configuration.')));
             }
             if ($status === null) {
                 $status = $issue->getStatus();
             }
             $closed = $issue->isClosed();
         }
         TBGContext::loadLibrary('common');
         $options = array('issue_ids' => array_keys($issue_ids), 'last_updated' => tbg_formatTime(time(), 20), 'closed' => $closed);
         $options['status'] = array('color' => $status->getColor(), 'name' => $status->getName(), 'id' => $status->getID());
         if ($request->hasParameter('milestone_id')) {
             $milestone = new TBGMilestone($request['milestone_id']);
             $options['milestone_id'] = $milestone->getID();
             $options['milestone_name'] = $milestone->getName();
         }
         foreach (array('resolution', 'priority', 'category', 'severity') as $item) {
             $class = "TBG" . ucfirst($item);
             if ($request->hasParameter($item . '_id')) {
                 if ($item_id = $request[$item . '_id']) {
                     $itemobject = new $class($item_id);
                     $itemname = $itemobject->getName();
                 } else {
                     $item_id = 0;
                     $itemname = '-';
                 }
                 $options[$item] = array('name' => $itemname, 'id' => $item_id);
             } else {
                 $method = 'get' . ucfirst($item);
                 $itemname = $issue->{$method}() instanceof $class ? $issue->{$method}()->getName() : '-';
                 $item_id = $issue->{$method}() instanceof $class ? $issue->{$method}()->getID() : 0;
                 $options[$item] = array('name' => $itemname, 'id' => $item_id);
             }
         }
         return $this->renderJSON($options);
     } catch (Exception $e) {
         $this->getResponse()->setHttpStatus(400);
         TBGLogging::log(TBGLogging::LEVEL_WARNING, 'Transition ' . $transition->getID() . ' failed for issue ' . $issue_id);
         TBGLogging::log(TBGLogging::LEVEL_WARNING, $e->getMessage());
         return $this->renderJSON(array('error' => $this->getI18n()->__('An error occured when trying to apply the transition')));
     }
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:65,代码来源:actions.class.php


示例14: tbg_formatTime

if ($milestone->getStartingDate()) {
    ?>
            <?php 
    echo tbg_formatTime($milestone->getStartingDate(), 20, true, true) . ' - ';
    if ($milestone->getScheduledDate() > 0) {
        echo tbg_formatTime($milestone->getScheduledDate(), 20, true, true);
    } else {
        echo __('No scheduled date specified');
    }
    ?>
        <?php 
} else {
    ?>
            <?php 
    if ($milestone->getScheduledDate() > 0) {
        echo __('Scheduled for %scheduled_date', array('%scheduled_date' => tbg_formatTime($milestone->getScheduledDate(), 20, true, true)));
    } else {
        echo __('No scheduled date specified');
    }
    ?>
        <?php 
}
?>
    </div>
    <div class="percentage">
        <div class="numbers">
            <?php 
if ($milestone->isSprint()) {
    ?>
                <?php 
    if ($milestone->countClosedIssues() == 1) {
开发者ID:AzerothShard,项目名称:thebuggenie,代码行数:31,代码来源:_milestonedashboardbox.inc.php


示例15: __

        if ($issue->getUserWorkingOnIssue()->getID() == $tbg_user->getID()) {
            ?>
                            <?php 
            echo __('You have been working on this issue since %time', array('%time' => tbg_formatTime($issue->getWorkedOnSince(), 6)));
            ?>
                        <?php 
        } elseif ($issue->getAssignee() instanceof \thebuggenie\core\entities\Team) {
            ?>
                            <?php 
            echo __('%teamname has been working on this issue since %time', array('%teamname' => $issue->getAssignee()->getName(), '%time' => tbg_formatTime($issue->getWorkedOnSince(), 6)));
            ?>
                        <?php 
        } else {
            ?>
                            <?php 
            echo __('%user has been working on this issue since %time', array('%user' => $issue->getUserWorkingOnIssue()->getNameWithUsername(), '%time' => tbg_formatTime($issue->getWorkedOnSince(), 6)));
            ?>
                        <?php 
        }
        ?>
                        <div class="buttons">
                            <button class="button button-silver" onclick="$('viewissue_being_worked_on').hide();"><?php 
        echo __('OK');
        ?>
</button>
                        </div>
                    </div>
                <?php 
    }
    ?>
                <div class="issue_info error" id="blocking_div"<?php 
开发者ID:shoreless-Limited,项目名称:thebuggenie,代码行数:31,代码来源:viewissue.html.php


示例16: __

<br>
                <?php 
    if (!$user->getLastSeen()) {
        ?>
                    <b><?php 
        echo __('This user has not logged in yet');
        ?>
</b>
                <?php 
    } else {
        ?>
                    <b><?php 
        echo __('Last seen online at %time', array('%time' => ''));
        ?>
</b><?php 
        echo tbg_formatTime($user->getLastSeen(), 11);
        ?>
                <?php 
    }
    ?>
            </div>
        </li>
        <?php 
    \thebuggenie\core\framework\Event::createNew('core', 'useractions_top', $user)->trigger();
    ?>
        <?php 
    if (\thebuggenie\core\entities\User::isThisGuest() == false && $user->getID() != $tbg_user->getID()) {
        ?>
            <li style="<?php 
        if ($tbg_user->isFriend($user)) {
            ?>
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:_userdropdown.inc.php


示例17: switch

<?php

switch ($notification->getNotificationType()) {
    case \thebuggenie\modules\vcs_integration\Vcs_integration::NOTIFICATION_COMMIT_MENTIONED:
        ?>
            <h1>
                <time><?php 
        echo tbg_formatTime($notification->getCreatedAt(), 20);
        ?>
</time>
                <?php 
        echo __('%user_name mentioned you in commit %rev', array('%user_name' => get_component_html('main/userdropdown', array('user' => $notification->getTriggeredByUser())), '%rev' => javascript_link_tag($notification->getTarget()->getRevisionString(), array('onclick' => "TBG.Main.Helpers.Backdrop.show('" . make_url('get_partial_for_backdrop', array('key' => 'vcs_integration_getcommit', 'commit_id' => $notification->getTarget()->getID())) . "');"))));
        ?>
            </h1>
            <div class="notification_content"><?php 
        echo $notification->getTarget()->getLog();
        ?>
</div>
            <?php 
        break;
}
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:21,代码来源:_notification_view.inc.php


示例18: function

', {yes: {click: function() {TBG.Main.Profile.removeApplicationPassword('<?php 
    echo make_url('account_remove_application_password', array('id' => $password->getID(), 'csrf_token' => \thebuggenie\core\framework\Context::generateCSRFtoken()));
    ?>
', <?php 
    echo $password->getID();
    ?>
);}}, no: {click: TBG.Main.Helpers.Dialog.dismiss}});"><?php 
    echo __('Delete');
    ?>
</button>
                            <h4><?php 
    echo __('Application password: %password_name', array('%password_name' => $password->getName()));
    ?>
</h4>
                            <p><?php 
    echo __('Last used: %last_used_time, created at: %created_at_time', array('%last_used_time' => $password->getLastUsedAt() ? tbg_formatTime($password->getLastUsedAt(), 20) : __('never used'), '%created_at_time' => tbg_formatTime($password->getCreatedAt(), 20)));
    ?>
</p>
                        </li>
                    <?php 
}
?>
                </ul>
                <?php 
if (\thebuggenie\core\framework\Settings::isOpenIDavailable()) {
    ?>
                    <h3>
                        <?php 
    echo __('Linked OpenID accounts');
    ?>
                        <button class="button button-silver" onclick="TBG.Main.Helpers.Backdrop.show('<?php 
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:31,代码来源:myaccount.html.php


示例19: elseif

                <?php 
        } elseif ($mode == 'article') {
            ?>
                    <?php 
            echo javascript_link_tag(image_tag('action_delete.png'), array('id' => $base_id . '_' . $file_id . '_remove_link', 'onclick' => "TBG.Main.Helpers.Dialog.show('" . __('Do you really want to detach this file?') . "', '" . __('If you detach this file, it will be deleted. This action cannot be undone. Are you sure you want to remove this file?') . "', {yes: {click: function() {TBG.Main.detachFileFromArticle('" . make_url('article_detach_file', array('article_id' => $article->getID(), 'file_id' => $file_id)) . "', " . $file_id . ", " . $article->getID() . "); }}, no: { click: TBG.Main.Helpers.Dialog.dismiss }});"));
            ?>
                <?php 
        }
        ?>
                <?php 
        echo image_tag('spinning_16.gif', array('id' => $base_id . '_' . $file_id . '_remove_indicator', 'style' => 'display: none;'));
        ?>
            </div>
        <?php 
    }
    ?>
        <div class="upload_details">
            <?php 
    echo __('%filename uploaded %date by %username', array('%filename' => '<span class="filename">' . $file->getOriginalFilename() . '</span>', '%date' => tbg_formatTime($file->getUploadedAt(), 23), '%username' => $file->getUploadedBy() instanceof \thebuggenie\core\entities\User ? '<a href="javascript:void(0);" onclick="TBG.Main.Helpers.Backdrop.show(\'' . make_url('get_partial_for_backdrop', array('key' => 'usercard', 'user_id' => $file->getUploadedBy()->getID())) . '\');" class="faded_out">' . $file->getUploadedBy()->getNameWithUsername() . '</a>' : __('unknown user')));
    ?>
        </div>
    </li>
<?php 
} else {
    ?>
    <li class="faded_out"><?php 
    echo __('Invalid file');
    ?>
</li>
<?php 
}
开发者ID:nrensen,项目名称:thebuggenie,代码行数:31,代码来源:_attachedfile.inc.php


示例20: tbg_formatTime

</td>
        <td style="padding-bottom: <?php 
    if (isset($extra_padding) && $extra_padding == true) {
        ?>
10<?php 
    } else {
        ?>
5<?php 
    }
    ?>
px;">
            <?php 
    if (isset($include_time) && $include_time == true) {
        ?>
<span class="time"><?php 
        echo tbg_formatTime($comment->getPosted(), 19);
        ?>
</span>&nbsp;<?php 
    }
    ?>
            <?php 
    if (isset($include_project) && $include_project == true) {
        ?>
<span class="faded_out smaller"><?php 
        echo link_tag(make_url('project_dashboard', array('project_key' => $issue->getProject()->getKey())), '[' . $issue->getProject()->getKey() . ']');
        ?>
</span><?php 
    }
    ?>
            <?php 
    $issue_title = tbg_decodeUTF8($issue->getFormattedTitle(true));
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:31,代码来源:_commentitem.inc.php



注:本文中的tbg_formatTime函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tbg_get_breadcrumblinks函数代码示例发布时间:2022-05-23
下一篇:
PHP tbg_decodeUTF8函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap