当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML::avatar方法代码示例

本文整理汇总了PHP中HTML::avatar方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::avatar方法的具体用法?PHP HTML::avatar怎么用?PHP HTML::avatar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML的用法示例。


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

示例1: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        // Title
        if ($this->area->description) {
            echo $this->area->description . '<hr>';
        }
        if ($this->area->topic_count) {
            // Area has topics
            $last_topic = $this->area->last_topic();
            $last_poster = $last_topic->last_post()->author();
            ?>

		<div class="media">
			<div class="pull-left">
				<?php 
            echo HTML::avatar($last_poster ? $last_poster['avatar'] : null, $last_poster ? $last_poster['username'] : null, false);
            ?>
			</div>
			<div class="media-body">
				<small class="ago"><?php 
            echo HTML::time(Date::short_span($last_topic->last_posted, true, true), $last_topic->last_posted);
            ?>
</small>
				<?php 
            echo $last_poster ? HTML::user($last_poster) : HTML::chars($last_topic->last_poster);
            ?>
				<br>
				<?php 
            echo HTML::anchor(Route::model($last_topic, '?page=last#last'), Forum::topic($last_topic), array('title' => HTML::chars($last_topic->name)));
            ?>
<br />
			</div>
		</div>

		<small class="stats muted">
			<i class="icon-comments"></i> <?php 
            echo Num::format($this->area->topic_count, 0);
            ?>
			<i class="icon-comment"></i> <?php 
            echo Num::format($this->area->post_count, 0);
            ?>
		</small>

<?php 
        } else {
            // Empty area
            echo __('No topics yet.');
        }
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:56,代码来源:hovercard.php

示例2: render

    /**
     * Render view.
     *
     * @return  string
     */
    public function render()
    {
        ob_start();
        ?>

<li class="media">
	<div class="pull-left">
		<?php 
        echo HTML::avatar($this->user['avatar'], $this->user['username']);
        ?>
	</div>
	<div class="media-body">

		<?php 
        if (Visitor::$user && !Visitor::$user->is_friend($this->user)) {
            ?>
		<?php 
            echo HTML::anchor(URL::user($this->user, 'friend') . '?token=' . Security::csrf(), '<i class="fa fa-heart"></i> ' . __('Add to friends'), array('class' => 'ajaxify btn btn-lovely btn-sm pull-right', 'data-ajaxify-target' => 'li.media'));
            ?>
		<?php 
        }
        ?>

		<?php 
        echo HTML::user($this->user);
        ?>
<br />
		<?php 
        if ($this->common) {
            ?>
		<small><?php 
            echo __(':friends mutual friends', array(':friends' => $this->common));
            ?>
</small><br />
		<?php 
        }
        ?>

	</div>
</li>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:49,代码来源:friend.php

示例3: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $ignores = array();
        foreach ($this->user->find_ignores() as $ignore_id) {
            $ignore = Model_User::find_user_light($ignore_id);
            $ignores[$ignores['username']] = $ignore;
        }
        ksort($ignores, SORT_LOCALE_STRING);
        ?>

<ul class="media-list">
	<?php 
        foreach ($ignores as $ignore) {
            ?>

	<li class="media">
		<div class="pull-left">
			<?php 
            echo HTML::avatar($ignore['avatar'], $ignore['username']);
            ?>
		</div>
		<div class="media-body">
			<?php 
            echo HTML::user($ignore);
            ?>
<br />
			<?php 
            echo HTML::anchor(URL::user($ignore, 'unignore') . '?token=' . Security::csrf(), '<i class="fa fa-ban"></i> ' . __('Unignore'), array('class' => 'btn btn-default btn-sm ignore-delete'));
            ?>
		</div>
	</li>
	<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:46,代码来源:ignores.php

示例4: content

    /**
     * Render newsfeed.
     *
     * @return  string
     */
    public function content()
    {
        if ($items = $this->_items()) {
            ob_start();
            ?>

<ul class="media-list">

	<?php 
            foreach ($items as $item) {
                ?>
	<li class="media">
		<div class="pull-left">
			<?php 
                echo HTML::avatar($item['user']['avatar'], $item['user']['username'], $this->mini);
                ?>
		</div>
		<div class="media-body">
			<?php 
                echo HTML::user($item['user']);
                ?>
 <small class="pull-right"><?php 
                echo HTML::time(Date::short_span($item['stamp'], true, true), $item['stamp']);
                ?>
</small>
			<?php 
                echo $item['text'];
                ?>
		</div>
	</li>
	<?php 
            }
            ?>

</ul>

<?php 
            return ob_get_clean();
        }
        return __('Whoa, we are totally out of news items for you!');
    }
开发者ID:anqh,项目名称:anqh,代码行数:46,代码来源:newsfeed.php

示例5: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $friends = array();
        foreach ($this->user->find_friends() as $friend_id) {
            $friend = Model_User::find_user_light($friend_id);
            $friends[$friend['username']] = $friend;
        }
        ksort($friends, SORT_LOCALE_STRING);
        ?>

<ul class="unstyled">
	<?php 
        foreach ($friends as $friend) {
            ?>

	<li class="row-fluid">
		<?php 
            echo HTML::avatar($friend['avatar'], $friend['username']);
            ?>
		<?php 
            echo HTML::user($friend);
            ?>
		<?php 
            if ($friend['last_login']) {
                echo '<small class="ago">' . HTML::time(Date::short_span($friend['last_login'], true, true), $friend['last_login']) . '</small>';
            }
            ?>
	</li>
	<?php 
        }
        ?>

</ul>


<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:core,代码行数:44,代码来源:friends.php

示例6: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $ignores = array();
        foreach ($this->user->find_ignores() as $ignore_id) {
            $ignore = Model_User::find_user_light($ignore_id);
            $ignores[$ignores['username']] = $ignore;
        }
        ksort($ignores, SORT_LOCALE_STRING);
        ?>

<ul class="unstyled">
	<?php 
        foreach ($ignores as $ignore) {
            ?>

	<li class="row-fluid">
		<?php 
            echo HTML::avatar($ignore['avatar'], $ignore['username']);
            ?>
		<?php 
            echo HTML::user($ignore);
            ?>
<br />
		<?php 
            echo HTML::anchor(URL::user($ignore, 'unignore') . '?token=' . Security::csrf(), '<i class="icon-ban-circle icon-white"></i> ' . __('Unignore'), array('class' => 'btn btn-inverse btn-small ignore-delete'));
            ?>
	</li>
	<?php 
        }
        ?>

</ul>


<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:core,代码行数:43,代码来源:ignores.php

示例7: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        if ($this->blog_entries && count($this->blog_entries)) {
            // List blog entries
            foreach ($this->blog_entries as $blog_entry) {
                /** @var  Model_Blog_Entry  $blog_entry */
                $author = $blog_entry->author();
                ?>

<article class="row blog-entry">
	<div class="span1"><?php 
                echo HTML::avatar($author['avatar'], $author['username']);
                ?>
</div>

	<div class="span7">
		<header>
			<h4><?php 
                echo HTML::anchor(Route::model($blog_entry), HTML::chars($blog_entry->name));
                ?>
</h4>
			<p><?php 
                echo __('By :user :ago', array(':user' => HTML::user($author), ':ago' => HTML::time(Date::fuzzy_span($blog_entry->created), $blog_entry->created)));
                ?>
</p>
		</header>
	</div>
</article>

<?php 
            }
        } else {
            // No blog entries available
            echo new View_Alert(__('Alas, the quill seems to be dry, no blog entries found.'), View_Alert::INFO);
        }
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:blog,代码行数:43,代码来源:index.php

示例8: content

    /**
     * Render content.
     *
     * @return  string
     */
    public function content()
    {
        $dates = array();
        foreach (Model_User::find_new_users($this->limit) as $user_id => $stamp) {
            $user = Model_User::find_user_light($user_id);
            $dates[Date::format(Date::DMY_SHORT, $stamp)][] = array('user' => $user, 'stamp' => $stamp);
        }
        ob_start();
        foreach ($dates as $date => $users) {
            ?>

<h4><?php 
            echo $date;
            ?>
</h4>
<ul class="block-grid three-up">
	<?php 
            foreach ($users as $user) {
                ?>
	<li>
		<?php 
                echo HTML::avatar($user['user']['avatar'], $user['user']['username']), ' ', HTML::user($user['user']);
                ?>
<br />
		<time class="muted"><?php 
                echo Date::format(Date::TIME, $user['stamp']);
                ?>
</time>
	</li>
	<?php 
            }
            ?>
</ul>

<?php 
        }
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:core,代码行数:43,代码来源:new.php

示例9: content

    /**
     * Render newsfeed.
     *
     * @return  string
     */
    public function content()
    {
        if ($items = $this->_items()) {
            ob_start();
            ?>

<ul class="unstyled">

	<?php 
            foreach ($items as $item) {
                ?>
	<li class="row-fluid">
		<?php 
                echo HTML::avatar($item['user']['avatar'], $item['user']['username'], $this->mini);
                ?>
		<?php 
                echo HTML::user($item['user']);
                ?>
 <small class="ago"><?php 
                echo HTML::time(Date::short_span($item['stamp'], true, true), $item['stamp']);
                ?>
</small>
		<?php 
                echo $item['text'];
                ?>
	</li>
	<?php 
            }
            ?>

</ul>

<?php 
            return ob_get_clean();
        }
        return __('Whoa, we are totally out of news items for you!');
    }
开发者ID:anqh,项目名称:core,代码行数:42,代码来源:newsfeed.php

示例10: _set_page

 /**
  * Build user page with generic parameters.
  *
  * @param   Model_User  $user
  * @return  View_Page
  */
 public static function _set_page(Model_User $user)
 {
     // Build page
     $view = new View_Page($user->display_name);
     if ($user->name) {
         //			$this->view->title_html = HTML::chars($user->username) . ' <small>' . HTML::chars($user->name) . '</small>';
     }
     if ($user->title) {
         $view->subtitle = HTML::chars($user->title);
     }
     $view->title_icon = HTML::avatar($user->avatar_url, $user->username);
     // Set actions
     if (Visitor::$user) {
         // Friend actions
         if (Permission::has($user, Model_User::PERMISSION_FRIEND)) {
             if (Visitor::$user->is_friend($user)) {
                 $view->actions[] = array('link' => URL::user($user, 'unfriend') . '?token=' . Security::csrf(), 'text' => '<i class="fa fa-heart-o"></i> ' . __('Remove friend'), 'class' => 'btn-default friend-delete');
             } else {
                 $view->actions[] = array('link' => URL::user($user, 'friend') . '?token=' . Security::csrf(), 'text' => '<i class="fa fa-heart"></i> ' . __('Add to friends'), 'class' => 'btn-lovely friend-add');
             }
         }
         // Ignore actions
         if (Permission::has($user, Model_User::PERMISSION_IGNORE)) {
             if (Visitor::$user->is_ignored($user)) {
                 $view->actions[] = array('link' => URL::user($user, 'unignore') . '?token=' . Security::csrf(), 'text' => '<i class="fa fa-ban"></i> ' . __('Unignore'), 'class' => 'btn-default ignore-delete');
             } else {
                 $view->actions[] = array('link' => URL::user($user, 'ignore') . '?token=' . Security::csrf(), 'text' => '<i class="fa fa-ban"></i> ' . __('Ignore'));
             }
         }
         $view->tabs['profile'] = array('link' => URL::user($user), 'text' => __('Profile'));
         $view->tabs['favorites'] = array('link' => URL::user($user, 'favorites'), 'text' => __('Favorites'));
         // Photographer profile
         $view->tabs['galleries'] = array('link' => Route::url('profile_galleries', array('username' => urlencode($user->username))), 'text' => __('Galleries'));
         // Artist profile
         $view->tabs['music'] = array('link' => Route::url('profile_music', array('username' => urlencode($user->username))), 'text' => __('Music'));
         // Blog
         $view->tabs['blog'] = array('link' => Route::url('blog_user', array('username' => urlencode($user->username))), 'text' => __('Blog'));
         // Friends
         $view->tabs['friends'] = array('link' => URL::user($user, 'friends'), 'text' => __('Friends'));
         // Owner / admin actions
         if (Permission::has($user, Model_User::PERMISSION_UPDATE)) {
             $view->tabs['ignores'] = array('link' => URL::user($user, 'ignores'), 'text' => __('Ignores'));
             $view->actions[] = array('link' => URL::user($user, 'image'), 'text' => '<i class="fa fa-picture-o"></i> ' . __('Add image'));
             $view->actions[] = array('link' => URL::user($user, 'settings'), 'text' => '<i class="fa fa-cog"></i> ' . __('Settings'));
         }
     }
     return $view;
 }
开发者ID:anqh,项目名称:anqh,代码行数:54,代码来源:user.php

示例11: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        ?>

<div class="pull-left">

	<?php 
        if ($this->author) {
            ?>
		<?php 
            echo HTML::avatar($this->author->avatar, $this->author->username);
            ?>

		<p>
			<small><?php 
            echo __('Posts: :posts', array(':posts' => '<var>' . Num::format($this->author->post_count, 0) . '</var>'));
            ?>
</small>
		</p>
	<?php 
        } else {
            ?>
		<?php 
            echo HTML::avatar(false);
            ?>

	<?php 
        }
        ?>

</div>

<div class="arrow"></div>

<div class="media-body">
	<header<?php 
        echo $this->forum_post->id == $this->forum_topic->last_post_id ? ' id="last"' : '';
        ?>
>
		<small class="ago">
			<?php 
        echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic))) . '#post-' . $this->forum_post->id, '#' . $this->nth, array('title' => __('Permalink')));
        ?>

			&bull;

			<?php 
        if (Permission::has($this->forum_post, Model_Forum_Post::PERMISSION_UPDATE, self::$_user)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'edit')), __('Edit'), array('class' => 'post-edit')) . ' &bull; ';
        }
        ?>

			<?php 
        if (Permission::has($this->forum_post, Model_Forum_Post::PERMISSION_DELETE, self::$_user)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'delete')) . '?token=' . Security::csrf(), __('Delete'), array('class' => 'post-delete')) . ' &bull; ';
        }
        ?>

			<?php 
        if (Permission::has($this->forum_topic, Model_Forum_Topic::PERMISSION_POST, self::$_user)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'quote')), __('Reply'), array('class' => 'post-quote')) . ' &bull; ';
        }
        ?>

			<?php 
        echo HTML::time(Date::short_span($this->forum_post->created, true, true), $this->forum_post->created);
        ?>
		</small>

		<?php 
        if ($this->author) {
            echo HTML::user($this->author->light_array());
            if ($this->author->title) {
                echo ' <small>&ldquo;' . HTML::chars($this->author->title) . '&rdquo;</small>';
            }
        } else {
            echo $this->forum_post->author_name;
            echo ' <small>&ldquo;' . __('Guest') . '&rdquo;</small>';
        }
        ?>
	</header>

	<?php 
        if ($this->forum_post->parent_id) {
            echo __('Replying to :parent', array(':parent' => HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => Route::model_id($this->forum_topic), 'id' => $this->forum_post->parent_id)) . '#post-' . $this->forum_post->parent_id, HTML::chars($this->forum_post->parent()->topic()->name))));
        }
        ?>

	<?php 
        echo BB::factory($this->forum_post->post)->render();
        ?>

	<footer>
		<?php 
//.........这里部分代码省略.........
开发者ID:anqh,项目名称:forum,代码行数:101,代码来源:post.php

示例12: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        // Create form attributes
        $attributes = array('class' => 'form-horizontal small-labels');
        if ($this->form_id) {
            $attributes['id'] = $this->form_id;
        }
        $button = __('Save');
        if (!$this->form_action) {
            switch ($this->mode) {
                case self::QUOTE:
                    $this->form_action = Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => $this->forum_topic->id, 'id' => $this->forum_post->parent_id, 'action' => 'quote'));
                    $button = __('Reply');
                    break;
                case self::REPLY:
                    $this->form_action = Route::model($this->forum_topic, 'reply');
                    $button = __('Reply');
                    break;
                case self::EDIT_POST:
                    $this->form_action = Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => $this->forum_topic->id, 'id' => $this->forum_post->id, 'action' => 'edit'));
                    break;
            }
        }
        echo Form::open($this->form_action ? $this->form_action : null, $attributes);
        // Progressively add content, note that we don't break
        switch ($this->mode) {
            // Adding new topic
            case self::NEW_TOPIC:
                // Editing an old topic
            // Editing an old topic
            case self::EDIT_TOPIC:
                $is_admin = self::$_user->has_role(array('admin', 'moderator', 'forum moderator'));
                if ($is_admin) {
                    ?>

<fieldset class="row">
	<div class="span3">
		<?php 
                    echo Form::control_group(Form::select('status', array(Model_Forum_Topic::STATUS_NORMAL => __('Normal'), Model_Forum_Topic::STATUS_SINK => __('Sink'), Model_Forum_Topic::STATUS_LOCKED => __('Locked')), $this->forum_topic->status, array('class' => 'input-small')), array('status' => __('Status')), Arr::get($this->errors, 'status'));
                    ?>
	</div>

	<div class="span3">
		<?php 
                    echo Form::control_group(Form::select('sticky', array(Model_Forum_Topic::STICKY_NORMAL => __('Normal'), Model_Forum_Topic::STICKY_STICKY => __('Sticky')), $this->forum_topic->sticky, array('class' => 'input-small')), array('sticky' => __('Stickyness')), Arr::get($this->errors, 'sticky'));
                    ?>
	</div>
</fieldset>

		<?php 
                }
                ?>

	<?php 
                echo Form::control_group(Form::input('name', $this->forum_topic->name, array('class' => 'input-block-level')), array('name' => __('Topic')), Arr::get($this->errors, 'name'));
                ?>

	<?php 
                if ($this->private) {
                    echo Form::control_group(Form::textarea('recipients', $this->recipients, array('rows' => 3, 'placeholder' => __('Required'), 'class' => 'input-block-level'), true), array('recipients' => __('Recipients')), Arr::get($this->errors, 'recipients'));
                }
                ?>

<?php 
                if ($this->mode === self::EDIT_TOPIC && !$is_admin) {
                    break;
                }
                // Replying to a topic
            // Replying to a topic
            case self::REPLY:
            case self::QUOTE:
                ?>

<div class="pull-left">
	<?php 
                echo HTML::avatar(self::$_user->avatar, self::$_user->username);
                ?>
</div>

<div class="arrow"></div>

<?php 
                // Editing old post
            // Editing old post
            case self::EDIT_POST:
                ?>

<div class="post-edit media-body form-vertical">
	<header>
		<?php 
                echo HTML::user(self::$_user);
                ?>
	</header>

//.........这里部分代码省略.........
开发者ID:anqh,项目名称:forum,代码行数:101,代码来源:postedit.php

示例13: defined

<?php

defined('SYSPATH') or die('No direct access allowed.');
/**
 * Visitor card
 *
 * @package    Anqh
 * @author     Antti Qvickström
 * @copyright  (c) 2010 Antti Qvickström
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
if ($user) {
    // Member
    echo __(':user <var class="uid">[#:id]</var>', array(':id' => $user->id, ':user' => HTML::user($user))), '<br />';
    echo HTML::avatar($user->avatar, $user->username);
    ?>
<ul>
	<li><?php 
    echo HTML::anchor(URL::user($user, 'settings'), __('Settings'));
    ?>
</li>
	<li><?php 
    echo HTML::anchor(Route::get('sign')->uri(array('action' => 'out')), __('Sign out'));
    ?>
</li>
</ul>
<?php 
    $new_comments = $user->find_new_comments();
    if (!empty($new_comments)) {
        ?>
<ul class="new-messages">
开发者ID:netbiel,项目名称:core,代码行数:31,代码来源:visitor.php

示例14: foreach

 * Friendlist
 *
 * @package    Anqh
 * @author     Antti Qvickström
 * @copyright  (c) 2011 Antti Qvickström
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
?>
<ul>
	<?php 
foreach ($friends as $friend) {
    ?>

	<li class="group">
		<?php 
    echo HTML::avatar($friend['avatar'], $friend['username']);
    ?>
		<?php 
    echo HTML::user($friend);
    ?>
		<?php 
    if (isset($friend['last_login'])) {
        echo '<small class="ago">', HTML::time(Date::short_span($friend['last_login'], true, true), $friend['last_login']), '</small>';
    }
    ?>
	</li>
	<?php 
}
?>

</ul>
开发者ID:anqh,项目名称:core,代码行数:31,代码来源:friends.php

示例15: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $facebook = $this->consumer ? $this->load_facebook() : false;
        $tabs = array('basic' => '<i class="hidden-sm fa fa-fw fa-user"></i> ' . __('Profile'), 'auth' => '<i class="hidden-sm fa fa-fw fa-key"></i> ' . __('Username & Email'), 'facebook' => '<i class="hidden-sm fa fa-fw fa-facebook"></i> ' . 'Facebook', 'forum' => '<i class="hidden-sm fa fa-fw fa-comments"></i> ' . __('Forum'));
        echo Form::open();
        ?>

<?php 
        if ($this->errors) {
            ?>
<div class="alert alert-danger">
	<strong><?php 
            echo __('Error happens!');
            ?>
</strong>
	<ul>
		<?php 
            foreach ((array) $this->errors as $error) {
                ?>
		<li><?php 
                echo $error;
                ?>
</li>
		<?php 
            }
            ?>
	</ul>
</div>
<?php 
        }
        ?>

<ul class="nav nav-pills nav-stacked col-sm-2">
	<?php 
        foreach ($tabs as $tab => $title) {
            ?>
	<li<?php 
            echo $tab == $this->tab ? ' class="active"' : '';
            ?>
>
		<a href="#settings-<?php 
            echo $tab;
            ?>
" data-toggle="tab"><?php 
            echo $title;
            ?>
</a>
	</li>
	<?php 
        }
        ?>
</ul>

<div class="tab-content col-md-10">

	<div id="settings-basic" class="tab-pane<?php 
        echo $this->tab == 'basic' ? ' active' : '';
        ?>
">
		<fieldset id="fields-basic" class="col-sm-6">

			<div class="row">
			<div class="col-sm-10">
				<?php 
        echo Form::input_wrap('avatar', $this->user->avatar_url, null, __('Avatar'), Arr::get($this->errors, 'avatar'));
        ?>
			</div>
			<div class="col-sm-2">
				<?php 
        echo HTML::avatar($this->user->avatar_url, null, null, false);
        ?>
			</div>
			</div>


			<?php 
        echo Form::input_wrap('name', $this->user->name, null, __('Name'), Arr::get($this->errors, 'name'));
        ?>

			<?php 
        echo Form::radios_wrap('name_visibility', array(Model_User::NAME_VISIBLE => __('Visible'), Model_User::NAME_HIDDEN => __('Hidden')), $this->user->setting('user.name'), null, null, null, null, true);
        ?>

			<?php 
        echo Form::input_wrap('homepage', $this->user->homepage, null, __('Homepage'), Arr::get($this->errors, 'homepage'));
        ?>

			<?php 
        echo Form::radios_wrap('gender', array('f' => '<i class="fa fa-female female"></i> ' . __('Female'), 'm' => '<i class="fa fa-male male"></i> ' . __('Male'), 'o' => __('Other')), $this->user->gender, null, __('Gender'), Arr::get($this->errors, 'gender'), null, true);
        ?>

			<?php 
        echo Form::input_wrap('dob', $this->user->dob ? Date::format('DMYYYY', $this->user->dob) : null, array('class' => 'date', 'maxlength' => 10, 'size' => 7, 'placeholder' => 'd.m.yyyy'), __('Date of Birth'), Arr::get($this->errors, 'dob'));
        ?>
//.........这里部分代码省略.........
开发者ID:anqh,项目名称:anqh,代码行数:101,代码来源:settings.php


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