Exemplo n.º 1
0
 /**
  * Root
  *
  * @access public
  * @return Response
  */
 public function action_index()
 {
     $data = array('dirs' => array());
     try {
         /**
          * get documentation list
          */
         $dirs = array_keys(File::read_dir(DOCROOT . 'dbdocs' . DS, 1));
         foreach ($dirs as $dir) {
             $i = count($data['dirs']);
             $data['dirs'][$i]['name'] = rtrim($dir, DS) . '/';
             $file_info = File::file_info(DOCROOT . 'dbdocs' . DS . $dir);
             $data['dirs'][$i]['time_ago'] = Date::time_ago($file_info['time_created']);
         }
     } catch (Fuel\Core\InvalidPathException $e) {
         //do nothing
     }
     $this->template->content = View::forge('index/index', array('data' => $data));
 }
Exemplo n.º 2
0
						
							<section>
								<ul class="stats-summary">				
								<?php 
foreach ($callBacks as $callBack) {
    $thisReferral = $callBack['referral'];
    ?>
								<li>
									<strong class="stats-count" style="color: #999;" title="<?php 
    echo date("H:i - d/m/Y", strtotime($callBack['callback_on']));
    ?>
">Due <?php 
    if ((int) \Date::time_ago(strtotime($callBack['callback_on'])) < 0) {
        echo "In " . str_replace("ago", "", \Date::time_ago(strtotime($callBack['callback_on']) - (int) \Date::time_ago(strtotime($callBack['callback_on'])) * -1 * 2));
    } else {
        echo \Date::time_ago(strtotime($callBack['callback_on']));
    }
    ?>
</strong>
									<strong class="stats-count">- <?php 
    echo $thisReferral['forename'];
    ?>
 <?php 
    echo $thisReferral['surname'];
    ?>
</strong>
									<a class="button stats-view" href="/crm/ppi/referral/<?php 
    echo $callBack['referral_id'];
    ?>
" title="View Referral">View</a>
								</li>
Exemplo n.º 3
0
 /**
  * Test for Date::time_ago()
  *
  * @test
  */
 public function test_time_ago_two_months()
 {
     $march_30_2011 = 1301461200;
     $may_30_2011 = 1306731600;
     $output = Date::time_ago($march_30_2011, $may_30_2011);
     $this->assertEquals('2 months ago', $output);
 }
Exemplo n.º 4
0
<h2><?php 
echo $post->title;
?>
</h2>

<p>
<strong>Posted: </strong><?php 
echo date('jS F, Y', strtotime($post->created_at));
?>
(<?php 
echo Date::time_ago(strtotime($post->created_at));
?>
)
by <?php 
echo $post->user->username;
?>
</p>

<p><?php 
echo nl2br($post->body);
?>
</p>

<hr />

<h3 id="comments">Comments</h3>

<?php 
foreach ($post->comments as $comment) {
    ?>
Exemplo n.º 5
0
Arquivo: nav.php Projeto: wxl2012/wx
 Avatar" />
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue"><?php 
        echo $value->from->people->nickname;
        ?>
:</span>
												<?php 
        echo \Str::truncate($value->body, 0, 21, '...');
        ?>
											</span>

											<span class="msg-time">
												<i class="ace-icon fa fa-clock-o"></i>
												<span><?php 
        echo \Date::time_ago($value->created_at);
        ?>
</span>
											</span>
										</span>
									</a>
								</li>
								<?php 
    }
    ?>
							</ul>
						</li>
						<?php 
}
?>
Exemplo n.º 6
0
	<article>
		<h2><?php 
echo Uri::current() == Uri::create($article->href()) ? $article->title : Html::anchor($article->href(), $article->title);
?>
</h2>
		<div class="article_content">
			<?php 
echo \Formatting\Textile::format($article->body);
?>
		</div>
		<div class="article_meta">
			<?php 
echo Date::time_ago($article->created_at);
?>
 by <?php 
echo $article->user->username;
?>
		</div>
	</article>
Exemplo n.º 7
0
    ?>
 <?php 
    echo __('commentaires');
    ?>
</h3>

		<?php 
    foreach ($post->comments as $comment) {
        ?>
		<div class="row">
		    <div class="col-md-12">
		        <p><strong><?php 
        echo $comment->username;
        ?>
</strong> <?php 
        echo \Date::time_ago($comment->created_at);
        ?>
</p>
		        <p><?php 
        echo $comment->content;
        ?>
</p>
		    </div>
		</div>
		<?php 
    }
    ?>
	<?php 
}
?>
</section>
Exemplo n.º 8
0
    echo !empty($user['created_at']) ? Date::forge($user['created_at'])->format("%A %d %B %Y") : "";
    ?>
'>
					<?php 
    echo !empty($user['created_at']) ? Date::time_ago($user['created_at']) : "Never";
    ?>
				</abbr>
			</td>

			<td class='last_login'>
				<abbr title='<?php 
    echo !empty($user['last_login']) ? Date::forge($user['last_login'])->format("%A %d %B %Y") : "";
    ?>
'>
					<?php 
    echo !empty($user['last_login']) ? Date::time_ago($user['last_login']) : "Never";
    ?>
				</abbr>
			</td>

			<td class='control'> 
				<?php 
    if (Sentry::user(null, true)->has_access('users_edit') || $user['id'] == $current_user['id']) {
        echo Html::anchor('users/edit/' . $user['id'], 'Edit');
    }
    if (Sentry::user(null, true)->has_access('users_delete') || $user['id'] == $current_user['id']) {
        if (Sentry::user(null, true)->has_access('users_edit') || $user['id'] == $current_user['id']) {
            echo $separator;
        }
        echo Html::anchor('users/delete/' . $user['id'], 'Delete', array('onclick' => "return confirm('Are you sure?')"));
    }