Keep filter when switching between pages (mostly; does not work in Notifications and Status)

This commit is contained in:
Šesták Vít
2017-04-03 07:46:21 +02:00
parent 248f7baaab
commit 1a1fb0b9f5
6 changed files with 24 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
@import helper._
@(projects: Seq[ReportInfo], watchedProjects: Set[String], failedReports: Set[String])(implicit req: DefaultRequest)
@(projects: Seq[ReportInfo], watchedProjects: Set[String], failedReports: Set[String], filter: Option[String])(implicit req: DefaultRequest)
@button(action: Call)(label: String) = {
@form(action, 'style -> "display: inline-block"){
@CSRF.formField
@@ -54,9 +54,9 @@
<button disabled class="btn btn-link">unwatch</button>
}else{
@if(isWatchedDirectly){
@button(routes.Notifications.unwatch(project.fullId))("unwatch")
@button(routes.Notifications.unwatch(project.fullId, filter))("unwatch")
}else{
@button(routes.Notifications.watch(project.fullId))("watch")
@button(routes.Notifications.watch(project.fullId, filter))("watch")
}
}
@children