Открыть боковую панель
peteroshkvarkov
Project-38
Коммиты
0ef8fea5
Коммит
0ef8fea5
создал
Июл 08, 2023
по автору
Кабанин Денис Андреевич
Просмотр файлов
переделал видимость заявки у учителя
владелец
f06d1281
Изменения
5
Скрыть пробелы
Построчно
Рядом
portal/media/avatars/t2CNeSsPLNA_SaHWFrb.jpg
Просмотр заменённого файла @
f06d1281
Просмотр файла @
0ef8fea5
17,3 КБ
|
W:
|
H:
17,3 КБ
|
W:
|
H:
2-up
Swipe
Onion skin
portal/static/css/projects/project_page.css
Просмотр файла @
0ef8fea5
...
...
@@ -7,13 +7,12 @@
}
.people
{
padding
:
10px
5px
;
padding-right
:
10px
;
padding
:
15px
10px
;
margin-right
:
30px
;
display
:
flex
;
flex-direction
:
column
;
max-width
:
350px
;
border-radius
:
30
px
;
border-radius
:
15
px
;
background-color
:
#ffffff
;
}
...
...
@@ -45,12 +44,12 @@
.content
{
position
:
relative
;
padding
:
20
px
30px
;
padding
:
15
px
30px
;
padding-top
:
15px
;
width
:
80%
;
max-width
:
700px
;
background
:
#fff
;
border-radius
:
30
px
;
border-radius
:
15
px
;
font-style
:
normal
;
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -59,18 +58,22 @@
}
.status
{
margin-bottom
:
20px
;
padding-top
:
15px
;
margin-top
:
10px
;
text-align
:
center
;
border-top
:
1px
solid
#00000030
;
}
.status-span
{
font-size
:
1
6
px
;
font-weight
:
6
00
;
font-size
:
1
4
px
;
font-weight
:
4
00
;
}
.send-request
{
margin-left
:
5px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#ff1b2e
;
}
.on-work
{
color
:
#ffb51b
;
}
...
...
@@ -87,15 +90,15 @@
}
.name-form
,
.descr-form
{
width
:
calc
(
100%
-
50px
)
;
width
:
100%
;
}
.textarea
{
padding
:
10px
;
width
:
100%
;
border-radius
:
10px
;
border
:
none
;
resize
:
none
;
text-align
:
justify
;
color
:
#000000
;
background
:
transparent
;
transition
:
background
0.3s
;
...
...
@@ -104,13 +107,14 @@
.name-textarea
{
min-height
:
44px
;
max-height
:
300px
;
font-size
:
24px
;
font-size
:
30px
;
font-weight
:
700
;
}
.descr-textarea
{
min-height
:
100px
;
max-height
:
300px
;
font-size
:
16
px
;
font-size
:
20
px
;
}
.edit-btn
{
...
...
portal/static/img/project/accept.svg
0 → 100644
Просмотр файла @
0ef8fea5
<?xml version="1.0" ?>
<svg
style=
"enable-background:new 0 0 24 24;"
version=
"1.1"
viewBox=
"0 0 24 24"
xml:space=
"preserve"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
><style
type=
"text/css"
>
.st0{opacity:0.2;fill:none;stroke:#000000;stroke-width:5.000000e-02;stroke-miterlimit:10;}
</style><g
id=
"grid_system"
/><g
id=
"_icons"
><path
d=
"M18.3,6.3L9.1,16.4l-2.3-3c-0.3-0.4-1-0.5-1.4-0.2c-0.4,0.3-0.5,1-0.2,1.4l3,4C8.4,18.8,8.7,19,9,19c0,0,0,0,0,0 c0.3,0,0.5-0.1,0.7-0.3l10-11c0.4-0.4,0.3-1-0.1-1.4C19.3,5.9,18.6,5.9,18.3,6.3z"
/></g></svg>
\ Нет новой строки в конце файла
portal/templates/profile/profile.html
Просмотр файла @
0ef8fea5
...
...
@@ -45,8 +45,7 @@
<ul
class=
"projects-list"
>
{% for project_pack in open_projects_packs %}
<li
class=
"project-item"
>
<a
class=
"project-name"
href=
"{% url 'projects' %}?id={{project_pack.project.id}}"
>
{{
project.name }}
</a>
<a
class=
"project-name"
href=
"{% url 'projects' %}?id={{project_pack.project.id}}"
>
{{ project_pack.project.name }}
</a>
<span
class=
"project-span"
>
{{ project_pack.student_p_name }}
</span>
<span
class=
"project-span"
>
{{ project_pack.project.student.group}} группа
</span>
</li>
...
...
portal/templates/projects/project_page.html
Просмотр файла @
0ef8fea5
...
...
@@ -5,6 +5,15 @@
<link
rel=
"stylesheet"
href=
"{% static 'css/projects/project_page.css' %}"
>
<title>
{{ project.name }}
</title>
{% if user.role == 'Ученик' %}
<style>
.name-form
,
.descr-form
{
width
:
calc
(
100%
-
50px
);
}
</style>
{% endif %}
{% endblock head %}
{% block content %}
...
...
@@ -23,15 +32,17 @@
<span
class=
"people-span"
>
Исполнитель проекта
</span>
</div>
</div>
</div>
<div
class=
"content"
>
<div
class=
"status"
>
<span
class=
"status-span"
>
Статус:
<span
class=
"status-span"
>
{% if project.status == 'send request' %}
<span
class=
"send-request"
>
заявка на рассмотрении руководителем
</span>
<span
class=
"send-request"
>
Заявка на рассмотрении руководителем
</span>
{% elif project.status == 'on work' %}
<span
class=
"on-work"
>
Проект в процессе выполнения
</span>
{% endif %}
</span>
</div>
</div>
<div
class=
"content"
>
<div
class=
"name"
>
<form
method=
"POST"
action=
"{% url 'correct_project' %}"
id=
"form_name"
class=
"name-form"
>
{% csrf_token %}
...
...
@@ -39,8 +50,10 @@
<textarea
id=
"name"
name=
"name"
class=
"textarea name-textarea"
onkeyup=
"textarea_size(this)"
disabled
>
{{project.name}}
</textarea>
</form>
{% if user.role == 'Ученик' %}
<button
onclick=
"return edit(this, 'name')"
class=
"edit-btn"
>
</button>
{% endif %}
</div>
<div
class=
"descr"
>
...
...
@@ -50,7 +63,9 @@
<textarea
id=
"description"
name=
"description"
class=
"textarea descr-textarea"
onkeyup=
"textarea_size(this)"
disabled
>
{{project.description}}
</textarea>
</form>
{% if user.role == 'Ученик' %}
<button
onclick=
"return edit(this, 'description')"
class=
"edit-btn"
></button>
{% endif %}
</div>
<div
class=
"files"
>
...
...
@@ -59,7 +74,9 @@
<input
type=
"hidden"
name=
"file_id"
value=
"-1"
/>
<input
type=
"hidden"
name=
"project_id"
value=
"{{project.project_id}}"
/>
<label
for=
"add_file"
class=
"file-label"
>
Добавить файл
</label>
{% if user.role == 'Ученик' %}
<a
href=
"{% url 'trash' %}?project_id={{project.project_id}}"
>
Корзина
</a>
{% endif %}
<input
type=
"file"
id=
"add_file"
onchange=
"check_file_name(this)"
class=
"file-input"
name=
"file"
/>
</form>
<ul
class=
"file-list"
>
...
...
@@ -83,6 +100,7 @@
fill=
"#88cc5a"
/>
</svg>
</button>
{% if user.role == 'Ученик' %}
<label
for=
"delete_file{{files_pack.file.id}}"
class=
"btns-label"
title=
"Удалить файл"
>
<svg
fill=
"none"
height=
"20"
viewBox=
"0 0 20 20"
width=
"20"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
...
...
@@ -91,6 +109,7 @@
</svg>
</label>
{% endif %}
</div>
<form
method=
"POST"
action=
"{% url 'delete_file' %}"
class=
"del-form"
>
{% csrf_token %}
...
...
@@ -178,13 +197,16 @@
function
edit
(
elem
,
id
)
{
let
f
=
document
.
getElementById
(
id
);
f
.
disabled
=
false
;
elem
.
setAttribute
(
"
onclick
"
,
"
return save('
"
+
id
+
"
')
"
);
f
.
style
.
background
=
'
#f1f1f1
'
elem
.
setAttribute
(
"
onclick
"
,
"
return save(this, '
"
+
id
+
"
')
"
);
f
.
style
.
background
=
'
#f1f1f1
'
;
$
(
elem
).
css
({
'
background-image
'
:
'
url("../../static/img/project/accept.svg")
'
});
}
function
save
(
id
)
{
function
save
(
elem
,
id
)
{
let
f
=
document
.
getElementById
(
id
);
let
form
=
document
.
getElementById
(
"
form_
"
+
id
);
$
(
elem
).
css
({
'
background-image
'
:
'
url("../../static/img/global/pencil.svg")
'
});
console
.
log
(
form
);
form
.
submit
();
}
files_names
=
{{
project
.
files_names
|
js
}};
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать