{% extends "base.html" %}
{% load staticfiles %}

{%block YACMS_HEAD %}

<link href="{%static "yacms/css/pageadmin.css" %}" rel="stylesheet">

<script>

var view_json = {{view_object.json_data | safe}}
</script>

<link rel="stylesheet" href="/static/yacms/mediauploader/css/jquery.fileupload.css">
<link rel="stylesheet" href="/static/yacms/mediauploader/css/jquery.fileupload-ui.css">

 <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="/static/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">


{%endblock YACMS_HEAD %}


{%block DESCRIPTION %}{{view_object.introduction}}{% endblock DESCRIPTION %}
{% block TITLE%} {{view_object.title}}{% endblock TITLE %}
{% block BODY_TITLE%} Login {% endblock BODY_TITLE %}
{% block BREADCRUMBS_LIST_ENTRIES %}{% endblock BREADCRUMBS_LIST_ENTRIES %}






{% block YACMS_PAGE_MAIN_BODY %}
<div class="row-fluid ">

   {% if user.is_authenticated %}

   <div class="span8">
      <a href="/logout/">Logout</a>
   </div>

   {% else %}
    <form action="" method="POST">      {% csrf_token %}
   <div class="span10">

      <div class="row-fluid">
         <div class="span2">Username:</div><div class="span8"><input type="text" name="username"></input></div>
      </div>
      <div class="row-fluid">
         <div class="span2">Password:</div><div class="span8"><input type="password" name="password"></input></div>
      </div>

      <div class="row-fluid">
         <div class="span2"> <button type="submit" class="btn btn-primary">Send!</button></div>
          <div class="span8">{{error_msg}} </div>
      </div>

   </div>
   </form>

   {% endif %}


</div>

<br/><br/><br/><br/><br/><br/><br/><br/><br/>


{% endblock YACMS_PAGE_MAIN_BODY %}



{% block YACMS_JAVASCRIPT %}


<script src="{% static "yacms/js/dustjs/dust-full.min.js" %}"></script>
<script src="{% static "yacms/js/yacms.js" %}"></script>

<!-- script src="/static/jquery/jquery-1.11.3.js"></script -->
<script src="/static/yacms/mediauploader/js/vendor/jquery.ui.widget.js"></script>
<!-- The Templates plugin is included to render the upload/download listings -->
<script src="//blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
<script src="/static/yacms/mediauploader/js/load-image.all.min.js"></script>
<script src="/static/yacms/mediauploader/js/canvas-to-blob.min.js"></script>
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
<!-- script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script -->
<!-- blueimp Gallery script -->
<!-- script src="/static/yacms/mediauploader/js/jquery.blueimp-gallery.min.js"></script -->
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="/static/yacms/mediauploader/js/jquery.iframe-transport.js"></script>
<!-- The basic File Upload plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload.js"></script>
<!-- The File Upload processing plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload-process.js"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload-image.js"></script>
<!-- The File Upload audio preview plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload-audio.js"></script>
<!-- The File Upload video preview plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload-video.js"></script>
<!-- The File Upload validation plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload-validate.js"></script>
<!-- The File Upload user interface plugin -->
<script src="/static/yacms/mediauploader/js/jquery.fileupload-ui.js"></script>
<!-- The main application script -->
<script src="/static/yacms/mediauploader/js/main.js"></script>
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
<!--[if (gte IE 8)&(lt IE 10)]>
<script src="/static/yacms/js/mediauploader/cors/jquery.xdr-transport.js"></script>
<![endif]-->
<script>

 $( document ).ready(function() {
    get_content(view_json.content[0]);
});

$('#published_checkbox').prop('checked', view_json.published);
$('#frontpage_checkbox').prop('checked', view_json.frontpage);

$('#frontpage_checkbox').click(function(){

  handle_frontpage_checked(this);

})


</script>


{% endblock YACMS_JAVASCRIPT %}
