change soundboard link
This commit is contained in:
parent
c2f7d13c77
commit
4a0643189d
@ -11,7 +11,7 @@ from django.http import HttpResponse
|
|||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
def daily_food(request):
|
def daily_food(request):
|
||||||
today = datetime.datetime.now()
|
today = datetime.datetime.now() - datetime.timedelta(3)
|
||||||
feki_menu = Menu.objects.filter(date__exact=today).filter(location__contains="Feldkirchenstraße").last()
|
feki_menu = Menu.objects.filter(date__exact=today).filter(location__contains="Feldkirchenstraße").last()
|
||||||
austr_menu = Menu.objects.filter(date__exact=today).filter(location__contains="Austraße").last()
|
austr_menu = Menu.objects.filter(date__exact=today).filter(location__contains="Austraße").last()
|
||||||
erba_cafete = Menu.objects.filter(date__exact=today).filter(location__contains="Erba").last()
|
erba_cafete = Menu.objects.filter(date__exact=today).filter(location__contains="Erba").last()
|
||||||
|
|||||||
Binary file not shown.
@ -23,7 +23,7 @@ SECRET_KEY = '7tm($-7tz!co8762!)ptmj%)80)qa^z0odee*8-!be!i(a!p4j'
|
|||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
ALLOWED_HOSTS = ['mg-server.ddns.net', 'localhost', '127.0.0.1', '192.168.100.8']
|
ALLOWED_HOSTS = ['mg-server.ddns.net', 'localhost', '127.0.0.1', '192.168.100.8', '141.13.129.250']
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
|||||||
@ -22,9 +22,21 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.custom-pic-upload {
|
.custom-pic-upload {
|
||||||
/*border: 1px solid #ccc;*/
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
/*padding: 6px 12px;*/
|
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-wrapper:active img {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
z-index: 8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-wrapper img {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
}
|
}
|
||||||
@ -5,7 +5,7 @@ function add_img_class() {
|
|||||||
$('.food-item').each(function () {
|
$('.food-item').each(function () {
|
||||||
var food_id = $(this).data('food');
|
var food_id = $(this).data('food');
|
||||||
console.log("ITEM: " + $(this) + " FOOD-ID: " + food_id);
|
console.log("ITEM: " + $(this) + " FOOD-ID: " + food_id);
|
||||||
$(this).find('.img').addClass('img-' + food_id);
|
$(this).find('.image-wrapper').addClass('img-' + food_id);
|
||||||
$(this).find('.pic-upload').addClass('img-upload-' + food_id).on('change', function () {
|
$(this).find('.pic-upload').addClass('img-upload-' + food_id).on('change', function () {
|
||||||
readURL(this)
|
readURL(this)
|
||||||
});
|
});
|
||||||
@ -33,8 +33,12 @@ function readURL(obj) {
|
|||||||
function showUploadedItem(source, picClass) {
|
function showUploadedItem(source, picClass) {
|
||||||
console.log("Show Image: " + picClass + " source: " + source);
|
console.log("Show Image: " + picClass + " source: " + source);
|
||||||
$('.' + picClass).each(function () {
|
$('.' + picClass).each(function () {
|
||||||
console.log($(this));
|
console.log(this);
|
||||||
$(this).attr('src',source);
|
var img = this.childNodes[0];
|
||||||
|
var placeholder = this.childNodes[1];
|
||||||
|
console.log(img);
|
||||||
|
$(img).attr('src', source);
|
||||||
|
placeholder.style.display = 'none';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
{{ macros.link_item(title='WIAI Open', url='https://isfswiaiopen.wiai.de/',
|
{{ macros.link_item(title='WIAI Open', url='https://isfswiaiopen.wiai.de/',
|
||||||
description='Ist gerade jemand in der FS?') }}
|
description='Ist gerade jemand in der FS?') }}
|
||||||
{{ macros.link_item(title='RZ Störungen', url='https://www.uni-bamberg.de/rz/wir/itsm/reporting/', description='') }}
|
{{ macros.link_item(title='RZ Störungen', url='https://www.uni-bamberg.de/rz/wir/itsm/reporting/', description='') }}
|
||||||
{{ macros.link_item(title='WIAI Soundboard', url='https://sound.fswiai.de', description='Teil deinen Sound mit der FS') }}
|
{{ macros.link_item(title='WIAI Soundboard', url='http://sound.fswiai.de', description='Teil deinen Sound mit der FS') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -35,22 +35,22 @@
|
|||||||
{% for single_food in menu %}
|
{% for single_food in menu %}
|
||||||
<li data-food="{{ single_food.id }}" data-rating="{{ single_food.rating }}" class="food-item">
|
<li data-food="{{ single_food.id }}" data-rating="{{ single_food.rating }}" class="food-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="food-name col-12"><p>{{ single_food.name }}</p></div>
|
<div class="food-name col-8"><p>{{ single_food.name }}</p></div>
|
||||||
{#<div class="image-wrapper col-4"><img src="" class="img-rounded img" alt="Gericht" width="80"
|
<div class="image-wrapper col-4"><img src="" class="img-rounded img" alt="" width="1024"
|
||||||
height="80"></div>#}
|
height="800"><i class="img-placeholder fa fa-cutlery text-right"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="rating-wrapper col-6 text-left"></div>
|
<div class="rating-wrapper col-6 text-left"></div>
|
||||||
{#<div class="col-6 text-right">
|
<div class="col-6 text-right">
|
||||||
<label for="pic-upload-{{ single_food.id }}" class="custom-pic-upload">
|
<label for="pic-upload-{{ single_food.id }}" class="custom-pic-upload">
|
||||||
<i class="fa fa-camera" aria-hidden="true"></i>
|
<i class="fa fa-camera" aria-hidden="true"></i>
|
||||||
</label>
|
</label>
|
||||||
<div class="pic-input-wrapper">
|
<div class="pic-input-wrapper">
|
||||||
#}{# TODO: extract style to external css file #}{#
|
{# TODO: extract style to external css file#}
|
||||||
<input id="pic-upload-{{ single_food.id }}" class="pic-upload" type="file" name="photo"
|
<input id="pic-upload-{{ single_food.id }}" class="pic-upload" type="file" name="photo"
|
||||||
id="upload-photo" style="display: none !important;"/>
|
id="upload-photo" style="display: none !important;"/>
|
||||||
</div>
|
</div>
|
||||||
</div>#}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user