CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

TransportControlsUI.php
Go to the documentation of this file.
1 <?PHP
2 #
3 # FILE: TransportControlsUI.php
4 #
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2015 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis/
8 #
9
18 class TransportControlsUI extends TransportControlsUI_Base
19 {
20 # ---- PUBLIC INTERFACE --------------------------------------------------
21
22 # parameter ($_GET) variable names
23 const PNAME_REVERSESORT = "RS";
24 const PNAME_SORTFIELD = "SF";
25 const PNAME_STARTINGINDEX = "SI";
26 const PNAME_ACTIVETAB = "AT";
27
35 public function PrintControls($ItemType, $BaseLink, $Message = "")
36 {
37 $this->SetItemType($ItemType);
38 $this->SetBaseLink($BaseLink);
39
40 if ($this->ShowAnyReverseButtons()
41 || $this->ShowAnyForwardButtons()
42 || strlen($Message))
43 {
44 if($this->ShowAnyReverseButtons() || $this->ShowAnyForwardButtons())
45 {
46 ?><div class="cw-transport-controls clearfix">
47 <?PHP
48 if ($this->ShowAnyReverseButtons())
49 {
50 ?><div class="cw-transport-controls-left">
51 <a class="StyledButton NavStyledButton"
52 href="<?PHP print $this->GoToStartLink(); ?>"
53 title="Go to first page">&#124;<span
54 style="position:relative; bottom: 1px;">&lt;</span></a>
55 <?PHP
56
57 if ($this->ShowFastReverseButton())
58 {
59 ?><a class="StyledButton NavStyledButton"
60 href="<?PHP print $this->FastReverseLink(); ?>"
61 title="Jump back">&lt;&lt;</a> <?PHP
62 }
63
64 if ($this->ShowReverseButton())
65 {
66 ?><a class="StyledButton NavStyledButton"
67 href="<?PHP print $this->ReverseLink(); ?>"
68 title="Go to previous page">&lt;</a> <?PHP
69 }
70
71 ?></div><?PHP
72 }
73
74 if ($this->ShowAnyForwardButtons())
75 {
76 ?><div class="cw-transport-controls-right">
77 <?PHP
78
79 if ($this->ShowForwardButton())
80 {
81 ?><a class="StyledButton NavStyledButton"
82 href="<?PHP print $this->ForwardLink(); ?>"
83 title="Go to next page">&gt;</a> <?PHP
84 }
85
86 if ($this->ShowFastForwardButton())
87 {
88 ?><a class="StyledButton NavStyledButton"
89 href="<?PHP print $this->FastForwardLink(); ?>"
90 title="Jump forward">&gt;&gt;</a> <?PHP
91 }
92
93 ?><a class="StyledButton NavStyledButton"
94 href="<?PHP print $this->GoToEndLink(); ?>"
95 title="Go to last page">&gt;<span
96 style="position:relative; bottom: 1px;">&#124;</span></a>
97 </div><?PHP
98 }
99
100 if($this->ShowAnyReverseButtons() && !$this->ShowAnyForwardButtons())
101 {
102 ?><div class="cw-transport-controls-msg-left-only clearfix"><?PHP
103 print strlen($Message) ? $Message : "&nbsp;";
104 ?></div><?PHP
105 }
106 elseif(!$this->ShowAnyReverseButtons()
107 && $this->ShowAnyForwardButtons())
108 {
109 ?><div class="cw-transport-controls-msg-right-only clearfix"><?PHP
110 print strlen($Message) ? $Message : "&nbsp;";
111 ?></div><?PHP
112 }
113 else
114 {
115 ?><div class="cw-transport-controls-msg clearfix"><?PHP
116 print strlen($Message) ? $Message : "&nbsp;";
117 ?></div><?PHP
118 }
119
120 ?></div><?PHP
121 }
122 else
123 {
124 print strlen($Message) ? $Message : "&nbsp;";
125 }
126 }
127 }
128 }
129
TransportControlsUI_Base\ShowForwardButton
ShowForwardButton()
Report whether forward button should be displayed.
Definition: TransportControlsUI_Base.php:505
TransportControlsUI_Base\ShowAnyForwardButtons
ShowAnyForwardButtons()
Report whether any forward buttons should be displayed.
Definition: TransportControlsUI_Base.php:478
TransportControlsUI\PNAME_ACTIVETAB
const PNAME_ACTIVETAB
Definition: TransportControlsUI.php:26
PHP
PHP
Definition: RSSClient--Test.php:12
TransportControlsUI_Base
Class to provide support for transport controls (used for paging back and forth through a list) in th...
Definition: TransportControlsUI_Base.php:18
TransportControlsUI
Class to provide support for transport controls (used for paging back and forth through a list) in th...
Definition: TransportControlsUI.php:18
TransportControlsUI_Base\ShowReverseButton
ShowReverseButton()
Report whether reverse button should be displayed.
Definition: TransportControlsUI_Base.php:519
TransportControlsUI\PNAME_SORTFIELD
const PNAME_SORTFIELD
Definition: TransportControlsUI.php:24
TransportControlsUI_Base\ShowAnyReverseButtons
ShowAnyReverseButtons()
Report whether any reverse buttons should be displayed.
Definition: TransportControlsUI_Base.php:493
TransportControlsUI_Base\ShowFastReverseButton
ShowFastReverseButton()
Report whether fast reverse button should be displayed.
Definition: TransportControlsUI_Base.php:549
TransportControlsUI_Base\SetBaseLink
SetBaseLink($BaseLink)
Set current base link for Link methods.
Definition: TransportControlsUI_Base.php:466
TransportControlsUI_Base\ShowFastForwardButton
ShowFastForwardButton()
Report whether fast forward button should be displayed.
Definition: TransportControlsUI_Base.php:533
TransportControlsUI\PrintControls
PrintControls($ItemType, $BaseLink, $Message="")
Print transport control HTML.
Definition: TransportControlsUI.php:35
TransportControlsUI_Base\SetItemType
SetItemType($ItemType)
Set current item type for Show or Link methods.
Definition: TransportControlsUI_Base.php:457
TransportControlsUI\PNAME_STARTINGINDEX
const PNAME_STARTINGINDEX
Definition: TransportControlsUI.php:25
TransportControlsUI\PNAME_REVERSESORT
const PNAME_REVERSESORT
Definition: TransportControlsUI.php:23