Exemplo n.º 1
0
 public function action_index()
 {
     if ($user = Arr::get($_GET, 'user') or $user = Arr::get($_GET, 'user_id')) {
         $user_id = $user;
     }
     $gallery_detail = ORM::factory('photo')->where('moderation_status_id', '=', '2')->where('user_id', '=', $user)->with('category')->with('user')->find_all();
     $json = array();
     foreach ($gallery_detail as $key => $photo) {
         $json[] = array('category' => html::anchor('categories/' . $photo->category->id, $photo->category->name), 'share' => html::anchor('#', 'Share this photo'), 'current' => $key + 1, 'total' => $gallery_detail->count(), 'photo' => html::image(Helper_Photos::get($photo, 'medium')), 'display_name' => html::anchor('profile/' . $photo->user->username, $photo->user->display_name), 'name' => $photo->name, 'caption' => $photo->caption, 'tags' => Helper_Tags::print_tags($photo->tags->find_all()));
     }
     $this->resource = $json;
 }
Exemplo n.º 2
0
    echo html::anchor('photos/flipfavorite/' . $photo->id, $isFav ? "Un-Favorite" : "Favorite");
    ?>
			</div><?php 
}
?>
			<div class="clear"></div>			
			<p><?php 
echo $photo->caption;
?>
</p>
			<?php 
$tags = $photo->tags->find_all();
if ($tags->as_array()) {
    ?>
				<p><strong>Tags:</strong> <?php 
    echo Helper_Tags::print_tags($tags);
    ?>
</p>
			<?php 
}
?>
			<p><strong>Category:</strong> <?php 
echo html::anchor('categories/' . $photo->category->id, $photo->category->name);
?>
</p>
		</div>
	</div><br />

<?php 
if (count($awards) > 0) {
    ?>
Exemplo n.º 3
0
			</div> <!-- END: box -->
			<div class="box">
				<div class="box_top"></div>
				<div class="box_inner">
					<table>
						<tr>
							<td class="step"><?php 
echo HTML::image('public/images/layout/icon-three.png');
?>
</td>
							<td class="text">
								<h2>Tag your photo:</h2>
								<div class="max_length">Enter your words separated by a comma.</div>
								<div class="light_border">
									<?php 
echo form::input('tags', Arr::get($_POST, 'tags', Helper_Tags::print_tags($photo->tags->find_all(), FALSE)), array('id' => 'tags', 'class' => 'field'));
?>
								</div>
							</td>
						</tr>
					</table>
				</div> <!-- END: box_inner -->
				<div class="box_bottom"></div>
			</div> <!-- END: box -->
			<div class="box">
				<div class="box_top"></div>
				<div class="box_inner">
					<table>
						<tr>
							<td class="step"><?php 
echo HTML::image('public/images/layout/icon-four.png');
Exemplo n.º 4
0
			<div class="text">
				<p>
					<strong><?php 
echo $photo->name;
?>
</strong><br />
					<?php 
echo $photo->caption;
?>
<br />
					<?php 
$tags = $photo->tags->find_all();
if ($tags->as_array()) {
    ?>
					<strong>Tags:</strong> <?php 
    echo Helper_Tags::print_tags($photo->tags->find_all());
    ?>
					<?php 
}
?>
					
					
				</p>
			</div>
		</div> <!-- END: title -->
		<div class="title_bottom"></div>
		<div class="submit_container">
			<div class="links"><a href="http://kids.nationalgeographic.com/kids/policies/privacypolicykids/">Privacy Policy</a></div>
			<ul class="buttons">
				<li><?php 
echo html::anchor('profile', 'See Photos!', array('class' => 'see'));