| @@ 80-93 (lines=14) @@ | ||
| 77 | * | |
| 78 | * @return string Generated output | |
| 79 | */ | |
| 80 | public function copyAction() | |
| 81 | 	{ | |
| 82 | 		if( config( 'shop.authorize', true ) ) { | |
| 83 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 84 | } | |
| 85 | ||
| 86 | $cntl = $this->createAdmin(); | |
| 87 | ||
| 88 | 		if( ( $html = $cntl->copy() ) == '' ) { | |
| 89 | return $cntl->getView()->response(); | |
| 90 | } | |
| 91 | ||
| 92 | return $this->getHtml( $html ); | |
| 93 | } | |
| 94 | ||
| 95 | ||
| 96 | /** | |
| @@ 101-114 (lines=14) @@ | ||
| 98 | * | |
| 99 | * @return string Generated output | |
| 100 | */ | |
| 101 | public function createAction() | |
| 102 | 	{ | |
| 103 | 		if( config( 'shop.authorize', true ) ) { | |
| 104 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 105 | } | |
| 106 | ||
| 107 | $cntl = $this->createAdmin(); | |
| 108 | ||
| 109 | 		if( ( $html = $cntl->create() ) == '' ) { | |
| 110 | return $cntl->getView()->response(); | |
| 111 | } | |
| 112 | ||
| 113 | return $this->getHtml( $html ); | |
| 114 | } | |
| 115 | ||
| 116 | ||
| 117 | /** | |
| @@ 122-135 (lines=14) @@ | ||
| 119 | * | |
| 120 | * @return string Generated output | |
| 121 | */ | |
| 122 | public function deleteAction() | |
| 123 | 	{ | |
| 124 | 		if( config( 'shop.authorize', true ) ) { | |
| 125 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 126 | } | |
| 127 | ||
| 128 | $cntl = $this->createAdmin(); | |
| 129 | ||
| 130 | 		if( ( $html = $cntl->delete() ) == '' ) { | |
| 131 | return $cntl->getView()->response(); | |
| 132 | } | |
| 133 | ||
| 134 | return $this->getHtml( $html ); | |
| 135 | } | |
| 136 | ||
| 137 | ||
| 138 | /** | |
| @@ 143-156 (lines=14) @@ | ||
| 140 | * | |
| 141 | * @return string Generated output | |
| 142 | */ | |
| 143 | public function exportAction() | |
| 144 | 	{ | |
| 145 | 		if( config( 'shop.authorize', true ) ) { | |
| 146 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 147 | } | |
| 148 | ||
| 149 | $cntl = $this->createAdmin(); | |
| 150 | ||
| 151 | 		if( ( $html = $cntl->export() ) == '' ) { | |
| 152 | return $cntl->getView()->response(); | |
| 153 | } | |
| 154 | ||
| 155 | return $this->getHtml( $html ); | |
| 156 | } | |
| 157 | ||
| 158 | ||
| 159 | /** | |
| @@ 164-177 (lines=14) @@ | ||
| 161 | * | |
| 162 | * @return string Generated output | |
| 163 | */ | |
| 164 | public function getAction() | |
| 165 | 	{ | |
| 166 | 		if( config( 'shop.authorize', true ) ) { | |
| 167 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 168 | } | |
| 169 | ||
| 170 | $cntl = $this->createAdmin(); | |
| 171 | ||
| 172 | 		if( ( $html = $cntl->get() ) == '' ) { | |
| 173 | return $cntl->getView()->response(); | |
| 174 | } | |
| 175 | ||
| 176 | return $this->getHtml( $html ); | |
| 177 | } | |
| 178 | ||
| 179 | ||
| 180 | /** | |
| @@ 185-198 (lines=14) @@ | ||
| 182 | * | |
| 183 | * @return string Generated output | |
| 184 | */ | |
| 185 | public function saveAction() | |
| 186 | 	{ | |
| 187 | 		if( config( 'shop.authorize', true ) ) { | |
| 188 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 189 | } | |
| 190 | ||
| 191 | $cntl = $this->createAdmin(); | |
| 192 | ||
| 193 | 		if( ( $html = $cntl->save() ) == '' ) { | |
| 194 | return $cntl->getView()->response(); | |
| 195 | } | |
| 196 | ||
| 197 | return $this->getHtml( $html ); | |
| 198 | } | |
| 199 | ||
| 200 | ||
| 201 | /** | |
| @@ 206-219 (lines=14) @@ | ||
| 203 | * | |
| 204 | * @return string Generated output | |
| 205 | */ | |
| 206 | public function searchAction() | |
| 207 | 	{ | |
| 208 | 		if( config( 'shop.authorize', true ) ) { | |
| 209 | $this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] ); | |
| 210 | } | |
| 211 | ||
| 212 | $cntl = $this->createAdmin(); | |
| 213 | ||
| 214 | 		if( ( $html = $cntl->search() ) == '' ) { | |
| 215 | return $cntl->getView()->response(); | |
| 216 | } | |
| 217 | ||
| 218 | return $this->getHtml( $html ); | |
| 219 | } | |
| 220 | ||
| 221 | ||
| 222 | /** | |