Files
digiserver-v2/app/templates/dashboard.html
ske087 2deb398fd8 Add development testing environment
Templates (8 basic templates):
- base.html: Main layout with navigation, flash messages, responsive design
- login.html: User login form with remember me option
- register.html: User registration with validation
- dashboard.html: Main dashboard with statistics cards and recent activity
- players_list.html: Players list placeholder
- add_player.html: Add player form
- groups_list.html: Groups list placeholder
- create_group.html: Create group form
- content_list.html: Content list placeholder
- upload_content.html: File upload form
- admin.html: Admin panel with system overview

Development Setup:
- run_dev.sh: Automated development server setup script
  - Creates virtual environment
  - Installs dependencies
  - Initializes database
  - Creates default admin user (admin/admin123)
  - Runs Flask development server on port 5000

Static Files:
- static/uploads/ directory with .gitkeep
- Ready for media file uploads

Testing Features:
 Basic navigation and routing
 Authentication flow (login/register/logout)
 Dashboard with statistics
 Flash message system
 Responsive design with clean UI
 Placeholder templates for all routes

Ready for manual testing at http://localhost:5000
2025-11-12 10:39:25 +02:00

70 lines
2.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}Dashboard - DigiServer v2{% endblock %}
{% block content %}
<h1 style="margin-bottom: 2rem;">Dashboard</h1>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 2rem;">
<div class="card">
<h3 style="color: #3498db; margin-bottom: 0.5rem;">👥 Players</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ total_players or 0 }}</p>
<a href="{{ url_for('players.players_list') }}" class="btn" style="margin-top: 1rem;">View Players</a>
</div>
<div class="card">
<h3 style="color: #9b59b6; margin-bottom: 0.5rem;">📁 Groups</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ total_groups or 0 }}</p>
<a href="{{ url_for('groups.groups_list') }}" class="btn" style="margin-top: 1rem;">View Groups</a>
</div>
<div class="card">
<h3 style="color: #e67e22; margin-bottom: 0.5rem;">🎬 Content</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ total_content or 0 }}</p>
<a href="{{ url_for('content.content_list') }}" class="btn" style="margin-top: 1rem;">View Content</a>
</div>
<div class="card">
<h3 style="color: #27ae60; margin-bottom: 0.5rem;">💾 Storage</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ storage_mb or 0 }} MB</p>
<a href="{{ url_for('content.upload_content') }}" class="btn btn-success" style="margin-top: 1rem;">Upload Content</a>
</div>
</div>
<div class="card">
<h2>Quick Actions</h2>
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem;">
<a href="{{ url_for('players.add_player') }}" class="btn btn-success"> Add Player</a>
<a href="{{ url_for('groups.create_group') }}" class="btn btn-success"> Create Group</a>
<a href="{{ url_for('content.upload_content') }}" class="btn btn-success">⬆️ Upload Content</a>
{% if current_user.is_admin %}
<a href="{{ url_for('admin.admin_panel') }}" class="btn">⚙️ Admin Panel</a>
{% endif %}
</div>
</div>
{% if recent_logs %}
<div class="card">
<h2>Recent Activity</h2>
<div style="margin-top: 1rem;">
{% for log in recent_logs %}
<div style="padding: 0.5rem; border-bottom: 1px solid #eee;">
<span style="color: {% if log.level == 'error' %}#e74c3c{% elif log.level == 'warning' %}#f39c12{% else %}#27ae60{% endif %}; font-weight: bold;">
[{{ log.level.upper() }}]
</span>
{{ log.message }}
<small style="color: #7f8c8d; float: right;">{{ log.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</small>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<div class="card">
<h2>System Status</h2>
<p>✅ All systems operational</p>
<p>🔄 Blueprint architecture active</p>
<p>⚡ Flask {{ config.get('FLASK_VERSION', '3.1.0') }}</p>
</div>
{% endblock %}