Skip to content

Commit 8556cfb

Browse files
committed
work
1 parent 355ad14 commit 8556cfb

File tree

7 files changed

+104
-21
lines changed

7 files changed

+104
-21
lines changed

src/main/java/org/woehlke/java/simpleworklist/domain/ProjectIdController.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public final String projectTaskAddGet(
8282
model.addAttribute("breadcrumb", breadcrumb);
8383
model.addAttribute("task", task);
8484
model.addAttribute("userSession", userSession);
85+
model.addAttribute("dataPage", true);
8586
return "project/id/task/add";
8687
}
8788

@@ -95,6 +96,7 @@ public final String projectTaskAddPost(
9596
) {
9697
Context context = super.getContext(userSession);
9798
UserAccount userAccount = context.getUserAccount();
99+
model.addAttribute("dataPage", true);
98100
if (result.hasErrors()) {
99101
for (ObjectError e : result.getAllErrors()) {
100102
log.info(e.toString());
@@ -166,6 +168,7 @@ public final String project(
166168
model.addAttribute("isDeleted",isDeleted);
167169
}
168170
model.addAttribute("userSession", userSession);
171+
model.addAttribute("dataPage", true);
169172
return "project/id/show";
170173
}
171174

@@ -179,6 +182,7 @@ public final String projectAddProjectGet(
179182
Context context = super.getContext(userSession);
180183
projectControllerService.addNewProjectToProjectIdForm(projectId, userSession, context, locale, model);
181184
model.addAttribute("userSession", userSession);
185+
model.addAttribute("dataPage", true);
182186
return "project/id/project/add";
183187
}
184188

@@ -215,6 +219,7 @@ public final String projectMoveToProjectGet(
215219
Project targetProject = projectService.findByProjectId(targetProjectId);
216220
thisProject = projectService.moveProjectToAnotherProject(thisProject, targetProject );
217221
model.addAttribute("userSession", userSession);
222+
model.addAttribute("dataPage", true);
218223
return thisProject.getUrl();
219224
}
220225

@@ -235,6 +240,7 @@ public final String projectEditGet(
235240
model.addAttribute("thisProject", thisProject);
236241
model.addAttribute("project", thisProject);
237242
model.addAttribute("userSession", userSession);
243+
model.addAttribute("dataPage", true);
238244
return "project/id/edit";
239245
}
240246

@@ -249,6 +255,7 @@ public final String projectEditPost(
249255
Context context = super.getContext(userSession);
250256
UserAccount thisUser = context.getUserAccount();
251257
Project thisProject;
258+
model.addAttribute("dataPage", true);
252259
if (result.hasErrors()) {
253260
for (ObjectError e : result.getAllErrors()) {
254261
log.info(e.toString());
@@ -327,6 +334,7 @@ public final String projectDeleteGet(
327334
model.addAttribute("breadcrumb", breadcrumb);
328335
model.addAttribute("thisProject", project);
329336
model.addAttribute("userSession", userSession);
337+
model.addAttribute("dataPage", true);
330338
return "project/id/show";
331339
}
332340
}
@@ -352,6 +360,7 @@ public String moveTaskToTaskAndChangeTaskOrderInProject(
352360
log.info(" DONE: taskMoveService.moveOrderIdProject");
353361
log.info("-------------------------------------------------");
354362
model.addAttribute("userSession", userSession);
363+
model.addAttribute("dataPage", true);
355364
return thisProject.getUrl();
356365
}
357366

@@ -365,6 +374,7 @@ public final String moveAllCompletedToTrash(
365374
Context context = super.getContext(userSession);
366375
taskService.moveAllCompletedToTrash(context);
367376
model.addAttribute("userSession", userSession);
377+
model.addAttribute("dataPage", true);
368378
return thisProject.getUrl();
369379
}
370380

@@ -378,6 +388,7 @@ public final String emptyTrash(
378388
Context context = super.getContext(userSession);
379389
taskService.emptyTrash(context);
380390
model.addAttribute("userSession", userSession);
391+
model.addAttribute("dataPage", true);
381392
return thisProject.getUrl();
382393
}
383394

@@ -400,6 +411,7 @@ public final String editTaskGet(
400411
model.addAttribute("task", task);
401412
model.addAttribute("contexts", contexts);
402413
model.addAttribute("userSession", userSession);
414+
model.addAttribute("dataPage", true);
403415
return "project/id/task/edit";
404416
}
405417

@@ -414,6 +426,7 @@ public final String editTaskPost(
414426
Model model
415427
) {
416428
log.info("editTaskPost");
429+
model.addAttribute("dataPage", true);
417430
if(task.getTaskState()==TaskState.SCHEDULED && task.getDueDate()==null){
418431
String objectName="task";
419432
String field="dueDate";
@@ -473,6 +486,7 @@ public final String setDoneTaskGet(
473486
task.setOrderIdTaskState(++maxOrderIdTaskState);
474487
task = taskService.updatedViaTaskstate(task);
475488
model.addAttribute("userSession", userSession);
489+
model.addAttribute("dataPage", true);
476490
return thisProject.getUrl();
477491
}
478492

@@ -489,6 +503,7 @@ public final String unsetDoneTaskGet(
489503
task.setOrderIdTaskState(++maxOrderIdTaskState);
490504
task = taskService.updatedViaTaskstate(task);
491505
model.addAttribute("userSession", userSession);
506+
model.addAttribute("dataPage", true);
492507
return thisProject.getUrl();
493508
}
494509

@@ -503,6 +518,7 @@ public final String setFocusGet(
503518
task.setFocus();
504519
task = taskService.updatedViaTaskstate(task);
505520
model.addAttribute("userSession", userSession);
521+
model.addAttribute("dataPage", true);
506522
return thisProject.getUrl();
507523
}
508524

@@ -517,6 +533,7 @@ public final String unsetFocusGet(
517533
task.unsetFocus();
518534
task = taskService.updatedViaTaskstate(task);
519535
model.addAttribute("userSession", userSession);
536+
model.addAttribute("dataPage", true);
520537
return thisProject.getUrl();
521538
}
522539

@@ -529,6 +546,7 @@ public final String moveTaskToAnotherProject(
529546
) {
530547
task = taskService.moveTaskToRootProject(task);
531548
model.addAttribute("userSession", userSession);
549+
model.addAttribute("dataPage", true);
532550
return "redirect:/project/root";
533551
}
534552

@@ -542,6 +560,7 @@ public final String moveTaskToAnotherProject(
542560
) {
543561
task = taskService.moveTaskToAnotherProject(task,otherProject);
544562
model.addAttribute("userSession", userSession);
563+
model.addAttribute("dataPage", true);
545564
return otherProject.getUrl();
546565
}
547566

@@ -556,6 +575,7 @@ public final String moveTaskToInbox(
556575
task.moveToInbox();
557576
taskService.updatedViaTaskstate(task);
558577
model.addAttribute("userSession", userSession);
578+
model.addAttribute("dataPage", true);
559579
return thisProject.getUrl();
560580
}
561581

@@ -570,6 +590,7 @@ public final String moveTaskToToday(
570590
task.moveToToday();
571591
taskService.updatedViaTaskstate(task);
572592
model.addAttribute("userSession", userSession);
593+
model.addAttribute("dataPage", true);
573594
return thisProject.getUrl();
574595
}
575596

@@ -584,6 +605,7 @@ public final String moveTaskToNext(
584605
task.moveToNext();
585606
taskService.updatedViaTaskstate(task);
586607
model.addAttribute("userSession", userSession);
608+
model.addAttribute("dataPage", true);
587609
return thisProject.getUrl();
588610
}
589611

@@ -598,6 +620,7 @@ public final String moveTaskToWaiting(
598620
task.moveToWaiting();
599621
taskService.updatedViaTaskstate(task);
600622
model.addAttribute("userSession", userSession);
623+
model.addAttribute("dataPage", true);
601624
return thisProject.getUrl();
602625
}
603626

@@ -612,6 +635,7 @@ public final String moveTaskToSomeday(
612635
task.moveToSomeday();
613636
taskService.updatedViaTaskstate(task);
614637
model.addAttribute("userSession", userSession);
638+
model.addAttribute("dataPage", true);
615639
return thisProject.getUrl();
616640
}
617641

@@ -626,6 +650,7 @@ public final String moveTaskToFocus(
626650
task.moveToFocus();
627651
taskService.updatedViaTaskstate(task);
628652
model.addAttribute("userSession", userSession);
653+
model.addAttribute("dataPage", true);
629654
return thisProject.getUrl();
630655
}
631656

@@ -640,6 +665,7 @@ public final String moveTaskToCompleted(
640665
task.moveToCompletedTasks();
641666
taskService.updatedViaTaskstate(task);
642667
model.addAttribute("userSession", userSession);
668+
model.addAttribute("dataPage", true);
643669
return thisProject.getUrl();
644670
}
645671

@@ -657,6 +683,7 @@ public final String moveTaskToTrash(
657683
userSession.setLastTaskState(task.getTaskState());
658684
userSession.setLastTaskId(task.getId());
659685
model.addAttribute("userSession", userSession);
686+
model.addAttribute("dataPage", true);
660687
return thisProject.getUrl();
661688
}
662689

@@ -671,6 +698,7 @@ public final String transformTaskIntoProjectGet(
671698
userSession.setLastProjectId(thisProject.getId());
672699
userSession.setLastTaskState(task.getTaskState());
673700
userSession.setLastTaskId(task.getId());
701+
model.addAttribute("dataPage", true);
674702
return transformTaskIntoProjektService.transformTaskIntoProjectGet(task, userSession, model);
675703
}
676704
}

0 commit comments

Comments
 (0)