- version : 0.8
- description : adding record and points pages and adding a navbar .
هذا الالتزام موجود في:
15
app.py
15
app.py
@@ -191,7 +191,8 @@ def import_csv():
|
||||
student_data['parent_name'],
|
||||
student_data['parent_phone_1'],
|
||||
student_data['parent_phone_2'] or None,
|
||||
student_data['student_phone'] or None,
|
||||
student_data['student_phone']
|
||||
or None,
|
||||
student_data['grade'],
|
||||
student_data['school_name'],
|
||||
student_data['address'],
|
||||
@@ -228,12 +229,22 @@ def import_csv():
|
||||
|
||||
return redirect(url_for('index'))
|
||||
|
||||
# New route to download the CSV template
|
||||
# Route to download the CSV template
|
||||
@app.route('/download_csv_template')
|
||||
def download_csv_template():
|
||||
# The directory where the template.csv is located (your templates folder)
|
||||
# The second argument is the filename to be sent
|
||||
return send_from_directory(app.template_folder, 'template.csv', as_attachment=True)
|
||||
|
||||
# Route for the "تسجيل حضور أو حفظ" page
|
||||
@app.route('/record')
|
||||
def record():
|
||||
return render_template('record.html')
|
||||
|
||||
# Route for the "النقاط" page
|
||||
@app.route('/points')
|
||||
def points():
|
||||
return render_template('points.html')
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
|
||||
@@ -3,9 +3,26 @@
|
||||
{% block title %}الصفحة الرئيسية{% endblock %} {# Specific title for this page #}
|
||||
|
||||
{% block content %}
|
||||
<header class="text-center mb-8">
|
||||
<h1 class="text-3xl sm:text-4xl font-bold text-gray-900">نظام إدارة الطلاب</h1>
|
||||
<p class="text-gray-600 mt-2">أدخل بيانات الطلاب يدوياً أو قم باستيراد ملف CSV.</p>
|
||||
<header class="text-center"> {# Removed mb-8 from header, now handled by h1 and nav #}
|
||||
<h1 class="text-3xl sm:text-4xl font-bold text-gray-900 mb-6">نظام إدارة الطلاب</h1> {# Added mb-6 for spacing below title #}
|
||||
|
||||
{# Navigation Bar - More Eye-Attractive Styling #}
|
||||
<nav class="mb-8"> {# Kept mb-8 for space below nav #}
|
||||
<ul class="flex justify-center space-x-4 space-x-reverse bg-white p-2 rounded-full shadow-lg inline-flex"> {# Added padding, background, rounded corners, shadow, and inline-flex for better alignment #}
|
||||
<li>
|
||||
{# Active link styling #}
|
||||
<a href="{{ url_for('index') }}" class="text-white bg-blue-600 hover:bg-blue-700 font-semibold px-6 py-3 rounded-full transition-all duration-300 ease-in-out shadow-md">الصفحة الرئيسية</a>
|
||||
</li>
|
||||
<li>
|
||||
{# Inactive link styling #}
|
||||
<a href="{{ url_for('record') }}" class="text-gray-700 hover:text-blue-700 hover:bg-blue-50 font-medium px-6 py-3 rounded-full transition-all duration-300 ease-in-out hover:shadow-sm transform hover:scale-105">تسجيل حضور أو حفظ</a>
|
||||
</li>
|
||||
<li>
|
||||
{# Inactive link styling #}
|
||||
<a href="{{ url_for('points') }}" class="text-gray-700 hover:text-blue-700 hover:bg-blue-50 font-medium px-6 py-3 rounded-full transition-all duration-300 ease-in-out hover:shadow-sm transform hover:scale-105">النقاط</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div id="add-student-section" class="bg-white p-8 rounded-xl shadow-lg mb-8 hidden">
|
||||
@@ -95,7 +112,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bg-white p-6 rounded-xl shadow-lg">
|
||||
<div class="flex justify-between items-center mb-4 pb-4 border-b">
|
||||
<h2 class="text-2xl font-semibold text-gray-800">الطلاب المسجلون</h2>
|
||||
|
||||
31
templates/points.html
Normal file
31
templates/points.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends 'template.html' %}
|
||||
|
||||
{% block title %}النقاط{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="text-center"> {# Removed mb-8 from header, now handled by h1 and nav #}
|
||||
<h1 class="text-3xl sm:text-4xl font-bold text-gray-900 mb-6">نظام نقاط الطلاب</h1> {# Added mb-6 for spacing below title #}
|
||||
{# Navigation Bar - More Eye-Attractive Styling #}
|
||||
<nav class="mb-8"> {# Kept mb-8 for space below nav #}
|
||||
<ul class="flex justify-center space-x-4 space-x-reverse bg-white p-2 rounded-full shadow-lg inline-flex"> {# Added padding, background, rounded corners, shadow, and inline-flex for better alignment #}
|
||||
<li>
|
||||
{# Inactive link styling #}
|
||||
<a href="{{ url_for('index') }}" class="text-gray-700 hover:text-blue-700 hover:bg-blue-50 font-medium px-6 py-3 rounded-full transition-all duration-300 ease-in-out hover:shadow-sm transform hover:scale-105">الصفحة الرئيسية</a>
|
||||
</li>
|
||||
<li>
|
||||
{# Inactive link styling #}
|
||||
<a href="{{ url_for('record') }}" class="text-gray-700 hover:text-blue-700 hover:bg-blue-50 font-medium px-6 py-3 rounded-full transition-all duration-300 ease-in-out hover:shadow-sm transform hover:scale-105">تسجيل حضور أو حفظ</a>
|
||||
</li>
|
||||
<li>
|
||||
{# Active link styling #}
|
||||
<a href="{{ url_for('points') }}" class="text-white bg-blue-600 hover:bg-blue-700 font-semibold px-6 py-3 rounded-full transition-all duration-300 ease-in-out shadow-md">النقاط</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="bg-white p-8 rounded-xl shadow-lg mb-8">
|
||||
<p class="text-gray-600 text-center">هذه صفحة لعرض وإدارة نقاط الطلاب.</p>
|
||||
{# Content for student points/rewards will go here #}
|
||||
</div>
|
||||
{% endblock %}
|
||||
31
templates/record.html
Normal file
31
templates/record.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends 'template.html' %}
|
||||
|
||||
{% block title %}تسجيل حضور أو حفظ{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="text-center"> {# Removed mb-8 from header, now handled by h1 and nav #}
|
||||
<h1 class="text-3xl sm:text-4xl font-bold text-gray-900 mb-6">تسجيل حضور الطلاب وحفظ المحفوظات</h1> {# Added mb-6 for spacing below title #}
|
||||
{# Navigation Bar - More Eye-Attractive Styling #}
|
||||
<nav class="mb-8"> {# Kept mb-8 for space below nav #}
|
||||
<ul class="flex justify-center space-x-4 space-x-reverse bg-white p-2 rounded-full shadow-lg inline-flex"> {# Added padding, background, rounded corners, shadow, and inline-flex for better alignment #}
|
||||
<li>
|
||||
{# Inactive link styling #}
|
||||
<a href="{{ url_for('index') }}" class="text-gray-700 hover:text-blue-700 hover:bg-blue-50 font-medium px-6 py-3 rounded-full transition-all duration-300 ease-in-out hover:shadow-sm transform hover:scale-105">الصفحة الرئيسية</a>
|
||||
</li>
|
||||
<li>
|
||||
{# Active link styling #}
|
||||
<a href="{{ url_for('record') }}" class="text-white bg-blue-600 hover:bg-blue-700 font-semibold px-6 py-3 rounded-full transition-all duration-300 ease-in-out shadow-md">تسجيل حضور أو حفظ</a>
|
||||
</li>
|
||||
<li>
|
||||
{# Inactive link styling #}
|
||||
<a href="{{ url_for('points') }}" class="text-gray-700 hover:text-blue-700 hover:bg-blue-50 font-medium px-6 py-3 rounded-full transition-all duration-300 ease-in-out hover:shadow-sm transform hover:scale-105">النقاط</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="bg-white p-8 rounded-xl shadow-lg mb-8">
|
||||
<p class="text-gray-600 text-center">هذه صفحة لتسجيل حضور الطلاب وتحديث تقدمهم في حفظ المحفوظات.</p>
|
||||
{# Content for attendance/memorization recording will go here #}
|
||||
</div>
|
||||
{% endblock %}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم