Изменил страницу с проектами

This commit is contained in:
Andrei 2023-03-04 11:57:18 +05:00
parent a346474a89
commit 62ad4907db
4 changed files with 9 additions and 7 deletions

View File

@ -239,7 +239,8 @@ def edit_project(id_project):
staff = data_session.query(StaffProjects).filter(StaffProjects.project == current_project.id).all() staff = data_session.query(StaffProjects).filter(StaffProjects.project == current_project.id).all()
if current_user.id == current_project.creator: if current_user.id == current_project.creator:
list_users = list( list_users = list(
map(lambda x: get_user_data(x), data_session.query(User).filter(User.id != current_user.id, User.activated == 1).all())) map(lambda x: get_user_data(x),
data_session.query(User).filter(User.id != current_user.id, User.activated == 1).all()))
staff = list(map(lambda x: get_user_data(x), data_session.query(User).filter( staff = list(map(lambda x: get_user_data(x), data_session.query(User).filter(
User.id.in_(list(map(lambda x: x.user, staff)))).all())) if staff else [] User.id.in_(list(map(lambda x: x.user, staff)))).all())) if staff else []
form = ProjectForm() form = ProjectForm()
@ -406,7 +407,9 @@ def user_view(_login):
StaffProjects.project).filter( StaffProjects.project).filter(
StaffProjects.user == user.id).all()))))).all() StaffProjects.user == user.id).all()))))).all()
resp = list(map(lambda x: get_projects_data(x), current_projects)) resp = list(map(lambda x: get_projects_data(x), current_projects))
return render_template('user_view.html', title=user.name + ' ' + user.surname, user=user, return render_template('user_view.html',
title=user.name if user.name else '' + ' ' + user.surname if user.surname else '',
user=user,
list_projects=resp) list_projects=resp)
else: else:
abort(404) abort(404)

View File

@ -69,7 +69,6 @@ body {
} }
.nav_chapter_text { .nav_chapter_text {
height: 100%; height: 100%;
font-family: Georgia, 'Times New Roman', Times, serif;
font-style: bold; font-style: bold;
color: #946137; color: #946137;
font-size: 2vw; font-size: 2vw;

View File

@ -4,7 +4,7 @@
} }
.header_block { .header_block {
width: 100%; width: 100%;
height: 50vw; height: 20vw;
background-position: center; background-position: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -19,7 +19,6 @@
.header_title_2 { .header_title_2 {
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
margin-top: 50px;
font-size: 1.5vw; font-size: 1.5vw;
width: 50vw; width: 50vw;
} }
@ -61,11 +60,12 @@
width: 94%; width: 94%;
height: 45vw; height: 45vw;
overflow-y: auto; overflow-y: auto;
padding-top: 2vw;
} }
.list_project { .list_project {
width: 95%; width: 95%;
margin-left: 2.5%; margin-left: 2.5%;
margin-top: 2vw; margin-top: 0.5vw;
overflow-y: hidden; overflow-y: hidden;
overflow-x: hidden; overflow-x: hidden;
} }

View File

@ -2,7 +2,7 @@
{% extends "base.html" %} {% block content %} {% extends "base.html" %} {% block content %}
<div class="projects_page"> <div class="projects_page">
<div class="header_block"> <div class="header_block">
<h2 class="header_title">КНИЖКИ</h2> <h2 class="header_title">ПРОЕКТЫ</h2>
<strong class="header_title_2">Здесь вы можете создавать свои проекты, изменять их, ставить дату дедлайна и <strong class="header_title_2">Здесь вы можете создавать свои проекты, изменять их, ставить дату дедлайна и
добавлять участников в своей проект.</strong> добавлять участников в своей проект.</strong>
</div> </div>