diff --git a/__pycache__/models.cpython-313.pyc b/__pycache__/models.cpython-313.pyc index ec974e1..73b579e 100644 Binary files a/__pycache__/models.cpython-313.pyc and b/__pycache__/models.cpython-313.pyc differ diff --git a/routes/__pycache__/conversations.cpython-313.pyc b/routes/__pycache__/conversations.cpython-313.pyc index 736d4e4..6acf1ba 100644 Binary files a/routes/__pycache__/conversations.cpython-313.pyc and b/routes/__pycache__/conversations.cpython-313.pyc differ diff --git a/routes/__pycache__/rooms.cpython-313.pyc b/routes/__pycache__/rooms.cpython-313.pyc index 41f64a9..4437009 100644 Binary files a/routes/__pycache__/rooms.cpython-313.pyc and b/routes/__pycache__/rooms.cpython-313.pyc differ diff --git a/routes/conversations.py b/routes/conversations.py index f2bb20c..a2b5c98 100644 --- a/routes/conversations.py +++ b/routes/conversations.py @@ -1,6 +1,6 @@ from flask import Blueprint, render_template, redirect, url_for, flash, request, jsonify, send_file from flask_login import login_required, current_user -from models import db, Conversation, User, Message, MessageAttachment +from models import db, Conversation, User, Message, MessageAttachment, DocuPulseSettings from forms import ConversationForm from routes.auth import require_password_change from utils import log_event, create_notification, get_unread_count @@ -55,7 +55,8 @@ def conversations(): query = query.filter(Conversation.name.ilike(f'%{search}%')) conversations = query.order_by(Conversation.created_at.desc()).all() unread_count = get_unread_count(current_user.id) - return render_template('conversations/conversations.html', conversations=conversations, search=search, unread_notifications=unread_count) + usage_stats = DocuPulseSettings.get_usage_stats() + return render_template('conversations/conversations.html', conversations=conversations, search=search, unread_notifications=unread_count, usage_stats=usage_stats) @conversations_bp.route('/create', methods=['GET', 'POST']) @login_required diff --git a/routes/rooms.py b/routes/rooms.py index a9a9db2..b3ea612 100644 --- a/routes/rooms.py +++ b/routes/rooms.py @@ -1,6 +1,6 @@ from flask import Blueprint, render_template, redirect, url_for, flash, request, jsonify from flask_login import login_required, current_user -from models import db, Room, User, RoomMemberPermission, RoomFile, Notif +from models import db, Room, User, RoomMemberPermission, RoomFile, Notif, DocuPulseSettings from forms import RoomForm from routes.room_files import user_has_permission from routes.auth import require_password_change @@ -36,7 +36,11 @@ def rooms(): if search: query = query.filter(Room.name.ilike(f'%{search}%')) rooms = query.order_by(Room.created_at.desc()).all() - return render_template('rooms/rooms.html', rooms=rooms, search=search) + + # Get usage stats + usage_stats = DocuPulseSettings.get_usage_stats() + + return render_template('rooms/rooms.html', rooms=rooms, search=search, usage_stats=usage_stats) @rooms_bp.route('/create', methods=['GET', 'POST']) @login_required diff --git a/templates/conversations/conversations.html b/templates/conversations/conversations.html index 56fae0c..e528405 100644 --- a/templates/conversations/conversations.html +++ b/templates/conversations/conversations.html @@ -8,11 +8,39 @@ title="Conversations", description="Manage your conversations and messages", button_text="New Conversation" if current_user.is_admin or current_user.is_manager else "", - button_url=url_for('conversations.create_conversation') if current_user.is_admin or current_user.is_manager else "", + button_url="#" if current_user.is_admin or current_user.is_manager else "", icon="fa-comments", button_icon="fa-plus" ) }} + + +
@@ -123,5 +151,34 @@ {% block extra_js %} + {% endblock %} {% endblock %} \ No newline at end of file diff --git a/templates/rooms/rooms.html b/templates/rooms/rooms.html index 7a5e535..2838295 100644 --- a/templates/rooms/rooms.html +++ b/templates/rooms/rooms.html @@ -1,7 +1,7 @@ {% extends "common/base.html" %} {% from "components/header.html" import header %} -{% block title %}Rooms - DocuPulse{% endblock %} +{% block title %}Rooms - {% if site_settings.company_name %}DocuPulse for {{ site_settings.company_name }}{% else %}DocuPulse{% endif %}{% endblock %} {% block extra_css %} @@ -10,13 +10,11 @@ {% block content %} {{ header( title="Rooms", - description="Manage your document rooms and collaborate with team members", + description="Manage your rooms and documents", button_text="New Room", - button_url=url_for('rooms.create_room'), + button_url="#", icon="fa-door-open", - button_icon="fa-plus", - button_class="btn-primary", - button_style="padding: 0.4rem 1rem;" + button_icon="fa-plus" ) }}
@@ -99,21 +97,11 @@