diff --git a/public_html/asset/svg/down_arrow.svg b/public_html/asset/svg/down_arrow.svg
new file mode 100644
index 0000000..d696199
--- /dev/null
+++ b/public_html/asset/svg/down_arrow.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/public_html/asset/svg/up_arrow.svg b/public_html/asset/svg/up_arrow.svg
new file mode 100644
index 0000000..9056c03
--- /dev/null
+++ b/public_html/asset/svg/up_arrow.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/webpack/component/teacher/view.vue b/webpack/component/teacher/view.vue
index 094b5c1..f2cf5db 100644
--- a/webpack/component/teacher/view.vue
+++ b/webpack/component/teacher/view.vue
@@ -6,7 +6,6 @@
-
-
-
Systèmes d'Information
-
Introduction aux systèmes numériques
-
Graphes
-
Introduction à la méthode B
+
+
+
+
{{ gname }}
+
+
{{ data.name }}
+
-
- Master TI
- Master TI - Année 2
- Master TI - Année 2
-
-
-
- Maîtres de conférence
- Intervenant externe
- Autres
-
diff --git a/webpack/data/teacher.js b/webpack/data/teacher.js
index c7734fc..b5cbdf4 100644
--- a/webpack/data/teacher.js
+++ b/webpack/data/teacher.js
@@ -7,18 +7,63 @@ gstore.add('professors', []);
api.call('GET professor/1/', { vh: true }, function(rs){
// {1} If error -> abort //
- if( rs.error !== 0 )
- return console.log('No professor found, error: '+rs.error);
+ if( rs.error !== 0 )return console.log('No professor found, error: '+rs.error);
+ console.log(rs);
// {2} Store professors //
- console.log(rs);
gstore.get.professors = rs.professors;
});
-/* (2) Manage Instant Search (IS)
+/* (2) Manage Filters
+---------------------------------------------------------*/
+/* (1) Define global filter */
+gstore.add('filters', {
+ formations: [{ visible: false }],
+ ues: [{ visible: false }]
+});
+
+/* (2) Get Formations */
+api.call('GET formation', {}, function(rs){
+
+ // {1} If error -> abort //
+ if( rs.error !== 0 ) return console.log('No formation found, error: '+rs.error);
+ console.log(rs);
+
+ // {2} Format UE filters //
+ for( var i = 0 ; i < rs.formations.length ; i++ )
+ gstore.get.filters.formations.push({
+ code: rs.formations[i].id,
+ name: rs.formations[i].labelForm,
+ active: false
+ });
+
+});
+
+/* (3) Get UEs */
+api.call('GET ue', {}, function(rs){
+
+ // {1} If error -> abort //
+ if( rs.error !== 0 ) return console.log('No UE found, error: '+rs.error);
+ console.log(rs);
+
+ // {2} Format UE filters //
+ for( var i = 0 ; i < rs.ues.length ; i++ )
+ gstore.get.filters.ues.push({
+ code: rs.ues[i].code,
+ name: rs.ues[i].label,
+ active: false
+ });
+
+});
+
+
+
+
+
+/* (3) Manage Instant Search (IS)
---------------------------------------------------------*/
/* (1) Define global timeout index */
gstore.add('is_to', null);
diff --git a/webpack/scss/container.scss b/webpack/scss/container.scss
index 5f4d918..48b0121 100644
--- a/webpack/scss/container.scss
+++ b/webpack/scss/container.scss
@@ -398,25 +398,38 @@
margin: 1em;
/* (1.1) Title content */
- &:before{
+ & > div.fold{
content: attr(title);
- display: block;
+ display: inline-block;
position: relative;
margin-bottom: 1em;
+ padding-right: 1em;
+
+ background: transparent url('/asset/svg/down_arrow.svg@bbbbbb') right center no-repeat;
+ background-size: 1em 1em;
font-size: .8em;
color: darken($secondary-color, 10%);
text-transform: uppercase;
letter-spacing: .05em;
+ cursor: pointer;
+
+
+ &[data-show='1']{
+ background-image: url('/asset/svg/up_arrow.svg@bbbbbb');
+ }
+
}
+
+
/* (1.2) Filter element */
& > span{
- display: block;
+ display: none;
position: relative;
text-indent: 1.5em;
@@ -458,6 +471,11 @@
}
+ // only show items if filter_group has 'data-show'
+ & > div.fold[data-show='1'] ~ span{
+ display: block;
+ }
+
}