141 lines
3.6 KiB
HTML
141 lines
3.6 KiB
HTML
{% extends "website/base.html" %}
|
|
|
|
{% load sekizai_tags staticfiles %}
|
|
|
|
|
|
<!-- No Feature slider -->
|
|
{% block feature_slider %}
|
|
{% endblock %}
|
|
|
|
|
|
<!-- Static Navbar at top -->
|
|
{% block navbar_options %} navbar navbar-inverse navbar-static-top {% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
{% addtoblock "css" strip %}<link rel="stylesheet" href="{{STATIC_URL}}/css/datepicker.css" type="text/css" media="screen" /> {% endaddtoblock %}
|
|
|
|
|
|
{% addtoblock "css" strip %} <link rel="stylesheet" href="{{STATIC_URL}}/css/blogpost.css" type="text/css" media="screen" /> {% endaddtoblock %}
|
|
|
|
|
|
{% addtoblock "js" %}
|
|
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.js"></script>
|
|
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.de.js"></script>
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
var datepicker = $('#calendar').datepicker({
|
|
minViewMode: 1,
|
|
endDate: "{% now "SHORT_DATE_FORMAT" %}",
|
|
format: "dd.mm.yyyy",
|
|
language: "de",
|
|
})
|
|
|
|
datepicker.on( "changeDate", function(e){
|
|
var month = e.date.getMonth() +1
|
|
window.location ="?month="+month + "&year="+ e.date.getFullYear() ;
|
|
} );
|
|
|
|
$('#new_message_form').submit( function() {
|
|
if ( $('#message_title').val() == "" ) {
|
|
alert( "Nachricht hat keinen Titel!");
|
|
return false;
|
|
}
|
|
if ( $('#message_text').val() == "" ) {
|
|
alert( "Nachricht hat keinen Text!");
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
|
|
} );
|
|
</script>
|
|
{% endaddtoblock %}
|
|
|
|
|
|
<div id="blog_post">
|
|
<div class="container">
|
|
{% if archiveMode %}
|
|
<h2>Forum Archiv {{month}}/{{year}}</h2>
|
|
{% else %}
|
|
<h2>Forum</h2>
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="span8">
|
|
<div class="comments">
|
|
{% for message in messages %}
|
|
<div class="comment">
|
|
<div class="row">
|
|
|
|
<div class="span1">
|
|
<img src="{{MEDIA_URL}}/user_images/{{message.author}}_circle.png" class="img-circle author_pic">
|
|
</div>
|
|
<div class="span7">
|
|
<div class="name">
|
|
{{ message.titel }}
|
|
</div>
|
|
<div class="date"> {{ message.author.first_name}} am {{message.creation_time}} </div>
|
|
<div class="response">{{message.text|linebreaks }}</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
|
|
<div class="new_comment" id="new_comment">
|
|
<h4>Neue Nachricht</h4>
|
|
<form id="new_message_form" method="post" action="" >
|
|
{% csrf_token %}
|
|
<div class="row">
|
|
<div class="span8">
|
|
<input placeholder="Titel / Betreff" id='message_title' name="titel" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="span8">
|
|
<textarea placeholder="Nachricht" rows="7" id='message_text' name="text"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="span8">
|
|
<input value="Abschicken" class="btn send" type="submit">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<!-- SideBar -->
|
|
<div class="span3 sidebar offset1">
|
|
<div class="box" >
|
|
<h4>Archiv</h4>
|
|
<div id="calendar" {% if archiveMode %} data-date="01.{{month}}.{{year}}" {% endif %}></div>
|
|
</div>
|
|
|
|
<div class="box2">
|
|
<a href="#new_comment" >Nachricht schreiben</a><br/>
|
|
{% if archiveMode %}
|
|
<a href="." >Aktuelle Nachrichten</a>
|
|
{% endif%}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %} |