{{ header }}{{column_left}}
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <button type="submit" form="form-blogger" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary">
                    <i class="fa fa-save"></i>
                </button>
                <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default">
                    <i class="fa fa-reply"></i>
                </a>
            </div>
            <h1>{{ heading_title }}</h1>
            <ul class="breadcrumb">
                {% for breadcrumb in breadcrumbs %}
                    <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
                {% endfor %}
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        {% if error_warning %}
            <div class="alert alert-danger">
                <i class="fa fa-exclamation-circle"></i> 
                {{ error_warning }}
                <button type="button" class="close" data-dismiss="alert">&times;</button>
            </div>
        {% endif %}
    
        {% if success %}
            <div class="alert alert-success"><i class="fa fa-check-circle"></i>
                {{ success }}
                <button type="button" class="close" data-dismiss="alert">&times;</button>
            </div>
        {% endif %}

        <div class="alert alert-info">
            <i class="fa fa-info-circle"></i> 
            {{ text_view_list }}
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>   
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
            </div>
            <div class="panel-body">
                <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-blogger" class="form-horizontal">
                    <input type="hidden" name="module_id" value="{{ module_id }}" />
                        <div class="form-group">
                            <label class="col-sm-3 control-label" for="input-name">{{ entry_name }}</label>
                            <div class="col-sm-8">
                                <input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
                                {% if error_name %}
                                    <div class="text-danger">{{ error_name }}</div>
                                {% endif %}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label" for="input-status">{{ entry_status }}</label>
                            <div class="col-sm-8">
                                <select name="status" id="input-status" class="form-control">
                                    {% if status %}
                                        <option value="1" selected="selected">{{ text_enabled }}</option>
                                        <option value="0">{{ text_disabled }}</option>
                                    {% else %}
                                        <option value="1">{{ text_enabled }}</option>
                                        <option value="0" selected="selected">{{ text_disabled }}</option>
                                    {% endif %}
                                </select>
                            </div>
                        </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label" for="input-width">
                            <span data-toggle="tooltip" title="{{ help_image }}">
                                {{ entry_image_size }}
                            </span>
                        </label>
                        <div class="col-sm-4">
                            <input type="text" name="width" value="{{ width }}" placeholder="{{ entry_width }}" id="input-width" class="form-control" />
                                {% if error_width %}
                                    <div class="text-danger">{{ error_width }}</div>
                                {% endif %}
                        </div>
                        <div class="col-sm-4">
                            <input type="text" name="height" value="{{ height }}" placeholder="{{ entry_height }}" id="input-height" class="form-control" />
                            {% if error_height %}
                                <div class="text-danger">{{ error_height }}</div>
                            {% endif %}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label" for="input-limit">
                            <span data-toggle="tooltip" title="{{ help_limit }}">{{ entry_limit }}</span>
                        </label>
                        <div class="col-sm-8">
                            <input type="text" name="limit" value="{{ limit }}" placeholder="{{ entry_limit }}" id="input-limit" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label" for="input-char-limit">
                            <span data-toggle="tooltip" title="{{ help_char_limit }}">
                                {{ entry_char_limit }}
                            </span>
                        </label>
                        <div class="col-sm-8">
                            <input type="text" name="char_limit" value="{{ char_limit }}" placeholder="{{ entry_char_limit }}" id="input-char-limit" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <span data-toggle="tooltip" title="{{ help_allow_comments }}">
                                {{ entry_allow_comments }}
                            </span>
                        </label>
                        <div class="col-sm-8">
                            <label class="radio-inline">
                                {% if comments %}
                                    <input type="radio" name="comments" value="1" checked="checked" />
                                        {{ text_yes }}
                                {% else %}
                                    <input type="radio" name="comments" value="1" />
                                    {{ text_yes }}
                               {% endif %}
                            </label>
                            <label class="radio-inline">
                                {% if not comments %}
                                    <input type="radio" name="comments" value="0" checked="checked" />
                                    {{ text_no }}
                                {% else %}
                                    <input type="radio" name="comments" value="0" />
                                    {{ text_no }}
                                {% endif %}
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <span data-toggle="tooltip" title="{{ help_login_required }}">
                                {{ entry_login_required }}
                            </span>
                        </label>
                        <div class="col-sm-8">
                            <label class="radio-inline">
                                {% if login %}
                                    <input type="radio" name="login" value="1" checked="checked" />
                                    {{ text_yes }}
                                {% else %}
                                    <input type="radio" name="login" value="1" />
                                    {{ text_yes }}
                                {% endif %}
                            </label>
                            <label class="radio-inline">
                                {% if not login %}
                                    <input type="radio" name="login" value="0" checked="checked" />
                                    {{ text_no }}
                                {% else %}
                                    <input type="radio" name="login" value="0" />
                                    {{ text_no }}
                                {% endif %}
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <span data-toggle="tooltip" title="{{ help_auto_approve }}">
                                {{ entry_auto_approve }}
                            </span>
                        </label>
                        <div class="col-sm-8">
                            <label class="radio-inline">
                                {% if auto_approve %}
                                    <input type="radio" name="auto_approve" value="1" checked="checked" />
                                    {{ text_yes }}
                                {% else %}
                                    <input type="radio" name="auto_approve" value="1" />
                                    {{ text_yes }}
                                {% endif %}
                            </label>
                            <label class="radio-inline">
                                {% if not auto_approve %}
                                    <input type="radio" name="auto_approve" value="0" checked="checked" />
                                        {{ text_no }}
                                {% else %}
                                    <input type="radio" name="auto_approve" value="0" />
                                    {{ text_no }}
                                {% endif %}
                            </label>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <td class="text-left">{{ column_title }}</td>
                                <td class="text-left">{{ column_status }}</td>
                                <td class="text-right">{{ column_comments }}</td>
                                <td class="text-right">{{ column_date_added }}</td>
                                <td class="text-right">{{ column_action }}</td>
                            </tr>
                        </thead>
                    {% if blogger_entries %}
                        <tbody>
                            {% for entry in blogger_entries %}
                                <tr>
                                    <td class="text-left">{{ entry.title }}</td>
                                    <td class="text-left">{{ entry.status }}</td>
                                    <td class="text-right">{{ entry.total_comments }}</td>
                                    <td class="text-right">{{ entry.date_added }}</td>
                                    <td class="text-right">
                                        <a onclick="confirm('{{ text_confirm }}')?location.href='{{ entry.delete }}' : false;" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger">
                                            <i class="fa fa-minus-circle"></i>
                                        </a>
                                        <a href="{{ entry.comments }}" data-toggle="tooltip" title="{{ button_comments }}" class="btn btn-info">
                                            <i class="fa fa-eye"></i>
                                        </a>
                                        <a href="{{ entry.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary">
                                            <i class="fa fa-pencil"></i>
                                        </a>
                                    </td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    {% endif %}
                        <tfoot>
                            {% if add_blog %}
                                <tr>
                                    <td class="text-right" colspan="5">
                                        <button type="button" onclick="location = '{{ add_blog }}';" data-toggle="tooltip" title="{{ button_add_blog }}" class="btn btn-primary">
                                            <i class="fa fa-plus-circle"></i>
                                        </button></td>
                                </tr>
                             {% else %}
                                <tr>
                                    <td class="text-center" colspan="5">{{ text_save_module }}</td>
                                </tr>
                            {% endif %}
                        </tfoot>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>
{{ footer }}