Открыть боковую панель
peteroshkvarkov
Project-38
Коммиты
53f4e421
Коммит
53f4e421
создал
Июн 25, 2023
по автору
Кабанин Денис Андреевич
Просмотр файлов
стилизовал всплывающие формы на странице проекта
владелец
5ec45228
Изменения
5
Скрыть пробелы
Построчно
Рядом
portal/static/css/profile/profile.css
Просмотр файла @
53f4e421
...
...
@@ -490,6 +490,7 @@
.project-name
{
padding
:
0
;
padding-right
:
25px
;
display
:
block
;
text-align
:
left
;
font-size
:
18px
;
...
...
portal/static/css/projects/project_page.css
Просмотр файла @
53f4e421
...
...
@@ -161,10 +161,6 @@
font-weight
:
400
;
}
.file-item
:not
(
:last-child
)
{
margin-right
:
10px
;
}
.file-item-div
{
width
:
15px
;
height
:
15px
;
...
...
@@ -213,6 +209,10 @@
position
:
absolute
;
}
.form-btn
{
margin-top
:
20px
;
}
.status-input
{
display
:
block
;
padding
:
10px
30px
;
...
...
@@ -237,16 +237,17 @@
}
.old-files
{
display
:
none
;
position
:
absolute
;
min-width
:
60
0px
;
z-index
:
3
;
top
:
5
0%
;
padding
:
2
0px
;
padding-top
:
10px
;
top
:
4
0%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
padding
:
20px
45px
;
display
:
none
;
min-width
:
600px
;
z-index
:
3
;
border-radius
:
10px
;
background-color
:
#fff
;
border-radius
:
5px
;
}
.back-form
{
...
...
@@ -261,27 +262,139 @@
}
.update-file
{
display
:
none
;
position
:
absolute
;
min-width
:
600px
;
z-index
:
3
;
top
:
50%
;
padding
:
20px
;
top
:
40%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
padding
:
20px
45px
;
display
:
none
;
z-index
:
3
;
border-radius
:
10px
;
background-color
:
#fff
;
border-radius
:
5px
;
}
.comment-window
{
display
:
none
;
position
:
absolute
;
min-width
:
60
0px
;
z-index
:
3
;
top
:
5
0%
;
padding
:
2
0px
;
padding-top
:
45px
;
top
:
4
0%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
padding
:
20px
45px
;
display
:
none
;
min-width
:
600px
;
z-index
:
3
;
border-radius
:
10px
;
background-color
:
#fff
;
}
.btn-exit
{
position
:
absolute
;
top
:
10px
;
right
:
10px
;
background
:
none
;
outline
:
none
;
border
:
none
;
cursor
:
pointer
;
}
.comment-textarea
{
min-height
:
100px
;
overflow-y
:
hidden
;
border
:
1px
solid
#000000
;
font-size
:
16px
;
margin-bottom
:
20px
;
}
.comment-btn
{
padding
:
10px
30px
;
display
:
block
;
margin-left
:
auto
;
border-radius
:
5px
;
border
:
none
;
font-size
:
16px
;
background
:
#103A84
;
color
:
#ffffff
;
cursor
:
pointer
;
transition
:
background
0.3s
linear
;
}
.comment-btn
:hover
{
background
:
#0d306d
;
}
.comment-btn
:active
{
background
:
#3e5e96
;
}
.old-files-title
{
margin-top
:
0
;
}
.old-files-item
{
position
:
relative
;
padding
:
10px
;
padding-right
:
20px
;
border-radius
:
5px
;
background
:
url('../../img/project/download.svg')
no-repeat
;
background-position
:
calc
(
100%
-
10px
)
center
;
background-size
:
auto
;
transition
:
background-color
0.3s
linear
;
}
.old-files-item
:not
(
:last-child
)
{
margin-bottom
:
10px
;
}
.old-files-item
:hover
{
background-color
:
#f1f1f1
;
}
.old-files-link
::after
{
content
:
""
;
position
:
absolute
;
top
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
}
.update-file-title
{
margin-top
:
0
;
margin-bottom
:
10px
;
text-align
:
center
;
font-size
:
18px
;
}
.update-file-subtitle
{
display
:
block
;
width
:
100%
;
text-align
:
center
;
font-weight
:
300
;
margin-bottom
:
40px
;
}
.update-file-btns
{
display
:
flex
;
justify-content
:
space-between
;
width
:
80%
;
margin
:
0
auto
;
}
.update-file-btn
{
padding
:
10px
30px
;
border-radius
:
5px
;
border
:
none
;
font-size
:
16px
;
background
:
#103A84
;
color
:
#ffffff
;
cursor
:
pointer
;
transition
:
background
0.3s
linear
;
}
.update-file-btn
:hover
{
background
:
#0d306d
;
}
.update-file-btn
:active
{
background
:
#3e5e96
;
}
\ Нет новой строки в конце файла
portal/static/img/project/download.svg
0 → 100644
Просмотр файла @
53f4e421
<?xml version="1.0" ?>
<svg
height=
"24"
viewBox=
"0 0 24 24"
width=
"24"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M22,16 L22,20 C22,21.1045695 21.1045695,22 20,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,16 L4,16 L4,20 L20,20 L20,16 L22,16 Z M13,12.5857864 L16.2928932,9.29289322 L17.7071068,10.7071068 L12,16.4142136 L6.29289322,10.7071068 L7.70710678,9.29289322 L11,12.5857864 L11,2 L13,2 L13,12.5857864 Z"
fill-rule=
"evenodd"
/></svg>
\ Нет новой строки в конце файла
portal/templates/profile/profile.html
Просмотр файла @
53f4e421
...
...
@@ -53,7 +53,7 @@
{% endfor %}
{% if user.role == 'Ученик' %}
{% for project_pack in request_projects_packs %}
<li
class=
"project-item"
>
<!-- здесь надо подумать -->
<li
class=
"project-item"
>
<a
href=
"{% url 'projects' %}?id={{project_pack.project.id}}"
>
<button
class=
"btn project-name"
>
{{ project_pack.project.name }}
</button>
</a>
...
...
@@ -83,12 +83,12 @@
<div
class=
"btn-projects-icon"
></div>
<ul
class=
"projects-list"
>
{% for project_pack in request_projects_packs %}
<li
class=
"project-item"
>
<!-- здесь надо подумать -->
<li
class=
"project-item"
>
<a
href=
"{% url 'projects' %}?id={{project_pack.project.id}}"
>
<button
class=
"btn project-name"
>
{{ project_pack.project.name }}
</button>
</a>
<span
class=
"project-span"
>
{{ project_pack. }}
</span>
<span
class=
"project-span"
>
{{
user
.group }} группа
</span>
<span
class=
"project-span"
>
{{ project_pack.
student_p_name
}}
</span>
<span
class=
"project-span"
>
{{
project_pack.project.student
.group }} группа
</span>
</li>
{% endfor %}
</ul>
...
...
portal/templates/projects/project_page.html
Просмотр файла @
53f4e421
...
...
@@ -36,7 +36,8 @@
<form
method=
"POST"
action=
"{% url 'correct_project' %}"
id=
"form_name"
class=
"name-form"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"project"
value=
"{{project.project_id}}"
/>
<textarea
id=
"name"
name=
"name"
class=
"textarea name-textarea"
onkeyup=
"textarea_size(this)"
disabled
>
{{project.name}}
</textarea>
<textarea
id=
"name"
name=
"name"
class=
"textarea name-textarea"
onkeyup=
"textarea_size(this)"
disabled
>
{{project.name}}
</textarea>
</form>
<button
onclick=
"return edit(this, 'name')"
class=
"edit-btn"
>
</button>
...
...
@@ -46,7 +47,8 @@
<form
method=
"POST"
action=
"{% url 'correct_project' %}"
id=
"form_description"
class=
"descr-form"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"project"
value=
"{{project.project_id}}"
>
<textarea
id=
"description"
name=
"description"
class=
"textarea descr-textarea"
onkeyup=
"textarea_size(this)"
disabled
>
{{project.description}}
</textarea>
<textarea
id=
"description"
name=
"description"
class=
"textarea descr-textarea"
onkeyup=
"textarea_size(this)"
disabled
>
{{project.description}}
</textarea>
</form>
<button
onclick=
"return edit(this, 'description')"
class=
"edit-btn"
></button>
</div>
...
...
@@ -101,52 +103,71 @@
</ul>
</div>
{% for files_pack in files_packs %}
<div>
<div
id=
"comments{{files_pack.file.id}}"
class=
"comment-window"
>
{% if files_pack.file.comment is not None %}
<div>
{{files_pack.file.comment}}
</div>
{%else%}
<form
method=
"POST"
action=
"{% url 'add_comment' %}"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"file_id"
value=
"{{files_pack.file.id}}"
/>
<textarea
name=
"comment"
class=
"form-control"
placeholder=
"Введите комментарий"
></textarea>
<label
for=
"delete_file{{files_pack.file.id}}"
>
Отправить комментарий
</label>
<input
type=
"submit"
>
</form>
{%endif%}
<button
onclick=
"exit('comments{{files_pack.file.id}}')"
>
Выйти
</button>
</div>
<div
id=
"old-files{{files_pack.file.id}}"
class=
"old-files"
>
<button
class=
"btn-exit"
onclick=
"exit('old-files{{files_pack.file.id}}')"
type=
"button"
>
Выход
</button>
<div>
Предыдущие версии файла
<br></div>
{% for old_file in files_pack.old_files %}
<div>
{{old_file.name}}
</div>
<a
href=
"{% url 'download_file' %}?file_id={{old_file.file.id}}"
>
Загрузить файл
</a>
{% endfor %}
</div>
</div>
{% endfor %}
{% if project.status == 'send request' and user.role == 'Учитель'%}
<form
method=
"POST"
action=
"{% url 'approve_project' %}"
>
<form
method=
"POST"
action=
"{% url 'approve_project' %}"
class=
"form-btn"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"project_id"
value=
"{{project.project_id}}"
>
<input
type=
"submit"
id=
"approve_project"
class=
"status-input"
value=
"Одобрить проект"
>
</form>
{% elif project.status == 'on work' and user.role == 'Учитель' %}
<form
method=
"POST"
action=
"{% url 'close_project' %}"
>
<form
method=
"POST"
action=
"{% url 'close_project' %}"
class=
"form-btn"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"project_id"
value=
"{{project.project_id}}"
>
<input
type=
"submit"
id=
"close_project "
class=
"status-input"
value=
"Завршить проект"
>
</form>
{% endif %}
<div
class=
"update-file"
>
<div>
Файл с таким именем уже существует
<br>
Вы хотите заменить его?
</div>
<button
onclick=
"update_file()"
>
Да
</button>
<button
onclick=
"close_update_window()"
>
Нет
</button>
</div>
{% for files_pack in files_packs %}
<div>
<div
id=
"comments{{files_pack.file.id}}"
class=
"comment-window"
>
{% if files_pack.file.comment is not None %}
<div>
{{files_pack.file.comment}}
</div>
{%else%}
<form
method=
"POST"
action=
"{% url 'add_comment' %}"
class=
"comment-form"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"file_id"
value=
"{{files_pack.file.id}}"
/>
<textarea
name=
"comment"
class=
"textarea comment-textarea"
placeholder=
"Введите комментарий"
onkeyup=
"textarea_size(this)"
required
></textarea>
<input
type=
"submit"
value=
"Отправить комментарий"
class=
"comment-btn"
>
</form>
{%endif%}
<button
class=
"btn-exit"
onclick=
"exit('comments{{files_pack.file.id}}')"
>
<svg
width=
"25"
height=
"25"
viewBox=
"0 0 200 200"
xmlns=
"http://www.w3.org/2000/svg"
class=
"btn-exit-svg"
>
<path
d=
"m114 100 49-49a9.9 9.9 0 0 0-14-14l-49 49-49-49a9.9 9.9 0 0 0-14 14l49 49-49 49a9.9 9.9 0 0 0 14 14l49-49 49 49a9.9 9.9 0 0 0 14-14Z"
fill=
"#000000"
></path>
</svg>
</button>
</div>
<div
id=
"old-files{{files_pack.file.id}}"
class=
"old-files"
>
<button
class=
"btn-exit"
onclick=
"exit('old-files{{files_pack.file.id}}')"
type=
"button"
>
<svg
width=
"25"
height=
"25"
viewBox=
"0 0 200 200"
xmlns=
"http://www.w3.org/2000/svg"
class=
"btn-exit-svg"
>
<path
d=
"m114 100 49-49a9.9 9.9 0 0 0-14-14l-49 49-49-49a9.9 9.9 0 0 0-14 14l49 49-49 49a9.9 9.9 0 0 0 14 14l49-49 49 49a9.9 9.9 0 0 0 14-14Z"
fill=
"#000000"
></path>
</svg>
</button>
<h2
class=
"old-files-title"
>
Предыдущие версии файла
</h2>
<ul
class=
"old-files-list"
>
{% for old_file in files_pack.old_files %}
<li
class=
"old-files-item"
>
<a
href=
"{% url 'download_file' %}?file_id={{old_file.file.id}}"
class=
"old-files-link"
>
{{old_file.name}}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
<div
class=
"update-file"
>
<h2
class=
"update-file-title"
>
Файл с таким именем уже существует
</h2>
<span
class=
"update-file-subtitle"
>
Вы хотите заменить его?
</span>
<div
class=
"update-file-btns"
>
<button
onclick=
"close_update_window()"
class=
"update-file-btn"
>
Нет
</button>
<button
onclick=
"update_file()"
class=
"update-file-btn"
>
Да
</button>
</div>
</div>
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать