blechreiz-website/simpleforum/templates/simpleforum/simpleforum.html

152 lines
3.8 KiB
HTML

{% extends "website/base.html" %}
{% load sekizai_tags staticfiles youtubefilter %}
{% 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 "css" %}
<style>
.embed-container {
position: relative;
padding-bottom: 56.25%; /* 16/9 ratio */
padding-top: 30px; /* IE6 workaround*/
height: 0;
overflow: hidden;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
{% 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}}_thumb.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 | youtube }}</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 %}