aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJoris2017-01-31 22:36:18 +0100
committerJoris2017-01-31 22:36:18 +0100
commitdf001586359c99c2dea3f0ae1e034271e897a28a (patch)
treefac4b9e27ea94f8263522b353a927047a8f61dc6 /src/main
parent5b5c04315c4923ba4ea871db0c5be6f071442b9d (diff)
Add covers
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/reading/Books.scala7
-rw-r--r--src/main/scala/reading/component/index/Menu.scala4
-rw-r--r--src/main/scala/reading/models/Genre.scala2
-rw-r--r--src/main/scala/reading/models/Period.scala6
-rw-r--r--src/main/scala/reading/models/Theme.scala2
5 files changed, 12 insertions, 9 deletions
diff --git a/src/main/scala/reading/Books.scala b/src/main/scala/reading/Books.scala
index 4049720..b86a008 100644
--- a/src/main/scala/reading/Books.scala
+++ b/src/main/scala/reading/Books.scala
@@ -1332,6 +1332,7 @@ object Books {
programs = Seq(Autrui),
level = Facile
),
+
Book(
title = "Ma mère, le crabe et moi",
author = "Anne PERCIN",
@@ -1353,6 +1354,7 @@ object Books {
programs = Seq(Autrui),
level = Moyen
),
+
Book(
title = "Le Jour où j’ai rencontré un ange",
author = "Brigitte MINNE",
@@ -1594,6 +1596,7 @@ object Books {
programs = Seq(Valeurs),
level = Facile
),
+
Book(
title = "Mots rumeurs, mots cutter",
author = "Charlotte BOUSQUET, Stéphanie RUBINI",
@@ -1943,7 +1946,7 @@ object Books {
),
Book(
- title = "Le Combat d'hiver",
+ title = "Le Combat d’hiver",
author = "JC MOURLEVAT",
year = "2006",
period = None,
@@ -1954,7 +1957,7 @@ object Books {
),
Book(
- title = "Les Larmes de l'assassin",
+ title = "Les Larmes de l’assassin",
author = "Anne-Laure BONDOUX",
year = "2003",
period = None,
diff --git a/src/main/scala/reading/component/index/Menu.scala b/src/main/scala/reading/component/index/Menu.scala
index 6a9bcef..9645f5a 100644
--- a/src/main/scala/reading/component/index/Menu.scala
+++ b/src/main/scala/reading/component/index/Menu.scala
@@ -28,8 +28,8 @@ object Menu {
case None => group(books, filters, "Classe", Grade.values.map(Filter.apply(_)))
case Some(grade) => group(books, filters, grade.name, Program.values.map(Filter.apply(_)), Some(grade))
},
- group(books, filters, "Theme", Theme.values.map(Filter.apply(_))),
- group(books, filters, "Genre", Genre.values.map(Filter.apply(_))),
+ group(books, filters, "Theme", Theme.values.sorted.map(Filter.apply(_))),
+ group(books, filters, "Genre", Genre.values.sorted.map(Filter.apply(_))),
group(books, filters, "Niveau", Level.values.map(Filter.apply(_))),
group(books, filters, "Période", Period.values.map(Filter.apply(_)))
),
diff --git a/src/main/scala/reading/models/Genre.scala b/src/main/scala/reading/models/Genre.scala
index 4006815..83233ae 100644
--- a/src/main/scala/reading/models/Genre.scala
+++ b/src/main/scala/reading/models/Genre.scala
@@ -28,7 +28,7 @@ sealed trait Genre extends EnumEntry with Ordered[Genre] {
}
object Genre extends Enum[Genre] {
- val values = findValues.sorted
+ val values = findValues
case object JournalIntime extends Genre
case object RomanHistorique extends Genre
diff --git a/src/main/scala/reading/models/Period.scala b/src/main/scala/reading/models/Period.scala
index a962217..00e9427 100644
--- a/src/main/scala/reading/models/Period.scala
+++ b/src/main/scala/reading/models/Period.scala
@@ -5,8 +5,8 @@ import enumeratum._
sealed trait Period extends EnumEntry with Ordered[Period] {
import Period._
- def compare(that: Period) =
- Compare.format(this.prettyPrint).compare(Compare.format(that.prettyPrint))
+ def compare(that: Period): Int =
+ values.indexOf(that) - values.indexOf(this)
def prettyPrint(): String = this match {
case Antiquite => "Antiquité"
@@ -24,7 +24,7 @@ sealed trait Period extends EnumEntry with Ordered[Period] {
}
object Period extends Enum[Period] {
- val values = findValues.sorted
+ val values = findValues
case object Antiquite extends Period
case object MA extends Period
diff --git a/src/main/scala/reading/models/Theme.scala b/src/main/scala/reading/models/Theme.scala
index 61186a9..2544525 100644
--- a/src/main/scala/reading/models/Theme.scala
+++ b/src/main/scala/reading/models/Theme.scala
@@ -89,7 +89,7 @@ sealed trait Theme extends EnumEntry with Ordered[Theme] {
}
object Theme extends Enum[Theme] {
- val values = findValues.sorted
+ val values = findValues
case object Adolescence extends Theme
case object Americain extends Theme