comparison src/main/webapp/pages/home.jsp @ 60:90d5e86c157d

new: auto refresh page when there's new version saved from Ext-Interface
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Wed, 25 May 2016 11:11:32 +0200
parents b8ad346e39a0
children 824b808a7481
comparison
equal deleted inserted replaced
59:bc0219c2600b 60:90d5e86c157d
2 <%@page import="de.mpiwg.gazetteer.bo.LGTopicSectionRelation"%> 2 <%@page import="de.mpiwg.gazetteer.bo.LGTopicSectionRelation"%>
3 <%@page import="org.apache.commons.lang.StringUtils"%> 3 <%@page import="org.apache.commons.lang.StringUtils"%>
4 <%@page import="de.mpiwg.gazetteer.db.DBSection"%> 4 <%@page import="de.mpiwg.gazetteer.db.DBSection"%>
5 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 5 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
6 6
7 <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" /> 7 <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean"
8 scope="session" />
8 9
9 <html> 10 <html>
10 11
11 <head> 12 <head>
12 <jsp:include page="../componentes/headContent.jsp"/> 13 <jsp:include page="../componentes/headContent.jsp" />
13 <script> 14 <script>
14 15
15 $(function() { 16 $(function() {
16 17
17 18
18 $( ".addSectionToTopic" ).click(function() { 19 $( ".addSectionToTopic" ).click(function() {
250 minLength : 0 251 minLength : 0
251 }); 252 });
252 253
253 }); 254 });
254 255
256
257 function updatePage() {
258 var text = getCookie();
259
260 if (text == "1") {
261 setCookie("0");
262 setAction('forceReloadBranches', 'homeForm');
263
264 document.forms['homeForm'].submit();
265 }
266
267 setTimeout(updatePage, 1000);
268 }
269 updatePage();
270
271
272
273
255 </script> 274 </script>
256 </head> 275 </head>
257 276
258 <body> 277 <body>
259 278
260 <jsp:include page="../componentes/template.jsp"/> 279 <jsp:include page="../componentes/template.jsp" />
261 280
262 <div id="dialogAddSectionToTopic" title="Add Section(s) into Topic:"> 281 <div id="dialogAddSectionToTopic" title="Add Section(s) into Topic:">
263 <div id="dialogAddSectionToTopicTable"></div> 282 <div id="dialogAddSectionToTopicTable"></div>
264 </div> 283 </div>
265 284
266 <div id="page"> 285 <div id="page">
267 286
268 <% if(sessionBean.getUser() == null) { %> 287 <%
269 <label class="subTitel">You must login!</label> 288 if (sessionBean.getUser() == null) {
270 <% } else {
271
272 if (sessionBean.getHomePage().getCompleteBranchList() == null){
273 sessionBean.getHomePage().loadParameters(request, response);
274 //sessionBean.getHomePage().reloadBranches();
275 }
276 sessionBean.getHomePage().reloadBranches();
277
278 %> 289 %>
279 290 <label class="subTitel">You must login!</label>
280 291 <%
281 292 } else {
282 293
283 <% if(sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { %> 294 if (sessionBean.getHomePage().getCompleteBranchList() == null) {
284 <label class="subTitel">You have no task!</label> 295 sessionBean.getHomePage().loadParameters(request, response);
285 <% } else { %> 296 //sessionBean.getHomePage().reloadBranches();
286 297 }
287 <form name="homeForm" method="post" 298 sessionBean.getHomePage().reloadBranches();
288 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" > 299 %>
289 <input name="bean" type="hidden" value="homeBean" /> 300
290 301 <%
291 <div class="subTitel">Your Tasks 302 if (sessionBean.getHomePage().getCompleteBranchList().isEmpty()) {
292 <input type="image" 303 %>
293 onclick="setAction('forceReloadBranches', 'homeForm');" 304 <label class="subTitel">You have no task!</label>
294 src="<%=sessionBean.getApplicationBean().getRefreshImage()%>" width="20" height="20"/> 305 <%
295 306 } else {
296 <p class="label">You have <%= sessionBean.getHomePage().getBranchNumber() %> tasks.</p> 307
297 <p class="label"><%= (StringUtils.isNotEmpty(sessionBean.getHomePage().getFilteringMessage())) ? sessionBean.getHomePage().getFilteringMessage() : ""%> </p> 308 %>
298 </div> 309
299 <jsp:include page="../componentes/paginator.jsp"> 310 <form name="homeForm" method="post"
300 <jsp:param name="formName" value="homeForm"/> 311 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp">
301 </jsp:include> 312 <input name="bean" type="hidden" value="homeBean" />
302 313
303 <div class="tableDiv double-scroll"> 314 <div class="subTitel">
304 <table class="pageTable" > 315 Your Tasks <input type="image"
305 <tr> 316 onclick="setAction('forceReloadBranches', 'homeForm');"
306 <!-- remove this to save space 317 src="<%=sessionBean.getApplicationBean()
318 .getRefreshImage()%>"
319 width="20" height="20" />
320
321 <p class="label">
322 You have
323 <%=sessionBean.getHomePage().getBranchNumber()%>
324 tasks.
325 </p>
326 <p class="label"><%=(StringUtils.isNotEmpty(sessionBean.getHomePage()
327 .getFilteringMessage())) ? sessionBean
328 .getHomePage().getFilteringMessage() : ""%>
329 </p>
330 </div>
331 <jsp:include page="../componentes/paginator.jsp">
332 <jsp:param name="formName" value="homeForm" />
333 </jsp:include>
334
335 <div class="tableDiv double-scroll">
336 <table class="pageTable">
337 <tr>
338 <!-- remove this to save space
307 <td> 339 <td>
308 <table class="sortTable"> 340 <table class="sortTable">
309 <tr> 341 <tr>
310 <td><label class="tableTitle">Task ID</label></td> 342 <td><label class="tableTitle">Task ID</label></td>
311 <td> 343 <td>
324 </td> 356 </td>
325 </tr> 357 </tr>
326 </table> 358 </table>
327 </td> 359 </td>
328 --> 360 -->
329 <td> 361 <td>
330 <table class="sortTable"> 362 <table class="sortTable">
331 <tr> 363 <tr>
332 <td><label class="tableTitle">Book ID</label></td> 364 <td><label class="tableTitle">Book ID</label></td>
333 <td> 365 <td>
334 <table> 366 <table>
335 <tr><td> 367 <tr>
336 <input type="image" 368 <td><input type="image"
337 onclick="setAction('sortByBookIdUp', 'homeForm');" 369 onclick="setAction('sortByBookIdUp', 'homeForm');"
338 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 370 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
339 </td></tr> 371 </td>
340 <tr><td> 372 </tr>
341 <input type="image" 373 <tr>
342 onclick="setAction('sortByBookIdDown', 'homeForm');" 374 <td><input type="image"
343 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 375 onclick="setAction('sortByBookIdDown', 'homeForm');"
344 </td></tr> 376 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
345 </table> 377 </td>
346 </td> 378 </tr>
347 </tr> 379 </table>
348 <tr> 380 </td>
349 <td> 381 </tr>
350 <input type="text" name="bookIdFilter" value="<%= sessionBean.getHomePage().getBookIdFilter()%>" size="8"/> 382 <tr>
351 </td> 383 <td><input type="text" name="bookIdFilter"
352 <td> 384 value="<%=sessionBean.getHomePage().getBookIdFilter()%>"
353 <input type="image" 385 size="8" /></td>
354 onclick="setAction('filter', 'homeForm');" 386 <td><input type="image"
355 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 387 onclick="setAction('filter', 'homeForm');"
356 </td> 388 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
357 </tr> 389 </td>
358 </table> 390 </tr>
359 </td> 391 </table>
360 <td> 392 </td>
361 <table class="sortTable"> 393 <td>
362 <tr> 394 <table class="sortTable">
363 <td><label class="tableTitle">Book Name</label></td> 395 <tr>
364 <td> 396 <td><label class="tableTitle">Book Name</label></td>
365 <table> 397 <td>
366 <tr><td> 398 <table>
367 <input type="image" 399 <tr>
368 onclick="setAction('sortByBookNameUp', 'homeForm');" 400 <td><input type="image"
369 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 401 onclick="setAction('sortByBookNameUp', 'homeForm');"
370 </td></tr> 402 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
371 <tr><td> 403 </td>
372 <input type="image" 404 </tr>
373 onclick="setAction('sortByBookNameDown', 'homeForm');" 405 <tr>
374 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 406 <td><input type="image"
375 </td></tr> 407 onclick="setAction('sortByBookNameDown', 'homeForm');"
376 </table> 408 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
377 </td> 409 </td>
378 </tr> 410 </tr>
379 <tr> 411 </table>
380 <td> 412 </td>
381 <input type="text" name="bookNameFilter" id="bookNameFilter" value="<%= sessionBean.getHomePage().getBookNameFilter()%>" size="8"/> 413 </tr>
382 </td> 414 <tr>
383 <td> 415 <td><input type="text" name="bookNameFilter"
384 <input type="image" 416 id="bookNameFilter"
385 onclick="setAction('filter', 'homeForm');" 417 value="<%=sessionBean.getHomePage().getBookNameFilter()%>"
386 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 418 size="8" /></td>
387 </td> 419 <td><input type="image"
388 </tr> 420 onclick="setAction('filter', 'homeForm');"
389 </table> 421 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
390 </td> 422 </td>
391 423 </tr>
392 <td> 424 </table>
393 <table class="sortTable"> 425 </td>
394 <tr> 426
395 <td><label class="tableTitle">Level 1</label></td> 427 <td>
396 <td> 428 <table class="sortTable">
397 <table> 429 <tr>
398 <tr><td> 430 <td><label class="tableTitle">Level 1</label></td>
399 <input type="image" 431 <td>
400 onclick="setAction('sortByLevel1Up', 'homeForm');" 432 <table>
401 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 433 <tr>
402 </td></tr> 434 <td><input type="image"
403 <tr><td> 435 onclick="setAction('sortByLevel1Up', 'homeForm');"
404 <input type="image" 436 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
405 onclick="setAction('sortByLevel1Down', 'homeForm');" 437 </td>
406 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 438 </tr>
407 </td></tr> 439 <tr>
408 </table> 440 <td><input type="image"
409 </td> 441 onclick="setAction('sortByLevel1Down', 'homeForm');"
410 </tr> 442 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
411 <tr> 443 </td>
412 <td> 444 </tr>
413 <input type="text" class="filterInput" name="level1Filter" id="level1Filter" value="<%= sessionBean.getHomePage().getLevel1Filter()%>" size="8"/> 445 </table>
414 </td> 446 </td>
415 <td> 447 </tr>
416 <input type="image" 448 <tr>
417 onclick="setAction('filter', 'homeForm');" 449 <td><input type="text" class="filterInput"
418 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 450 name="level1Filter" id="level1Filter"
419 </td> 451 value="<%=sessionBean.getHomePage().getLevel1Filter()%>"
420 </tr> 452 size="8" /></td>
421 </table> 453 <td><input type="image"
422 </td> 454 onclick="setAction('filter', 'homeForm');"
423 <td> 455 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
424 <table class="sortTable"> 456 </td>
425 <tr> 457 </tr>
426 <td><label class="tableTitle">Level 2</label></td> 458 </table>
427 <td> 459 </td>
428 <table> 460 <td>
429 <tr><td> 461 <table class="sortTable">
430 <input type="image" 462 <tr>
431 onclick="setAction('sortByLevel2Up', 'homeForm');" 463 <td><label class="tableTitle">Level 2</label></td>
432 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 464 <td>
433 </td></tr> 465 <table>
434 <tr><td> 466 <tr>
435 <input type="image" 467 <td><input type="image"
436 onclick="setAction('sortByLevel2Down', 'homeForm');" 468 onclick="setAction('sortByLevel2Up', 'homeForm');"
437 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 469 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
438 </td></tr> 470 </td>
439 </table> 471 </tr>
440 </td> 472 <tr>
441 </tr> 473 <td><input type="image"
442 <tr> 474 onclick="setAction('sortByLevel2Down', 'homeForm');"
443 <td> 475 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
444 <input type="text" name="level2Filter" id="level2Filter" value="<%= sessionBean.getHomePage().getLevel2Filter()%>" size="8"/> 476 </td>
445 </td> 477 </tr>
446 <td> 478 </table>
447 <input type="image" 479 </td>
448 onclick="setAction('filter', 'homeForm');" 480 </tr>
449 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 481 <tr>
450 </td> 482 <td><input type="text" name="level2Filter"
451 </tr> 483 id="level2Filter"
452 </table> 484 value="<%=sessionBean.getHomePage().getLevel2Filter()%>"
453 </td> 485 size="8" /></td>
454 <td> 486 <td><input type="image"
455 <table class="sortTable"> 487 onclick="setAction('filter', 'homeForm');"
456 <tr> 488 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
457 <td><label class="tableTitle">Dynasty</label></td> 489 </td>
458 <td> 490 </tr>
459 <table> 491 </table>
460 <tr><td> 492 </td>
461 <input type="image" 493 <td>
462 onclick="setAction('sortByDynastyUp', 'homeForm');" 494 <table class="sortTable">
463 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 495 <tr>
464 </td></tr> 496 <td><label class="tableTitle">Dynasty</label></td>
465 <tr><td> 497 <td>
466 <input type="image" 498 <table>
467 onclick="setAction('sortByDynastyDown', 'homeForm');" 499 <tr>
468 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 500 <td><input type="image"
469 </td></tr> 501 onclick="setAction('sortByDynastyUp', 'homeForm');"
470 </table> 502 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
471 </td> 503 </td>
472 </tr> 504 </tr>
473 <tr> 505 <tr>
474 <td> 506 <td><input type="image"
475 <input type="text" name="dynastyFilter" id="dynastyFilter" value="<%= sessionBean.getHomePage().getDynastyFilter()%>" size="8"/> 507 onclick="setAction('sortByDynastyDown', 'homeForm');"
476 </td> 508 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
477 <td> 509 </td>
478 <input type="image" 510 </tr>
479 onclick="setAction('filter', 'homeForm');" 511 </table>
480 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 512 </td>
481 </td> 513 </tr>
482 </tr> 514 <tr>
483 </table> 515 <td><input type="text" name="dynastyFilter"
484 </td> 516 id="dynastyFilter"
485 <td> 517 value="<%=sessionBean.getHomePage().getDynastyFilter()%>"
486 <table class="sortTable"> 518 size="8" /></td>
487 <tr> 519 <td><input type="image"
488 <td><label class="tableTitle">Period</label></td> 520 onclick="setAction('filter', 'homeForm');"
489 <td> 521 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
490 <table> 522 </td>
491 <tr><td> 523 </tr>
492 <input type="image" 524 </table>
493 onclick="setAction('sortByPeriodUp', 'homeForm');" 525 </td>
494 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 526 <td>
495 </td></tr> 527 <table class="sortTable">
496 <tr><td> 528 <tr>
497 <input type="image" 529 <td><label class="tableTitle">Period</label></td>
498 onclick="setAction('sortByPeriodDown', 'homeForm');" 530 <td>
499 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 531 <table>
500 </td></tr> 532 <tr>
501 </table> 533 <td><input type="image"
502 </td> 534 onclick="setAction('sortByPeriodUp', 'homeForm');"
503 </tr> 535 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
504 <tr> 536 </td>
505 <td> 537 </tr>
506 <input type="text" name="periodFilter" id="periodFilter" value="<%= sessionBean.getHomePage().getPeriodFilter()%>" size="8"/> 538 <tr>
507 </td> 539 <td><input type="image"
508 <td> 540 onclick="setAction('sortByPeriodDown', 'homeForm');"
509 <input type="image" 541 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
510 onclick="setAction('filter', 'homeForm');" 542 </td>
511 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 543 </tr>
512 </td> 544 </table>
513 </tr> 545 </td>
514 </table> 546 </tr>
515 </td> 547 <tr>
516 <td> 548 <td><input type="text" name="periodFilter"
517 <table class="sortTable"> 549 id="periodFilter"
518 <tr> 550 value="<%=sessionBean.getHomePage().getPeriodFilter()%>"
519 <td><label class="tableTitle">Admin Type</label></td> 551 size="8" /></td>
520 <td> 552 <td><input type="image"
521 <table> 553 onclick="setAction('filter', 'homeForm');"
522 <tr><td> 554 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
523 <input type="image" 555 </td>
524 onclick="setAction('sortByAdminTypeUp', 'homeForm');" 556 </tr>
525 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 557 </table>
526 </td></tr> 558 </td>
527 <tr><td> 559 <td>
528 <input type="image" 560 <table class="sortTable">
529 onclick="setAction('sortByAdminTypeDown', 'homeForm');" 561 <tr>
530 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 562 <td><label class="tableTitle">Admin Type</label></td>
531 </td></tr> 563 <td>
532 </table> 564 <table>
533 </td> 565 <tr>
534 </tr> 566 <td><input type="image"
535 <tr> 567 onclick="setAction('sortByAdminTypeUp', 'homeForm');"
536 <td> 568 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
537 <input type="text" name="adminTypeFilter" id="adminTypeFilter" value="<%= sessionBean.getHomePage().getAdminTypeFilter()%>" size="8"/> 569 </td>
538 </td> 570 </tr>
539 <td> 571 <tr>
540 <input type="image" 572 <td><input type="image"
541 onclick="setAction('filter', 'homeForm');" 573 onclick="setAction('sortByAdminTypeDown', 'homeForm');"
542 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 574 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
543 </td> 575 </td>
544 </tr> 576 </tr>
545 </table> 577 </table>
546 </td> 578 </td>
547 <td> 579 </tr>
548 <table class="sortTable"> 580 <tr>
549 <tr> 581 <td><input type="text" name="adminTypeFilter"
550 <td><label class="tableTitle">Section Name</label></td> 582 id="adminTypeFilter"
551 <td> 583 value="<%=sessionBean.getHomePage().getAdminTypeFilter()%>"
552 <table> 584 size="8" /></td>
553 <tr><td> 585 <td><input type="image"
554 <input type="image" 586 onclick="setAction('filter', 'homeForm');"
555 onclick="setAction('sortBySectionNameUp', 'homeForm');" 587 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
556 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 588 </td>
557 </td></tr> 589 </tr>
558 <tr><td> 590 </table>
559 <input type="image" 591 </td>
560 onclick="setAction('sortBySectionNameDown', 'homeForm');" 592 <td>
561 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 593 <table class="sortTable">
562 </td></tr> 594 <tr>
563 </table> 595 <td><label class="tableTitle">Section Name</label></td>
564 </td> 596 <td>
565 </tr> 597 <table>
566 <tr> 598 <tr>
567 <td> 599 <td><input type="image"
568 <input type="text" name="sectionNameFilter" id="sectionNameFilter" value="<%= sessionBean.getHomePage().getSectionNameFilter()%>" size="8"/> 600 onclick="setAction('sortBySectionNameUp', 'homeForm');"
569 </td> 601 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
570 <td> 602 </td>
571 <input type="image" 603 </tr>
572 onclick="setAction('filter', 'homeForm');" 604 <tr>
573 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 605 <td><input type="image"
574 </td> 606 onclick="setAction('sortBySectionNameDown', 'homeForm');"
575 </tr> 607 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
576 </table> 608 </td>
577 </td> 609 </tr>
578 <td> 610 </table>
579 <table class="sortTable"> 611 </td>
580 <tr> 612 </tr>
581 <td><label class="tableTitle">Pages</label></td> 613 <tr>
582 <td> 614 <td><input type="text" name="sectionNameFilter"
583 <table> 615 id="sectionNameFilter"
584 <tr><td> 616 value="<%=sessionBean.getHomePage().getSectionNameFilter()%>"
585 <input type="image" 617 size="8" /></td>
586 onclick="setAction('sortBySectionStartPageUp', 'homeForm');" 618 <td><input type="image"
587 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 619 onclick="setAction('filter', 'homeForm');"
588 </td></tr> 620 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
589 <tr><td> 621 </td>
590 <input type="image" 622 </tr>
591 onclick="setAction('sortBySectionStartPageDown', 'homeForm');" 623 </table>
592 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 624 </td>
593 </td></tr> 625 <td>
594 </table> 626 <table class="sortTable">
595 </td> 627 <tr>
596 </tr> 628 <td><label class="tableTitle">Pages</label></td>
597 </table> 629 <td>
598 </td> 630 <table>
599 <td> 631 <tr>
600 <table class="sortTable"> 632 <td><input type="image"
601 <tr> 633 onclick="setAction('sortBySectionStartPageUp', 'homeForm');"
602 <td><label class="tableTitle">Label</label></td> 634 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
603 <td> 635 </td>
604 <table> 636 </tr>
605 <tr><td> 637 <tr>
606 <input type="image" 638 <td><input type="image"
607 onclick="setAction('sortByLabelUp', 'homeForm');" 639 onclick="setAction('sortBySectionStartPageDown', 'homeForm');"
608 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 640 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
609 </td></tr> 641 </td>
610 <tr><td> 642 </tr>
611 <input type="image" 643 </table>
612 onclick="setAction('sortByLabelDown', 'homeForm');" 644 </td>
613 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 645 </tr>
614 </td></tr> 646 </table>
615 </table> 647 </td>
616 </td> 648 <td>
617 </tr> 649 <table class="sortTable">
618 <tr> 650 <tr>
619 <td> 651 <td><label class="tableTitle">Label</label></td>
620 <input type="text" name="labelFilter" id="labelFilter" size="20" value="<%= sessionBean.getHomePage().getLabelFilter()%>" size="8"/> 652 <td>
621 </td> 653 <table>
622 <td> 654 <tr>
623 <input type="image" 655 <td><input type="image"
624 onclick="setAction('filter', 'homeForm');" 656 onclick="setAction('sortByLabelUp', 'homeForm');"
625 src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> 657 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
626 </td> 658 </td>
627 </tr> 659 </tr>
628 </table> 660 <tr>
629 </td> 661 <td><input type="image"
630 <td><label class="tableTitle">Contributors</label></td> 662 onclick="setAction('sortByLabelDown', 'homeForm');"
631 <td> 663 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
632 <table class="sortTable"> 664 </td>
633 <tr> 665 </tr>
634 <td><label class="tableTitle">Last Saved</label></td> 666 </table>
635 <td> 667 </td>
636 <table> 668 </tr>
637 <tr><td> 669 <tr>
638 <input type="image" 670 <td><input type="text" name="labelFilter" id="labelFilter"
639 onclick="setAction('sortByLastModifiedUp', 'homeForm');" 671 size="20"
640 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 672 value="<%=sessionBean.getHomePage().getLabelFilter()%>"
641 </td></tr> 673 size="8" /></td>
642 <tr><td> 674 <td><input type="image"
643 <input type="image" 675 onclick="setAction('filter', 'homeForm');"
644 onclick="setAction('sortByLastModifiedDown', 'homeForm');" 676 src="<%=sessionBean.getApplicationBean().getFilterImage()%>" />
645 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 677 </td>
646 </td></tr> 678 </tr>
647 </table> 679 </table>
648 </td> 680 </td>
649 </tr> 681 <td><label class="tableTitle">Contributors</label></td>
650 682 <td>
651 </table> 683 <table class="sortTable">
652 </td> 684 <tr>
653 <td><label class="tableTitle">Load Text</label></td> 685 <td><label class="tableTitle">Last Saved</label></td>
654 <td> 686 <td>
655 <table class="sortTable"> 687 <table>
656 <tr> 688 <tr>
657 <td><label class="tableTitle">Published in Dataverse</label></td> 689 <td><input type="image"
658 <td> 690 onclick="setAction('sortByLastModifiedUp', 'homeForm');"
659 <table> 691 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
660 <tr><td> 692 </td>
661 <input type="image" 693 </tr>
662 onclick="setAction('sortByPublishedInDataverseUp', 'homeForm');" 694 <tr>
663 src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> 695 <td><input type="image"
664 </td></tr> 696 onclick="setAction('sortByLastModifiedDown', 'homeForm');"
665 <tr><td> 697 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
666 <input type="image" 698 </td>
667 onclick="setAction('sortByPublishedInDataverseDown', 'homeForm');" 699 </tr>
668 src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> 700 </table>
669 </td></tr> 701 </td>
670 </table> 702 </tr>
671 </td> 703
672 </tr> 704 </table>
673 705 </td>
674 </table> 706 <td><label class="tableTitle">Load Text</label></td>
675 707 <td>
676 </td> 708 <table class="sortTable">
677 709 <tr>
678 <td><label class="tableTitle">Manage</label></td> 710 <td><label class="tableTitle">Published in
679 <td><label class="tableTitle">Add to Topic</label></td> 711 Dataverse</label></td>
680 <td><label class="tableTitle">Delete</label></td> 712 <td>
681 </tr> 713 <table>
682 714 <tr>
683 <% for (LGBranch branch : sessionBean.getHomePage().getDisplayBranchList() ) { 715 <td><input type="image"
684 %> 716 onclick="setAction('sortByPublishedInDataverseUp', 'homeForm');"
685 <tr> 717 src="<%=sessionBean.getApplicationBean().getUpImage()%>" />
686 <td><%=branch.getBook().getId() %></td> 718 </td>
687 <td><%=branch.getBook().getName() %></td> 719 </tr>
688 <td><%=branch.getBook().getLevel1() %></td> 720 <tr>
689 <td><%=branch.getBook().getLevel2() %></td> 721 <td><input type="image"
690 <td><%=branch.getBook().getDynasty() %></td> 722 onclick="setAction('sortByPublishedInDataverseDown', 'homeForm');"
691 <td><%=branch.getBook().getPeriod() %></td> 723 src="<%=sessionBean.getApplicationBean().getDownImage()%>" />
692 <td><%=branch.getBook().getAdmin_type() %></td> 724 </td>
693 <td><%=branch.getSection().getName() %> 725 </tr>
694 <% if (branch.isDeprecated()) { %> 726 </table>
695 <label style="color:red">*** This is a deprecated section ***</label> 727 </td>
696 <% } %> 728 </tr>
697 </td> 729
698 <td><%=branch.getSection().getPages() %></td> 730 </table>
699 731
700 <td><%=branch.getLabel() %></td> 732 </td>
701 <td> 733
702 <table style="width:120px;"> 734 <td><label class="tableTitle">Manage</label></td>
703 <% for(String contributor : branch.getContributorsNameList()) { %> 735 <td><label class="tableTitle">Add to Topic</label></td>
704 <tr><td><label><%= contributor %></label></td></tr> 736 <td><label class="tableTitle">Delete</label></td>
705 <% } %> 737 </tr>
706 </table> 738
707 </td> 739 <%
708 <td><%=branch.getFomattedLastChange() %></td> 740 for (LGBranch branch : sessionBean.getHomePage()
709 <td> 741 .getDisplayBranchList()) {
710 <a onclick="branchInExtractionInterface('<%=branch.getId() %>', '<%=branch.getCurrentLastFileId() %>', '<%=branch.getSectionId() %>', '<%=branch.getSection().getName() %>', '<%=branch.getBook().getId() %>', '<%=branch.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');"> 742 %>
711 <img title="Show Task in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/> 743 <tr>
712 </a> 744 <td><%=branch.getBook().getId()%></td>
713 </td> 745 <td><%=branch.getBook().getName()%></td>
714 <!-- Dataverse --> 746 <td><%=branch.getBook().getLevel1()%></td>
715 <td> 747 <td><%=branch.getBook().getLevel2()%></td>
716 <%= (branch.isPublished()) ? "V":"" %> 748 <td><%=branch.getBook().getDynasty()%></td>
717 </td> 749 <td><%=branch.getBook().getPeriod()%></td>
718 750 <td><%=branch.getBook().getAdmin_type()%></td>
719 <!-- Manage --> 751 <td><%=branch.getSection().getName()%> <%
720 <td> 752 if (branch.isDeprecated()) {
721 <a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/branchPage.jsp?branchId=<%=branch.getId() %>" > 753 %>
722 <img title="Manage the task" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/> 754 <label style="color: red">*** This is a deprecated
723 </a> 755 section ***</label> <%
724 </td> 756 }
725 757 %></td>
726 <!-- Add to Topic --> 758 <td><%=branch.getSection().getPages()%></td>
727 <td style="max-width:300px;"> 759
728 <!-- existing topic --> 760 <td><%=branch.getLabel()%></td>
729 <% if(branch.getSection().getTopicSectionRelation() != null && !branch.getSection().getTopicSectionRelation().isEmpty()) { %> 761 <td>
730 <lable>Already in topic: </lable> 762 <table style="width: 120px;">
731 <table style="width:100%"> 763 <%
732 <% for(LGTopicSectionRelation relation : branch.getSection().getTopicSectionRelation()) { %> 764 for (String contributor : branch
733 <tr> 765 .getContributorsNameList()) {
734 <td> 766 %>
735 <table style="width:100%; min-width:100px"> 767 <tr>
736 <tr><td><%=relation.getTopic().info() %></td></tr> 768 <td><label><%=contributor%></label></td>
737 </table> 769 </tr>
738 </td> 770 <%
739 <td style="max-width:150px"> 771 }
740 772 %>
741 <a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/topicPage.jsp?topicId=<%=relation.getTopicId() %>" > 773 </table>
742 <img title="Manage Topic" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/> 774 </td>
743 </a> 775 <td><%=branch.getFomattedLastChange()%></td>
744 776 <td><a
745 </td> 777 onclick="branchInExtractionInterface('<%=branch.getId()%>', '<%=branch.getCurrentLastFileId()%>', '<%=branch.getSectionId()%>', '<%=branch.getSection().getName()%>', '<%=branch.getBook().getId()%>', '<%=branch.getBook().getName()%>', '<%=sessionBean.getUser().getId()%>', '<%=sessionBean.getApplicationBean()
746 </tr> 778 .getExtractionInterfaceUrl()%>');">
747 <% } %> 779 <img title="Show Task in Extraction Interface"
748 </table> 780 src="<%=sessionBean.getApplicationBean()
749 <% } %> 781 .getShowImage()%>" />
750 782 </a></td>
751 <img width="10" height="10" title="Add the section to Topic" src="<%=sessionBean.getApplicationBean().getPlusImage()%>" data-section-id="<%=branch.getSection().getId()%>" class="addSectionToTopic"> 783 <!-- Dataverse -->
752 784 <td><%=(branch.isPublished()) ? "V" : ""%></td>
753 </td> 785
754 786 <!-- Manage -->
755 <!-- Delete --> 787 <td><a
756 <td> 788 href="<%=sessionBean.getApplicationBean()
757 <input type="image" title="Delete it" 789 .getRootServer()%>/pages/branchPage.jsp?branchId=<%=branch.getId()%>">
758 onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> deleteBranch('deleteBranch', 'homeForm', '<%=branch.getId() %>');" 790 <img title="Manage the task"
759 src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/> 791 src="<%=sessionBean.getApplicationBean()
760 </td> 792 .getEditBranchImage()%>" />
761 793 </a></td>
762 794
763 </tr> 795 <!-- Add to Topic -->
764 796 <td style="max-width: 300px;">
765 <% } %> 797 <!-- existing topic --> <%
766 798 if (branch.getSection().getTopicSectionRelation() != null
767 </table> 799 && !branch.getSection()
768 800 .getTopicSectionRelation().isEmpty()) {
769 </div> 801 %>
770 802 <lable>Already in topic: </lable>
771 803 <table style="width: 100%">
772 <jsp:include page="../componentes/paginator.jsp"> 804 <%
773 <jsp:param name="formName" value="homeForm"/> 805 for (LGTopicSectionRelation relation : branch
774 </jsp:include> 806 .getSection().getTopicSectionRelation()) {
775 807 %>
776 </form> 808 <tr>
777 <% } %> 809 <td>
778 <% } %> 810 <table style="width: 100%; min-width: 100px">
811 <tr>
812 <td><%=relation.getTopic().info()%></td>
813 </tr>
814 </table>
815 </td>
816 <td style="max-width: 150px"><a
817 href="<%=sessionBean.getApplicationBean()
818 .getRootServer()%>/pages/topicPage.jsp?topicId=<%=relation.getTopicId()%>">
819 <img title="Manage Topic"
820 src="<%=sessionBean.getApplicationBean()
821 .getEditBranchImage()%>" />
822 </a></td>
823 </tr>
824 <%
825 }
826 %>
827 </table> <%
828 }
829 %> <img width="10" height="10"
830 title="Add the section to Topic"
831 src="<%=sessionBean.getApplicationBean()
832 .getPlusImage()%>"
833 data-section-id="<%=branch.getSection().getId()%>"
834 class="addSectionToTopic">
835
836 </td>
837
838 <!-- Delete -->
839 <td><input type="image" title="Delete it"
840 onclick="<%=sessionBean.getApplicationBean()
841 .getJSConfirmationDelete()%> deleteBranch('deleteBranch', 'homeForm', '<%=branch.getId()%>');"
842 src="<%=sessionBean.getApplicationBean()
843 .getDeleteImage()%>" /></td>
844
845
846 </tr>
847
848 <%
849 }
850 %>
851
852 </table>
853
854 </div>
855
856
857 <jsp:include page="../componentes/paginator.jsp">
858 <jsp:param name="formName" value="homeForm" />
859 </jsp:include>
860
861 </form>
862 <%
863 }
864 %>
865 <%
866 }
867 %>
779 </div> 868 </div>
780 869
781 </body> 870 </body>