49 lines
1.3 KiB
HTML
49 lines
1.3 KiB
HTML
{% extends "templates/base.html" %}
|
|
|
|
{% block title %}Discuss{% endblock %}
|
|
{% block head_include %}
|
|
<meta name="description" content="Courses" />
|
|
<meta name="keywords" content="" />
|
|
|
|
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="container">
|
|
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
|
<div class="messages-container mt-5">
|
|
{{ widgets.BatchHeader(batch_name=batch.title, member_count=member_count)}}
|
|
<ol class="messages">
|
|
{{ Messages(messages) }}
|
|
</ol>
|
|
{{ TextArea() }}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% macro Messages(messages) %}
|
|
{% for message in messages %}
|
|
<li class="{% if message.is_author %} ours {% endif %}">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="font-weight-bold">
|
|
{{ message.author_name }}
|
|
</div>
|
|
<small class="">
|
|
{{ frappe.utils.format_datetime(message.creation, "dd-mm-yyyy HH:mm") }}
|
|
</small>
|
|
</div>
|
|
<div class="message-para">
|
|
{{ message.message }}
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
{% endmacro %}
|
|
|
|
{% macro TextArea() %}
|
|
<form class="msger-inputarea mb-1">
|
|
<input type="text" class="msger-input" placeholder="Write your message...">
|
|
<button type="submit" class="btn btn-primary msger-send-btn" data-batch="{{batch.name | urlencode }}">Send</button>
|
|
</form>
|
|
{% endmacro %}
|