Example #1
0
 /**
  * Create new view.
  */
 public function __construct()
 {
     parent::__construct();
     $this->class = 'calendar';
     $this->title = __('Calendar');
     $this->date = time();
 }
Example #2
0
File: months.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  array   $months
  * @param  string  $route
  * @param  array   $params
  */
 public function __construct(array $months, $route, array $params = null)
 {
     parent::__construct();
     $this->months = $months;
     $this->route = $route;
     $this->params = $params;
 }
Example #3
0
File: oauth.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_User  $user
  * @param  array       $external_user
  */
 public function __construct(Model_User $user, array $external_user)
 {
     parent::__construct();
     $this->user = $user;
     $this->external_user = $external_user;
     $this->title = __('Sign in with') . ' <i class="icon-facebook"></i>';
 }
Example #4
0
 /**
  * Create new view.
  *
  * @param  Model_Image    $image
  * @param  Model_Gallery  $gallery
  */
 public function __construct(Model_Image $image, Model_Gallery $gallery)
 {
     parent::__construct();
     $this->image = $image;
     $this->gallery = $gallery;
     $this->title = HTML::chars($gallery->name);
 }
Example #5
0
 /**
  * Create new view.
  *
  * @param  Model_Venue  $venue
  */
 public function __construct($venue)
 {
     parent::__construct();
     $this->title = __('Foursquare');
     $this->id = 'foursquare';
     $this->venue = $venue;
 }
Example #6
0
File: shouts.php Project: anqh/core
 /**
  * Create new shouts view.
  */
 public function __construct()
 {
     parent::__construct();
     $this->id = 'shouts';
     $this->title = __('Shouts');
     $this->_can_shout = Permission::has(new Model_Shout(), Model_Shout::PERMISSION_CREATE, self::$_user);
 }
Example #7
0
File: shouts.php Project: anqh/anqh
 /**
  * Create new shouts view.
  */
 public function __construct()
 {
     parent::__construct();
     $this->id = 'shouts';
     $this->title = HTML::anchor(Route::url('shouts'), __('Shouts'));
     $this->_can_shout = Permission::has(new Model_Shout(), Model_Shout::PERMISSION_CREATE);
 }
Example #8
0
 /**
  * Create new view.
  *
  * @param  Model_User  $user
  */
 public function __construct($user = null, $limit = 10)
 {
     parent::__construct();
     $this->title = __("Why can't we be friends?");
     $this->user = $user;
     $this->limit = (int) $limit;
 }
Example #9
0
File: topic.php Project: anqh/forum
 /**
  * Create new view.
  *
  * @param  Model_Forum_Topic        $forum_topic
  * @param  View_Generic_Pagination  $pagination
  * @param  boolean                  $private
  */
 public function __construct(Model_Forum_Topic $forum_topic, View_Generic_Pagination $pagination, $private = false)
 {
     parent::__construct();
     $this->forum_topic = $forum_topic;
     $this->pagination = $pagination;
     $this->private = $private;
 }
Example #10
0
File: full.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Image    $image
  * @param  Model_Gallery  $gallery
  */
 public function __construct(Model_Image $image, Model_Gallery $gallery)
 {
     parent::__construct();
     $this->image = $image;
     $this->gallery = $gallery;
     $this->can_note = Permission::has($image, Model_Image::PERMISSION_NOTE);
 }
Example #11
0
 /**
  * Create new view.
  *
  * @param  Model_Venue  $venue
  * @param  array        $venues
  */
 public function __construct(Model_Venue $venue, array $venues = null)
 {
     parent::__construct();
     $this->title = __('Similar venues');
     $this->venue = $venue;
     $this->venues = $venues;
 }
Example #12
0
 /**
  * Create new view.
  *
  * @param  Model_Flyer  $flyer
  */
 public function __construct(Model_Flyer $flyer)
 {
     parent::__construct();
     $this->flyer = $flyer;
     $this->image = $flyer->image();
     $this->event = $flyer->event();
     $this->title = HTML::chars($this->event ? $this->event->name : $flyer->name);
 }
Example #13
0
 /**
  * Create new view.
  */
 public function __construct(array $filters = null, $selected = null)
 {
     parent::__construct();
     $this->id = 'filters';
     $this->class = 'filters';
     $this->filters = $filters;
     $this->selected = $selected;
 }
Example #14
0
 /**
  * Create new view.
  *
  * @param  Model_User  $user
  * @param  array       $errors
  */
 public function __construct(Model_User $user, array $errors = null)
 {
     parent::__construct();
     $this->user = $user;
     $this->errors = $errors;
     $this->external = Model_User_External::factory()->find_by_user_id($this->user->id, 'facebook');
     if ($this->external && $this->external->loaded()) {
         $this->consumer = new OAuth2_Consumer('facebook', $this->external->access_token());
     }
 }
Example #15
0
 /**
  * Create new view.
  *
  * @param  Model_User  $user
  * @param  boolean     $friended
  */
 public function __construct($user = null, $friended = false)
 {
     parent::__construct();
     $this->user = $user;
     $this->friended = $friended;
     foreach ($this->user->find_friends($this->friended) as $friend_id) {
         $friend = Model_User::find_user_light($friend_id);
         $this->friends[$friend['username']] = $friend;
     }
     ksort($this->friends, SORT_LOCALE_STRING);
     $this->title = $friended ? __('Friending me') : __('Friends');
     $this->title .= ' <small class="muted">(' . count($this->friends) . ')</small>';
 }
Example #16
0
File: entry.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Blog_Entry  $blog_entry
  * @param  boolean           $show_title
  */
 public function __construct(Model_Blog_Entry $blog_entry, $show_title = false)
 {
     parent::__construct();
     $this->blog_entry = $blog_entry;
     if ($show_title) {
         $author = $blog_entry->author();
         //			$this->avatar   = HTML::avatar($author['avatar'], $author['username']);
         $this->title = HTML::anchor(Route::model($blog_entry), HTML::chars($blog_entry->name));
         $this->subtitle = __('By :user, :date', array(':user' => HTML::user($author), ':date' => date('l ', $blog_entry->created) . Date::format(Date::DMY_SHORT, $blog_entry->created)));
         if (Permission::has($blog_entry, Model_Blog_Entry::PERMISSION_COMMENTS)) {
             $this->subtitle .= ' | ' . HTML::anchor(Route::model($blog_entry), __('Comments') . ' (' . (int) $blog_entry->comment_count . ')');
         }
     }
 }
Example #17
0
File: top.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  string         $type
  * @param  Model_Image[]  $images
  */
 public function __construct($type, $images = null)
 {
     parent::__construct();
     $this->type = $type;
     $this->images = $images;
     switch ($type) {
         case Model_Image::TOP_COMMENTED:
             $this->title = __('Most Commented');
             break;
         case Model_Image::TOP_RATED:
             $this->title = __('Top Rated');
             break;
         case Model_Image::TOP_VIEWED:
             $this->title = __('Most Viewed');
             break;
     }
 }
Example #18
0
File: online.php Project: anqh/core
 /**
  * Create new shouts view.
  */
 public function __construct()
 {
     parent::__construct();
     $this->_guest_count = Model_User_Online::get_guest_count();
     $users = Model_User_Online::find_online_users();
     $this->title = __('Online');
     // Build user lists
     $friends = (bool) self::$_user ? self::$_user->find_friends() : array();
     foreach ($users as $user_id) {
         $user = Model_User::find_user_light($user_id);
         if (in_array($user_id, $friends)) {
             $this->_friends[mb_strtoupper($user['username'])] = HTML::user($user);
         } else {
             $this->_users[mb_strtoupper($user['username'])] = HTML::user($user);
         }
     }
 }
Example #19
0
File: full.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Flyer  $flyer
  */
 public function __construct(Model_Flyer $flyer)
 {
     parent::__construct();
     $this->flyer = $flyer;
 }
Example #20
0
File: report.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Image  $image
  */
 public function __construct($image = null)
 {
     parent::__construct();
     $this->image = $image;
 }
Example #21
0
 /**
  * Create new view.
  *
  * @param  Model_User  $user
  */
 public function __construct($user = null)
 {
     parent::__construct();
     $this->title = __('Friends');
     $this->user = $user;
 }
Example #22
0
File: index.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Venue[]  $venues
  */
 public function __construct($venues)
 {
     parent::__construct();
     $this->venues = $venues;
 }
Example #23
0
 /**
  * Create new view.
  *
  * @param  Model_Event  $event
  */
 public function __construct(Model_Event $event = null)
 {
     parent::__construct();
     $this->event = $event;
 }
Example #24
0
File: index.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Forum_Topic[]  $topics
  * @param  boolean              $area    single area
  */
 public function __construct($topics = null, $area = false)
 {
     parent::__construct();
     $this->topics = $topics;
     $this->area = $area;
 }
Example #25
0
 /**
  * Create new view.
  *
  * @param  Model_Forum_Group  $group
  */
 public function __construct($group)
 {
     parent::__construct();
     $this->group = $group;
 }
Example #26
0
File: invite.php Project: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Invitation  $invitation
  */
 public function __construct(Model_Invitation $invitation)
 {
     parent::__construct();
     $this->invitation = $invitation;
 }
Example #27
0
 /**
  * Create new view.
  *
  * @param  Model_Venue  $venue
  * @param  Model_Venue  $venue_duplicate
  */
 public function __construct(Model_Venue $venue, Model_Venue $venue_duplicate = null)
 {
     parent::__construct();
     $this->venue = $venue;
     $this->venue_duplicate = $venue_duplicate;
 }
Example #28
0
 /**
  * Create new view.
  *
  * @param  Model_Comment[]  $comments
  */
 public function __construct($comments)
 {
     parent::__construct();
     $this->comments = $comments;
     $this->title = __('Comments');
 }
Example #29
0
File: entry.php Project: anqh/blog
 /**
  * Create new view.
  *
  * @param  Model_Blog_Entry  $blog_entry
  */
 public function __construct(Model_Blog_Entry $blog_entry)
 {
     parent::__construct();
     $this->blog_entry = $blog_entry;
 }
Example #30
0
 /**
  * Create new view.
  */
 public function __construct()
 {
     parent::__construct();
 }