forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -20,8 +20,11 @@ class Jour:
|
|||||||
def __init__(self, date: datetime.date):
|
def __init__(self, date: datetime.date):
|
||||||
self.date = date
|
self.date = date
|
||||||
self.class_list: list[str] = []
|
self.class_list: list[str] = []
|
||||||
|
|
||||||
if self.is_non_work():
|
if self.is_non_work():
|
||||||
self.class_list.append("non-travail")
|
self.class_list.append("non-travail")
|
||||||
|
if self.is_current_week():
|
||||||
|
self.class_list.append("sem-courante")
|
||||||
|
|
||||||
def get_nom(self, short=True):
|
def get_nom(self, short=True):
|
||||||
"""
|
"""
|
||||||
@ -45,6 +48,12 @@ class Jour:
|
|||||||
dept_id=g.scodoc_dept_id
|
dept_id=g.scodoc_dept_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def is_current_week(self):
|
||||||
|
"""
|
||||||
|
Renvoie True si le jour est dans la semaine courante
|
||||||
|
"""
|
||||||
|
return self.date.isocalendar()[1] == datetime.date.today().isocalendar()[1]
|
||||||
|
|
||||||
def get_date(self) -> str:
|
def get_date(self) -> str:
|
||||||
"""
|
"""
|
||||||
Renvoie la date du jour au format "dd/mm/yyyy"
|
Renvoie la date du jour au format "dd/mm/yyyy"
|
||||||
|
@ -69,4 +69,11 @@
|
|||||||
border: 1px solid #d5d5d5;
|
border: 1px solid #d5d5d5;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sem-courante{
|
||||||
|
--couleur : #ee752c;
|
||||||
|
border-left: solid 3px var(--couleur);
|
||||||
|
border-right: solid 3px var(--couleur);
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user