Commit 9e5cc4e5 authored by Curtis Adam's avatar Curtis Adam

Move some navigation elements into dropdown menus

parent d8ece720
......@@ -113,39 +113,73 @@ $themes: (
$navbar_background: map-get($map, "navbar_background");
$navbar_text: map-get($map, "navbar_text");
$navbar_text_hover: map-get($map, "navbar_text_hover");
$navbar_alldecks_background: map-get($map, "navbar_alldecks_background");
$navbar_alldecks_background_hover: map-get($map, "navbar_alldecks_background_hover");
$navbar_alldecks_background_active: map-get($map, "navbar_alldecks_background_active");
$navbar_alldecks_text: map-get($map, "navbar_alldecks_text");
$navbar_alldecks_text_hover: map-get($map, "navbar_alldecks_text_hover");
$navbar_alldecks_text_active: map-get($map, "navbar_alldecks_text_active");
$navbar_alldecks_border: map-get($map, "navbar_alldecks_border");
$navbar_alldecks_border_hover: map-get($map, "navbar_alldecks_border_hover");
$navbar_alldecks_border_active: map-get($map, "navbar_alldecks_border_active");
$navbar_create_background: map-get($map, "navbar_create_background");
$navbar_create_background_hover: map-get($map, "navbar_create_background_hover");
$navbar_create_background_active: map-get($map, "navbar_create_background_active");
$navbar_create_text: map-get($map, "navbar_create_text");
$navbar_create_text_hover: map-get($map, "navbar_create_text_hover");
$navbar_create_text_active: map-get($map, "navbar_create_text_active");
$navbar_repetitorium_background: map-get($map, "navbar_repetitorium_background");
$navbar_repetitorium_background_hover: map-get($map, "navbar_repetitorium_background_hover");
$navbar_repetitorium_background_active: map-get($map, "navbar_repetitorium_background_active");
$navbar_repetitorium_text: map-get($map, "navbar_repetitorium_text");
$navbar_repetitorium_text_hover: map-get($map, "navbar_repetitorium_text_hover");
$navbar_repetitorium_text_active: map-get($map, "navbar_repetitorium_text_active");
//navbar all
$navbar_all_background: map-get($map, "navbar_all_background");
$navbar_all_background_hover: map-get($map, "navbar_all_background_hover");
$navbar_all_background_active: map-get($map, "navbar_all_background_active");
$navbar_all_text: map-get($map, "navbar_all_text");
$navbar_all_text_hover: map-get($map, "navbar_all_text_hover");
$navbar_all_text_active: map-get($map, "navbar_all_text_active");
$navbar_all_border: map-get($map, "navbar_all_border");
$navbar_all_border_hover: map-get($map, "navbar_all_border_hover");
$navbar_all_border_active: map-get($map, "navbar_all_border_active");
$navbar_all_cardsets_background: map-get($map, "navbar_all_cardsets_background");
$navbar_all_cardsets_background_hover: map-get($map, "navbar_all_cardsets_background_hover");
$navbar_all_cardsets_background_active: map-get($map, "navbar_all_cardsets_background_active");
$navbar_all_cardsets_text: map-get($map, "navbar_all_cardsets_text");
$navbar_all_cardsets_text_hover: map-get($map, "navbar_all_cardsets_text_hover");
$navbar_all_cardsets_text_active: map-get($map, "navbar_all_cardsets_text_active");
$navbar_all_repetitorien_background: map-get($map, "navbar_all_repetitorien_background");
$navbar_all_repetitorien_background_hover: map-get($map, "navbar_all_repetitorien_background_hover");
$navbar_all_repetitorien_background_active: map-get($map, "navbar_all_repetitorien_background_active");
$navbar_all_repetitorien_text: map-get($map, "navbar_all_repetitorien_text");
$navbar_all_repetitorien_text_hover: map-get($map, "navbar_all_repetitorien_text_hover");
$navbar_all_repetitorien_text_active: map-get($map, "navbar_all_repetitorien_text_active");
//navbar personal
$navbar_personal_background: map-get($map, "navbar_personal_background");
$navbar_personal_background_hover: map-get($map, "navbar_personal_background_hover");
$navbar_personal_background_active: map-get($map, "navbar_personal_background_active");
$navbar_personal_text: map-get($map, "navbar_personal_text");
$navbar_personal_text_hover: map-get($map, "navbar_personal_text_hover");
$navbar_personal_text_active: map-get($map, "navbar_personal_text_active");
$navbar_personal_cardsets_background: map-get($map, "navbar_personal_cardsets_background");
$navbar_personal_cardsets_background_hover: map-get($map, "navbar_personal_cardsets_background_hover");
$navbar_personal_cardsets_background_active: map-get($map, "navbar_personal_cardsets_background_active");
$navbar_personal_cardsets_text: map-get($map, "navbar_personal_cardsets_text");
$navbar_personal_cardsets_text_hover: map-get($map, "navbar_personal_cardsets_text_hover");
$navbar_personal_cardsets_text_active: map-get($map, "navbar_personal_cardsets_text_active");
$navbar_personal_repetitorien_background: map-get($map, "navbar_personal_repetitorien_background");
$navbar_personal_repetitorien_background_hover: map-get($map, "navbar_personal_repetitorien_background_hover");
$navbar_personal_repetitorien_background_active: map-get($map, "navbar_personal_repetitorien_background_active");
$navbar_personal_repetitorien_text: map-get($map, "navbar_personal_repetitorien_text");
$navbar_personal_repetitorien_text_hover: map-get($map, "navbar_personal_repetitorien_text_hover");
$navbar_personal_repetitorien_text_active: map-get($map, "navbar_personal_repetitorien_text_active");
//navbar public
$navbar_public_background: map-get($map, "navbar_public_background");
$navbar_public_background_hover: map-get($map, "navbar_public_background_hover");
$navbar_public_background_active: map-get($map, "navbar_public_background_active");
$navbar_public_text: map-get($map, "navbar_public_text");
$navbar_public_text_hover: map-get($map, "navbar_public_text_hover");
$navbar_public_text_active: map-get($map, "navbar_public_text_active");
$navbar_public_cardsets_background: map-get($map, "navbar_public_cardsets_background");
$navbar_public_cardsets_background_hover: map-get($map, "navbar_public_cardsets_background_hover");
$navbar_public_cardsets_background_active: map-get($map, "navbar_public_cardsets_background_active");
$navbar_public_cardsets_text: map-get($map, "navbar_public_cardsets_text");
$navbar_public_cardsets_text_hover: map-get($map, "navbar_public_cardsets_text_hover");
$navbar_public_cardsets_text_active: map-get($map, "navbar_public_cardsets_text_active");
$navbar_public_repetitorien_background: map-get($map, "navbar_public_repetitorien_background");
$navbar_public_repetitorien_background_hover: map-get($map, "navbar_public_repetitorien_background_hover");
$navbar_public_repetitorien_background_active: map-get($map, "navbar_public_repetitorien_background_active");
$navbar_public_repetitorien_text: map-get($map, "navbar_public_repetitorien_text");
$navbar_public_repetitorien_text_hover: map-get($map, "navbar_public_repetitorien_text_hover");
$navbar_public_repetitorien_text_active: map-get($map, "navbar_public_repetitorien_text_active");
//navbar learn
$navbar_learn_background: map-get($map, "navbar_learn_background");
$navbar_learn_background_hover: map-get($map, "navbar_learn_background_hover");
$navbar_learn_background_active: map-get($map, "navbar_learn_background_active");
$navbar_learn_text: map-get($map, "navbar_learn_text");
$navbar_learn_text_hover: map-get($map, "navbar_learn_text_hover");
$navbar_learn_text_active: map-get($map, "navbar_learn_text_active");
$navbar_pool_background: map-get($map, "navbar_pool_background");
$navbar_pool_background_hover: map-get($map, "navbar_pool_background_hover");
$navbar_pool_background_active: map-get($map, "navbar_pool_background_active");
$navbar_pool_text: map-get($map, "navbar_pool_text");
$navbar_pool_text_hover: map-get($map, "navbar_pool_text_hover");
$navbar_pool_text_active: map-get($map, "navbar_pool_text_active");
$navbar_search_placeholder: map-get($map, "navbar_search_placeholder");
$navbar_search_button_background: map-get($map, "navbar_search_button_background");
$navbar_search_button_icon: map-get($map, "navbar_search_button_icon");
......@@ -1561,45 +1595,131 @@ $themes: (
}
//navbar
#navbar-pool a {
background-color: $navbar_pool_background !important;
color: $navbar_pool_text !important;
//navbar all
#navbar-all > a {
background-color: $navbar_all_background !important;
color: $navbar_all_text !important;
border-color: $navbar_all_border !important;
}
#navbar-all > a:hover, #navbar-all > a:focus {
background-color: $navbar_all_background_hover !important;
color: $navbar_all_text_hover !important;
border-color: $navbar_all_border_hover !important;
}
#navbar-all.active > a, #navbar-all.active > a:hover, #navbar-all.active > a:focus {
background-color: $navbar_all_background_active !important;
color: $navbar_all_text_active !important;
border-color: $navbar_all_border_active !important;
}
#navbar-all-cardsets a {
background-color: $navbar_all_cardsets_background !important;
color: $navbar_all_cardsets_text !important;
}
#navbar-pool a:hover, #navbar-pool a:focus {
background-color: $navbar_pool_background_hover !important;
color: $navbar_pool_text_hover !important;
#navbar-all-cardsets a:hover, #navbar-all-cardsets a:focus {
background-color: $navbar_all_cardsets_background_hover !important;
color: $navbar_all_cardsets_text_hover !important;
}
#navbar-pool.active a, #navbar-pool.active a:hover, #navbar-pool.active a:focus {
background-color: $navbar_pool_background_active !important;
color: $navbar_pool_text_active !important;
#navbar-all-cardsets.active a, #navbar-all-cardsets.active a:hover, #navbar-all-cardsets.active a:focus {
background-color: $navbar_all_cardsets_background_active !important;
color: $navbar_all_cardsets_text_active !important;
}
#navbar-repetitorium a {
background-color: $navbar_repetitorium_background !important;
color: $navbar_repetitorium_text !important;
#navbar-all-repetitorien a {
background-color: $navbar_all_repetitorien_background !important;
color: $navbar_all_repetitorien_text !important;
}
#navbar-repetitorium a:hover, #navbar-repetitorium a:focus {
background-color: $navbar_repetitorium_background_hover !important;
color: $navbar_repetitorium_text_hover !important;
#navbar-all-repetitorien a:hover, #navbar-all-repetitorien a:focus {
background-color: $navbar_all_repetitorien_background_hover !important;
color: $navbar_all_repetitorien_text_hover !important;
}
#navbar-repetitorium.active a, #navbar-repetitorium.active a:hover, #navbar-repetitorium.active a:focus {
background-color: $navbar_repetitorium_background_active !important;
color: $navbar_repetitorium_text_active !important;
#navbar-all-repetitorien.active a, #navbar-all-repetitorien.active a:hover, #navbar-all-repetitorien.active a:focus {
background-color: $navbar_all_repetitorien_background_active !important;
color: $navbar_all_repetitorien_text_active !important;
}
#navbar-own-decks a {
background-color: $navbar_create_background !important;
color: $navbar_create_text !important;
//navbar public
#navbar-public > a {
background-color: $navbar_public_background !important;
color: $navbar_public_text !important;
}
#navbar-own-decks a:hover, #navbar-own-decks a:focus {
background-color: $navbar_create_background_hover !important;
color: $navbar_create_text_hover !important;
#navbar-public > a:hover, #navbar-public > a:focus {
background-color: $navbar_public_background_hover !important;
color: $navbar_public_text_hover !important;
}
#navbar-own-decks.active a, #navbar-own-decks.active a:hover, #navbar-own-decks.active a:focus {
background-color: $navbar_create_background_active !important;
color: $navbar_create_text_active !important;
#navbar-public.active > a, #navbar-public.active > a:hover, #navbar-public.active > a:focus {
background-color: $navbar_public_background_active !important;
color: $navbar_public_text_active !important;
}
#navbar-public-cardsets a {
background-color: $navbar_public_cardsets_background !important;
color: $navbar_public_cardsets_text !important;
}
#navbar-public-cardsets a:hover, #navbar-public-cardsets a:focus {
background-color: $navbar_public_cardsets_background_hover !important;
color: $navbar_public_cardsets_text_hover !important;
}
#navbar-public-cardsets.active a, #navbar-public-cardsets.active a:hover, #navbar-public-cardsets.active a:focus {
background-color: $navbar_public_cardsets_background_active !important;
color: $navbar_public_cardsets_text_active !important;
}
#navbar-public-repetitorien a {
background-color: $navbar_public_background !important;
color: $navbar_public_text !important;
}
#navbar-public-repetitorien a:hover, #navbar-public-repetitorien a:focus {
background-color: $navbar_public_repetitorien_background_hover !important;
color: $navbar_public_repetitorien_text_hover !important;
}
#navbar-public-repetitorien.active a, #navbar-public-repetitorien.active a:hover, #navbar-public-repetitorien.active a:focus {
background-color: $navbar_public_repetitorien_background_active !important;
color: $navbar_public_repetitorien_text_active !important;
}
//navbar personal
#navbar-personal > a {
background-color: $navbar_personal_background !important;
color: $navbar_personal_text !important;
}
#navbar-personal > a:hover, #navbar-personal > a:focus {
background-color: $navbar_personal_background_hover !important;
color: $navbar_personal_text_hover !important;
}
#navbar-personal.active > a, #navbar-personal.active > a:hover, #navbar-personal.active > a:focus {
background-color: $navbar_personal_background_active !important;
color: $navbar_personal_text_active !important;
}
#navbar-personal-cardsets a {
background-color: $navbar_personal_cardsets_background !important;
color: $navbar_personal_cardsets_text !important;
}
#navbar-personal-cardsets a:hover, #navbar-personal-cardsets a:focus {
background-color: $navbar_personal_cardsets_background_hover !important;
color: $navbar_personal_cardsets_text_hover !important;
}
#navbar-personal-cardsets.active a, #navbar-personal-cardsets.active a:hover, #navbar-personal-cardsets.active a:focus {
background-color: $navbar_personal_cardsets_background_active !important;
color: $navbar_personal_cardsets_text_active !important;
}
#navbar-personal-repetitorien a {
background-color: $navbar_personal_repetitorien_background !important;
color: $navbar_personal_repetitorien_text !important;
}
#navbar-personal-repetitorien a:hover, #navbar-personal-repetitorien a:focus {
background-color: $navbar_personal_repetitorien_background_hover !important;
color: $navbar_personal_repetitorien_text_hover !important;
}
#navbar-personal-repetitorien.active a, #navbar-personal-repetitorien.active a:hover, #navbar-personal-repetitorien.active a:focus {
background-color: $navbar_personal_repetitorien_background_active !important;
color: $navbar_personal_repetitorien_text_active !important;
}
//navbar learn
#navbar-learn-decks a {
background-color: $navbar_learn_background !important;
color: $navbar_learn_text !important;
......@@ -1650,22 +1770,6 @@ $themes: (
color: $navbar_search_clear_icon !important;
}
#navbar-all-decks {
background-color: $navbar_alldecks_background !important;
color: $navbar_alldecks_text !important;
border-color: $navbar_alldecks_border !important;
}
#navbar-all-decks:hover, #navbar-all-decks:focus {
background-color: $navbar_alldecks_background_hover !important;
color: $navbar_alldecks_text_hover !important;
border-color: $navbar_alldecks_border_hover !important;
}
#navbar-all-decks.active, #navbar-all-decks.active a:hover, #navbar-all-decks.active a:focus {
background-color: $navbar_alldecks_background_active !important;
color: $navbar_alldecks_text_active !important;
border-color: $navbar_alldecks_border_active !important;
}
#navbar-help a {
background-color: $navbar_help_background !important;
color: $navbar_help_text !important;
......
......@@ -148,39 +148,73 @@
"navbar_background": $thm_gray,
"navbar_text": white,
"navbar_text_hover": $button_text_hover,
"navbar_alldecks_background": $thm_gray,
"navbar_alldecks_background_hover": $button_background_hover,
"navbar_alldecks_background_active": $thm_orange,
"navbar_alldecks_text": white,
"navbar_alldecks_text_hover": $button_text_hover,
"navbar_alldecks_text_active": white,
"navbar_alldecks_border": $thm_orange,
"navbar_alldecks_border_hover": $button_background_hover,
"navbar_alldecks_border_active": $thm_orange,
"navbar_create_background": $thm_gray,
"navbar_create_background_hover": $button_background_hover,
"navbar_create_background_active": $thm_green,
"navbar_create_text": white,
"navbar_create_text_hover": $button_text_hover,
"navbar_create_text_active": white,
"navbar_repetitorium_background": $thm_gray,
"navbar_repetitorium_background_hover": $button_background_hover,
"navbar_repetitorium_background_active": $thm_green,
"navbar_repetitorium_text": white,
"navbar_repetitorium_text_hover": $button_text_hover,
"navbar_repetitorium_text_active": white,
//navbar all
"navbar_all_background": $thm_gray,
"navbar_all_background_hover": $button_background_hover,
"navbar_all_background_active": $thm_orange,
"navbar_all_text": white,
"navbar_all_text_hover": $button_text_hover,
"navbar_all_text_active": white,
"navbar_all_border": $thm_orange,
"navbar_all_border_hover": $button_background_hover,
"navbar_all_border_active": $thm_orange,
"navbar_all_cardsets_background": $thm_gray,
"navbar_all_cardsets_background_hover": $button_background_hover,
"navbar_all_cardsets_background_active": $thm_orange,
"navbar_all_cardsets_text": white,
"navbar_all_cardsets_text_hover": $button_text_hover,
"navbar_all_cardsets_text_active": white,
"navbar_all_repetitorien_background": $thm_gray,
"navbar_all_repetitorien_background_hover": $button_background_hover,
"navbar_all_repetitorien_background_active": $thm_orange,
"navbar_all_repetitorien_text": white,
"navbar_all_repetitorien_text_hover": $button_text_hover,
"navbar_all_repetitorien_text_active": white,
//navbar personal
"navbar_personal_background": $thm_gray,
"navbar_personal_background_hover": $button_background_hover,
"navbar_personal_background_active": $thm_green,
"navbar_personal_text": white,
"navbar_personal_text_hover": $button_text_hover,
"navbar_personal_text_active": white,
"navbar_personal_cardsets_background": $thm_gray,
"navbar_personal_cardsets_background_hover": $button_background_hover,
"navbar_personal_cardsets_background_active": $thm_green,
"navbar_personal_cardsets_text": white,
"navbar_personal_cardsets_text_hover": $button_text_hover,
"navbar_personal_cardsets_text_active": white,
"navbar_personal_repetitorien_background": $thm_gray,
"navbar_personal_repetitorien_background_hover": $button_background_hover,
"navbar_personal_repetitorien_background_active": $thm_green,
"navbar_personal_repetitorien_text": white,
"navbar_personal_repetitorien_text_hover": $button_text_hover,
"navbar_personal_repetitorien_text_active": white,
//navbar public
"navbar_public_background": $thm_gray,
"navbar_public_background_hover": $button_background_hover,
"navbar_public_background_active": $thm_green,
"navbar_public_text": white,
"navbar_public_text_hover": $button_text_hover,
"navbar_public_text_active": white,
"navbar_public_cardsets_background": $thm_gray,
"navbar_public_cardsets_background_hover": $button_background_hover,
"navbar_public_cardsets_background_active": $thm_green,
"navbar_public_cardsets_text": white,
"navbar_public_cardsets_text_hover": $button_text_hover,
"navbar_public_cardsets_text_active": white,
"navbar_public_repetitorien_background": $thm_gray,
"navbar_public_repetitorien_background_hover": $button_background_hover,
"navbar_public_repetitorien_background_active": $thm_green,
"navbar_public_repetitorien_text": white,
"navbar_public_repetitorien_text_hover": $button_text_hover,
"navbar_public_repetitorien_text_active": white,
"navbar_learn_background": $thm_gray,
"navbar_learn_background_hover": $button_background_hover,
"navbar_learn_background_active": $thm_green,
"navbar_learn_text": white,
"navbar_learn_text_hover": $button_text_hover,
"navbar_learn_text_active": white,
"navbar_pool_background": $thm_gray,
"navbar_pool_background_hover": $button_background_hover,
"navbar_pool_background_active": $thm_green,
"navbar_pool_text": white,
"navbar_pool_text_hover": $button_text_hover,
"navbar_pool_text_active": white,
"navbar_search_placeholder": $thm_gray,
"navbar_search_button_background": white,
"navbar_search_button_icon": $button_background_hover,
......
......@@ -277,21 +277,51 @@
}
},
"navbar-collapse": {
"noCarddecks": "Kartei anlegen",
"oneCarddeck": "Meine Kartei",
"carddecks": "Meine Karteien",
"all": {
"all": "Alle…",
"cardsets": "Alle Karteien",
"repetitorien": "Alle Repetitorien"
},
"public": {
"public": "Öffentlich",
"cardsets": "Öffentliche Karteien",
"repetitorien": "Öffentliche Repetitorien"
},
"personal": {
"personal": {
"zero": "Anlegen",
"one": "Mein…",
"multiple": "Meine…"
},
"cardsets": {
"zero": "Kartei anlegen",
"one": "Meine Kartei",
"multiple": "Meine Karteien"
},
"repetitorien": {
"zero": "Repetitorium anlegen",
"one": "Mein Repetitorium",
"multiple": "Meine Repetitorien"
}
},
"learndecks": "Lernpensum",
"alldecks": "Alle Karteien",
"pool": "Karteien",
"course": "Repetitorien",
"myprofile": "Konto",
"billing": "Abrechnung",
"membership": "Mitgliedschaft",
"search": {
"all": "Suche nach Karteien oder Repetitorien…",
"cardset": "Suche nach Karteien…",
"repetitorium": "Suche nach Repetitorien…",
"myCardsets": "Suche nach eigenen Karteien…"
"workload": "Suche nach Karteien oder Repetitorien…",
"all": {
"cardsets": "Suche nach allen Karteien…",
"repetitorien": "Suche nach allen Repetitorien…"
},
"public": {
"cardsets": "Suche nach öffentlichen Karteien…",
"repetitorien": "Suche nach öffentlichen Repetitorien…"
},
"personal": {
"cardsets": "Suche nach eigenen Karteien…",
"repetitorien": "Suche nach egeinen Repetitorien…"
}
},
"frontend": "Frontend",
"backend": "Backend",
......@@ -555,16 +585,22 @@
},
"noName": "",
"description": {
"create": "Ich will eine Kartei anlegen – eine Kartenbox.",
"myCardIndex": "Ich will Karten schreiben.",
"personal": {
"create": "Ich will eine Kartei anlegen – eine Kartenbox.",
"cardsets": "Ich will Karten schreiben.",
"repetitorien": "Ich will Reps verwalten."
},
"pool": "Ich suche Karteien zu einem Thema.",
"repetitorium": "Ich suche ein Rep zur Klausurvorbereitung.",
"workload": "Ich will Karten lernen."
},
"button": {
"cancel": "Danke, ich kenne mich aus.",
"create": "Ruf das Kartei-Formular auf!",
"myCardIndex": "Bring mich zu meinen Karteien!",
"personal": {
"create": "Ruf das Kartei-Formular auf!",
"cardsets": "Bring mich zu meinen Karteien!",
"repetitorien": "Bring mich zu meinen Repetitorien!"
},
"pool": "Bring mich zur Karteien-Suche!",
"repetitorium": "Bring mich zur Repetitorien-Suche!",
"workload": "Zeig mir, was heute zu lernen ist!"
......
......@@ -278,21 +278,51 @@
}
},
"navbar-collapse": {
"noCarddecks": "Kartei anlegen",
"oneCarddeck": "Meine Kartei",
"carddecks": "Meine Karteien",
"all": {
"all": "Alle…",
"cardsets": "Alle Karteien",
"repetitorien": "Alle Repetitorien"
},
"public": {
"public": "Öffentlich",
"cardsets": "Öffentliche Karteien",
"repetitorien": "Öffentliche Repetitorien"
},
"personal": {
"personal": {
"zero": "Anlegen",
"one": "Mein…",
"multiple": "Meine…"
},
"cardsets": {
"zero": "Kartei anlegen",
"one": "Meine Kartei",
"multiple": "Meine Karteien"
},
"repetitorien": {
"zero": "Repetitorium anlegen",
"one": "Mein Repetitorium",
"multiple": "Meine Repetitorien"
}
},
"learndecks": "Lernpensum",
"alldecks": "Alle Karteien",
"pool": "Karteien",
"course": "Repetitorien",
"myprofile": "Konto",
"billing": "Abrechnung",
"membership": "Mitgliedschaft",
"search": {
"all": "Suche nach Karteien oder Repetitorien…",
"cardset": "Suche nach Karteien…",
"repetitorium": "Suche nach Repetitorien…",
"myCardsets": "Suche nach eigenen Karteien…"
"workload": "Suche nach Karteien oder Repetitorien…",
"all": {
"cardsets": "Suche nach allen Karteien…",
"repetitorien": "Suche nach allen Repetitorien…"
},
"public": {
"cardsets": "Suche nach öffentlichen Karteien…",
"repetitorien": "Suche nach öffentlichen Repetitorien…"
},
"personal": {
"cardsets": "Suche nach eigenen Karteien…",
"repetitorien": "Suche nach egeinen Repetitorien…"
}
},
"frontend": "Frontend",
"backend": "Backend",
......@@ -556,16 +586,22 @@
},
"noName": "User",
"description": {
"create": "I want to create a card index with cards of the type:",
"myCardIndex": "I want to see all my card indexes.",
"personal": {
"create": "I want to create a card index with cards of the type:",
"cardsets": "I want to see all my card indexes.",
"repetitorien": "Ich will Reps verwalten."
},
"pool": "I want to find a card index on a specific topic.",
"repetitorium": "I want to find a Repetitorium (= collection of card indexes) on a specific topic.",
"workload": "I want to see my learning workload."
},
"button": {
"cancel": "Thanks, I know my way around",
"create": "Go",
"myCardIndex": "Go",
"personal": {
"create": "Go",
"cardsets": "Go",
"repetitorien": "Go"
},
"pool": "Go",
"repetitorium": "Go",
"workload": "Go"
......
......@@ -15,7 +15,7 @@ export let BertAlertVisuals = class BertAlertVisuals {
}
static setBertAlertMargin () {
let mainContent = $('.row');
let mainContent = $('#main');
let bertAlert = $('.bert-alert');
let offsetTop = mainContent.offset().top + 10;
let offsetLeft = 0;
......
......@@ -42,6 +42,11 @@ if (Meteor.isServer) {
return Cardsets.find({shuffled: false});
}
});
Meteor.publish("allRepetitorien", function () {
if (this.userId && UserPermissions.isAdmin()) {
return Cardsets.find({shuffled: true});
}
});
Meteor.publish("workloadCardsets", function () {
if (this.userId && UserPermissions.isNotBlockedOrFirstLogin()) {
let workload = Workload.find({user_id: this.userId}, {fields: {cardset_id: 1}}).fetch();
......@@ -78,6 +83,11 @@ if (Meteor.isServer) {
return Cardsets.find({owner: this.userId, shuffled: false});
}
});
Meteor.publish("personalRepetitorien", function () {
if (this.userId && UserPermissions.isNotBlockedOrFirstLogin()) {
return Cardsets.find({owner: this.userId, shuffled: true});
}
});
Meteor.publish("poolCardsets", function () {
if (this.userId && UserPermissions.isNotBlockedOrFirstLogin()) {
return Cardsets.find({kind: {$in: ['free', 'edu', 'pro']}, shuffled: false});
......@@ -271,31 +281,40 @@ Meteor.methods({
throw new Meteor.Error("not-authorized");
} else if (searchValue !== undefined && searchValue !== null && searchValue.length > 2) {
let query = {};
if (UserPermissions.isAdmin()) {
query.name = {$regex: searchValue, $options: "i"};
query.kind = {$nin: ['demo', 'server']};
} else {
query = {
name: {$regex: searchValue, $options: "i"},
$or: [
{owner: Meteor.userId()},
{kind: {$nin: ['demo', 'server', 'personal']}}
]
};
}
if (filterType > 0) {
if (filterType === 1) {
query.name = {$regex: searchValue, $options: "i"};
switch (filterType) {
case 0:
if (UserPermissions.isAdmin()) {
query.kind = {$nin: ['demo', 'server']};
} else {
query.kind = {$nin: ['demo', 'server', 'personal']};
}
query.shuffled = false;
query.$or = undefined;
break;
case 1:
query.kind = {$nin: ['demo', 'server', 'personal']};
query.shuffled = false;
break;
case 2:
query.kind = {$nin: ['demo', 'server', 'personal']};
} else if (filterType === 2) {
query.shuffled = true;
} else {
query.$or = undefined;
break;
case 3:
query.owner = Meteor.userId();
query.kind = {$nin: ['demo', 'server']};
}
query.shuffled = false;
break;
case 4:
if (UserPermissions.isAdmin()) {
query.kind = {$nin: ['demo', 'server']};
} else {
query.kind = {$nin: ['demo', 'server', 'personal']};
}
query.shuffled = true;
break;
case 5:
query.owner = Meteor.userId();
query.shuffled = true;
break;
}
let results = Cardsets.find(query, {fields: {_id: 1}}).fetch();
let filter = [];
......
<
......@@ -13,6 +13,8 @@ Session.setDefault('courseIterationFilter', undefined);
Session.setDefault('repetitoriumFilter', undefined);
Session.setDefault('workloadFilter', undefined);
Session.setDefault('allCardsetsFilter', undefined);
Session.setDefault('allRepetitorienFilter', undefined);
Session.setDefault('personalRepetitorienFilter', undefined);
Session.setDefault('shuffleFilter', undefined);
let personalKindTag = "personal";
let eduKindTag = "edu";
......@@ -58,6 +60,16 @@ export let Filter = class Filter {
this.setDefaultFilter(FilterNavigation.getRouteId());
}
return Session.get('shuffleFilter');
case 6:
if (Session.get('allRepetitorienFilter') === undefined) {
this.setDefaultFilter(FilterNavigation.getRouteId());
}
return Session.get('allRepetitorienFilter');
case 7:
if (Session.get('personalRepetitorienFilter') === undefined) {
this.setDefaultFilter(FilterNavigation.getRouteId());
}