Merge pull request #4 from nullmedium/css-style-cleanup

Fix some CSS mis-alignments. Remove obsolete template file.
This commit is contained in:
Jens Luedicke
2025-06-29 21:26:50 +02:00
committed by GitHub
8 changed files with 29 additions and 49 deletions

6
app.py
View File

@@ -367,10 +367,6 @@ def dashboard():
return render_template('dashboard.html', title='Dashboard', **dashboard_data)
# Redirect old admin dashboard URL to new dashboard
@app.route('/admin/dashboard')
@admin_required
def admin_dashboard():
return redirect(url_for('dashboard'))
@app.route('/admin/users')
@admin_required
@@ -1844,4 +1840,4 @@ def download_team_hours_export():
return redirect(url_for('team_hours'))
if __name__ == '__main__':
app.run(debug=True)
app.run(debug=True, port=5050)

View File

@@ -184,6 +184,11 @@ button {
color: white;
}
.btn-success {
background-color: #4CAF50;
color: white;
}
.btn:hover {
background-color: #45a049;
}
@@ -490,6 +495,13 @@ input[type="time"]::-webkit-datetime-edit {
margin-bottom: 2rem;
}
.admin-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
}
.admin-panel {
display: flex;
flex-wrap: wrap;

View File

@@ -1,27 +0,0 @@
{% extends "layout.html" %}
{% block content %}
<div class="admin-container">
<h1>Admin Dashboard</h1>
<div class="admin-panel">
<div class="admin-card">
<h2>User Management</h2>
<p>Manage user accounts, permissions, and roles.</p>
<a href="{{ url_for('admin_users') }}" class="btn btn-primary">Manage Users</a>
</div>
<div class="admin-card">
<h2>Team Management</h2>
<p>Configure teams and their members.</p>
<a href="{{ url_for('admin_teams') }}" class="btn btn-primary">Configure</a>
</div>
<div class="admin-card">
<h2>System Settings</h2>
<p>Configure application-wide settings like registration and more.</p>
<a href="{{ url_for('admin_settings') }}" class="btn btn-primary">Configure</a>
</div>
</div>
</div>
{% endblock %}

View File

@@ -4,7 +4,7 @@
<div class="timetrack-container">
<div class="admin-header">
<h2>Project Management</h2>
<a href="{{ url_for('create_project') }}" class="btn">Create New Project</a>
<a href="{{ url_for('create_project') }}" class="btn btn-success">Create New Project</a>
</div>
{% if projects %}
@@ -45,11 +45,11 @@
<td>{{ project.created_by.username }}</td>
<td>{{ project.time_entries|length }}</td>
<td class="actions">
<a href="{{ url_for('edit_project', project_id=project.id) }}" class="btn btn-small">Edit</a>
<a href="{{ url_for('edit_project', project_id=project.id) }}" class="btn btn-sm btn-primary">Edit</a>
{% if g.user.role.name == 'ADMIN' and project.time_entries|length == 0 %}
<form method="POST" action="{{ url_for('delete_project', project_id=project.id) }}" style="display: inline;"
onsubmit="return confirm('Are you sure you want to delete this project?')">
<button type="submit" class="btn btn-small btn-danger">Delete</button>
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
</form>
{% endif %}
</td>
@@ -66,12 +66,6 @@
</div>
<style>
.admin-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
}
.projects-table {
overflow-x: auto;

View File

@@ -2,10 +2,9 @@
{% block content %}
<div class="container">
<div class="admin-header">
<h1>Team Management</h1>
<div class="mb-3">
<a href="{{ url_for('create_team') }}" class="btn btn-primary">Create New Team</a>
<a href="{{ url_for('create_team') }}" class="btn btn-success">Create New Team</a>
</div>
{% if teams %}
@@ -41,4 +40,5 @@
<p>No teams found. Create a team to get started.</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -2,9 +2,8 @@
{% block content %}
<div class="admin-container">
<div class="admin-header">
<h1>User Management</h1>
<div class="admin-actions">
<a href="{{ url_for('create_user') }}" class="btn btn-success">Create New User</a>
</div>
@@ -88,4 +87,5 @@
});
</script>
</div>
{% endblock %}

View File

@@ -45,6 +45,12 @@
<a href="{{ url_for('admin_users') }}" class="btn btn-primary">Manage Users</a>
</div>
<div class="admin-card">
<h2>Project Management</h2>
<p>Manage projects, assign teams, and track project status.</p>
<a href="{{ url_for('admin_projects') }}" class="btn btn-primary">Manage Projects</a>
</div>
<div class="admin-card">
<h2>Team Management</h2>
<p>Configure teams and their members.</p>

View File

@@ -23,7 +23,6 @@
<li><a href="{{ url_for('profile') }}">Profile</a></li>
<li><a href="{{ url_for('config') }}">Config</a></li>
<li><a href="{{ url_for('dashboard') }}">Dashboard</a></li>
<li><a href="{{ url_for('admin_dashboard') }}">Admin Dashboard</a></li>
<li><a href="{{ url_for('admin_users') }}">Manage Users</a></li>
<li><a href="{{ url_for('admin_teams') }}">Manage Teams</a></li>
<li><a href="{{ url_for('admin_projects') }}">Manage Projects</a></li>