示例#1
0
文件: calendar.php 项目: anqh/anqh
 /**
  * Create new view.
  */
 public function __construct()
 {
     parent::__construct();
     $this->class = 'calendar';
     $this->title = __('Calendar');
     $this->date = time();
 }
示例#2
0
文件: months.php 项目: 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;
 }
示例#3
0
文件: oauth.php 项目: 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>';
 }
示例#4
0
文件: hovercard.php 项目: 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->title = HTML::chars($gallery->name);
 }
示例#5
0
文件: foursquare.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Venue  $venue
  */
 public function __construct($venue)
 {
     parent::__construct();
     $this->title = __('Foursquare');
     $this->id = 'foursquare';
     $this->venue = $venue;
 }
示例#6
0
文件: shouts.php 项目: 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);
 }
示例#7
0
文件: shouts.php 项目: 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);
 }
示例#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;
 }
示例#9
0
文件: topic.php 项目: 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;
 }
示例#10
0
文件: full.php 项目: 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);
 }
示例#11
0
文件: similar.php 项目: anqh/venues
 /**
  * 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;
 }
示例#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);
 }
示例#13
0
文件: filters.php 项目: anqh/core
 /**
  * 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;
 }
示例#14
0
文件: settings.php 项目: anqh/anqh
 /**
  * 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());
     }
 }
示例#15
0
文件: friends.php 项目: anqh/anqh
 /**
  * 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>';
 }
示例#16
0
文件: entry.php 项目: 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 . ')');
         }
     }
 }
示例#17
0
文件: top.php 项目: 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;
     }
 }
示例#18
0
文件: online.php 项目: 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);
         }
     }
 }
示例#19
0
文件: full.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Flyer  $flyer
  */
 public function __construct(Model_Flyer $flyer)
 {
     parent::__construct();
     $this->flyer = $flyer;
 }
示例#20
0
文件: report.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Image  $image
  */
 public function __construct($image = null)
 {
     parent::__construct();
     $this->image = $image;
 }
示例#21
0
文件: friends.php 项目: anqh/core
 /**
  * Create new view.
  *
  * @param  Model_User  $user
  */
 public function __construct($user = null)
 {
     parent::__construct();
     $this->title = __('Friends');
     $this->user = $user;
 }
示例#22
0
文件: index.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Venue[]  $venues
  */
 public function __construct($venues)
 {
     parent::__construct();
     $this->venues = $venues;
 }
示例#23
0
文件: carousel.php 项目: anqh/events
 /**
  * Create new view.
  *
  * @param  Model_Event  $event
  */
 public function __construct(Model_Event $event = null)
 {
     parent::__construct();
     $this->event = $event;
 }
示例#24
0
文件: index.php 项目: 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;
 }
示例#25
0
文件: groupedit.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Forum_Group  $group
  */
 public function __construct($group)
 {
     parent::__construct();
     $this->group = $group;
 }
示例#26
0
文件: invite.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Invitation  $invitation
  */
 public function __construct(Model_Invitation $invitation)
 {
     parent::__construct();
     $this->invitation = $invitation;
 }
示例#27
0
文件: combine.php 项目: anqh/anqh
 /**
  * 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;
 }
示例#28
0
文件: comments.php 项目: anqh/anqh
 /**
  * Create new view.
  *
  * @param  Model_Comment[]  $comments
  */
 public function __construct($comments)
 {
     parent::__construct();
     $this->comments = $comments;
     $this->title = __('Comments');
 }
示例#29
0
文件: entry.php 项目: 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;
 }
示例#30
0
 /**
  * Create new view.
  */
 public function __construct()
 {
     parent::__construct();
 }