*/
if (module_social::can_i('view', 'Twitter Comments', 'Social', 'social')) {
    $social_twitter_id = isset($_REQUEST['social_twitter_id']) ? (int) $_REQUEST['social_twitter_id'] : 0;
    $twitter = new ucm_twitter_account($social_twitter_id);
    if ($social_twitter_id && $twitter->get('social_twitter_id') == $social_twitter_id) {
        $module->page_title = $twitter->get('account_name');
        $header = array('title' => $twitter->get('account_name'), 'type' => 'h2', 'main' => true, 'button' => array());
        if (module_social::can_i('create', 'Twitter Comments', 'Social', 'social')) {
            $header['button'] = array('url' => module_social_twitter::link_open_twitter_message($social_twitter_id, false), 'title' => _l('Compose Tweet'), 'type' => 'add', 'class' => 'socialtwitter_message_open social_modal', 'id' => 'socialtwitter_message_compose');
        }
        print_heading($header);
        $search = isset($_REQUEST['search']) && is_array($_REQUEST['search']) ? $_REQUEST['search'] : array();
        if (!isset($search['status'])) {
            $search['status'] = _SOCIAL_MESSAGE_STATUS_UNANSWERED;
        }
        $all_messages = $twitter->get_messages($search);
        ?>
	    <script type="text/javascript">
		    $(function(){
			    $('#socialtwitter_message_compose').attr('data-modal-title','<?php 
        _e('Compose Tweet');
        ?>
');
		    });
	    </script>

		<form action="" method="post">

		    <?php 
        $search_bar = array('elements' => array('name' => array('title' => _l('Message Content:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 15)), 'status' => array('title' => _l('Status:'), 'field' => array('type' => 'select', 'name' => 'search[status]', 'blank' => false, 'value' => isset($search['status']) ? $search['status'] : '', 'options' => array(_SOCIAL_MESSAGE_STATUS_UNANSWERED => 'Un-Archived', _SOCIAL_MESSAGE_STATUS_ANSWERED => 'Archived')))));
        echo module_form::search_bar($search_bar);