|
6 | 6 | rdfExported: Boolean, |
7 | 7 | extractionsStatus: Map[String, ExtractionGroup], outputFormats: Option[List[String]], spaceId: Option[String], access:String, |
8 | 8 | folderHierarchy: List[Folder], spaces:List[ProjectSpace], allDatasets: List[Dataset], |
9 | | - view_count: Int, view_date: java.util.Date, pager: Option[models.Pager])(implicit user: Option[models.User], request: RequestHeader) |
| 9 | + view_count: Int, view_date: java.util.Date, pager: models.Pager)(implicit user: Option[models.User], request: RequestHeader) |
10 | 10 |
|
11 | 11 | @import helper._ |
12 | 12 | @import play.api.Play.current |
|
198 | 198 | @** Only enable paging when viewing from a dataset? *@ |
199 | 199 | @if(allDatasets.length == 1) { |
200 | 200 | @allDatasets.map { ds => |
201 | | - @pager match { |
202 | | - case None => {} |
203 | | - case Some(pg) => { |
204 | | - <div class="row bottom-padding"> |
205 | | - <div class="col-sm-12 col-md-12 col-lg-12"> |
206 | | - @pg.prev match { |
207 | | - case None => {} |
208 | | - case Some(prev) => { |
209 | | - <a class="btn btn-sm btn-link" style="border-radius:15px;border-color:lightgray;" href="@routes.Files.file(prev, if(datasets.length > 0) { |
210 | | - Some(datasets.head.id.stringify) |
211 | | - } else { |
212 | | - None |
213 | | - }, spaceId, if(folders.length > 0) { |
214 | | - Some(folders.head.id.stringify) |
215 | | - } else { |
216 | | - None |
217 | | - })"><i class="glyphicon glyphicon-chevron-left"></i> Prev</a> |
218 | | - } |
219 | | - } |
220 | | - @pg.next match { |
221 | | - case None => {} |
222 | | - case Some(next) => { |
223 | | - <a class="btn btn-sm btn-link" style="border-radius:15px;border-color:lightgray;" href="@routes.Files.file(next, if(datasets.length > 0) { |
224 | | - Some(datasets.head.id.stringify) |
225 | | - } else { |
226 | | - None |
227 | | - }, spaceId, if(folders.length > 0) { |
228 | | - Some(folders.head.id.stringify) |
229 | | - } else { |
230 | | - None |
231 | | - })">Next <i class="glyphicon glyphicon-chevron-right"></i></a> |
232 | | - } |
233 | | - } |
| 201 | + <div class="row bottom-padding"> |
| 202 | + <div class="col-sm-12 col-md-12 col-lg-12"> |
| 203 | + @pager.prev match { |
| 204 | + case None => { |
| 205 | + <button class="btn btn-sm btn-link disabled" disabled="true" style="cursor:not-allowed;border-radius:15px;border-color:lightgray;"><i class="glyphicon glyphicon-chevron-left"></i> Prev</button> |
| 206 | + } |
| 207 | + case Some(prev) => { |
| 208 | + <a class="btn btn-sm btn-link" style="border-radius:15px;border-color:lightgray;" href="@routes.Files.file(prev, if(datasets.length > 0) { |
| 209 | + Some(datasets.head.id.stringify) |
| 210 | + } else { |
| 211 | + None |
| 212 | + }, spaceId, if(folders.length > 0) { |
| 213 | + Some(folders.head.id.stringify) |
| 214 | + } else { |
| 215 | + None |
| 216 | + })"><i class="glyphicon glyphicon-chevron-left"></i> Prev</a> |
| 217 | + } |
| 218 | + } |
| 219 | + @pager.next match { |
| 220 | + case None => { |
| 221 | + <button class="btn btn-sm btn-link disabled" disabled="true" style="cursor:not-allowed;border-radius:15px;border-color:lightgray;">Next <i class="glyphicon glyphicon-chevron-right"></i></button> |
| 222 | + } |
| 223 | + case Some(next) => { |
| 224 | + <a class="btn btn-sm btn-link" style="border-radius:15px;border-color:lightgray;" href="@routes.Files.file(next, if(datasets.length > 0) { |
| 225 | + Some(datasets.head.id.stringify) |
| 226 | + } else { |
| 227 | + None |
| 228 | + }, spaceId, if(folders.length > 0) { |
| 229 | + Some(folders.head.id.stringify) |
| 230 | + } else { |
| 231 | + None |
| 232 | + })">Next <i class="glyphicon glyphicon-chevron-right"></i></a> |
| 233 | + } |
| 234 | + } |
234 | 235 |
|
235 | | - </div> |
236 | | - </div> |
237 | | - } |
238 | | - } |
| 236 | + </div> |
| 237 | + </div> |
239 | 238 | } |
240 | 239 | } |
241 | 240 | </div> |
|
0 commit comments