var tag_view = Vue.component('tag_view',{
    template: '<div class="col-sm-12 col-md-7 col-md-push-3">\
                    <div class="panel panel-default">\
                            <div is="pretty_header" v-bind:title="tag"></div>\
                        </div>\
                    </div>\
                    <div is="post_input" v-bind:user_prop="user" v-show="auth" v-bind:prefill="mention_prefill"></div>\
                    <div is="post_list" v-bind:posts.sync="posts" rest_api="/api/tag_posts" v-bind:api_param="api_param"  :enable_refresh="true"></div>\
                </div>\
                <div class="col-sm-12 col-md-3 col-md-pull-7" v-show="auth">\
                    <div is="user_card" v-bind:user.sync="user"></div>\
                </div>',
    data: function() {
        return {
            posts: [],
            user: {},
            tag: this.$route.params.tag,
            auth: false
        }
    },
    events: {
            'post_added': function() {
                this.$broadcast('post_added');
            },
            'respond': function(id, user_name) {
                window.scrollTo(0,0);
                this.$broadcast('respond', id, user_name)
            }
        },
    ready: function() {
        $.ajax({
            method: 'GET',
            url: '/api/check_auth',
            dataType : "json",
            contentType: "application/json; charset=utf-8",
            context: this,
            cache: false,
            success: function(result) {
                this.auth = result.auth;
                this.$broadcast('get_posts'); 
                this.$broadcast('get_user');  
            }
        });
    }, 
    computed: {
        'mention_prefill': function() {
            return this.tag;
        },
        'api_param': function() {
            return {tag: this.tag};
        }
    }

});
                        <div class="panel-body" style="padding: 0px;">\