Mercurial > hg > extraction-interface
comparison controllers/extractapp.php @ 91:3e11a9c5a672 extractapp
new: explore table for using on LGMap
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Mon, 14 Sep 2015 14:37:29 +0200 |
| parents | e681d693240e |
| children | b0cecc104639 |
comparison
equal
deleted
inserted
replaced
| 90:94ad33739fa4 | 91:3e11a9c5a672 |
|---|---|
| 152 | 152 |
| 153 | 153 |
| 154 } | 154 } |
| 155 | 155 |
| 156 | 156 |
| 157 protected function ExportTabDelimited() { | |
| 158 /** | |
| 159 * ExportTable action returns "./views/Extractapp/ExportTabDelimited.php" view. | |
| 160 * ExportTabDelimited.php is using tab as delimiter. | |
| 161 */ | |
| 162 $viewmodel = $this->viewmodel; | |
| 163 | |
| 164 if (isset($this->postdata['fileId'])) { | |
| 165 $viewmodel->SetInfoFromPreviousPage($this->postdata); // fileId in postdata | |
| 166 | |
| 167 $viewmodel->SetTextFromFileId(); // this will also set section_id | |
| 168 $viewmodel->SetBookMetadataBySectionId(); | |
| 169 } | |
| 170 | |
| 171 $this->ReturnView($viewmodel->ExportTable($this->postdata, true), false); | |
| 172 | |
| 173 | |
| 174 } | |
| 175 | |
| 157 protected function ExportTable() { | 176 protected function ExportTable() { |
| 158 /** | 177 /** |
| 159 * ExportTable action returns "./views/Extractapp/ExportTable.php" view. | 178 * ExportTable action returns "./views/Extractapp/ExportTable.php" view. |
| 160 */ | 179 */ |
| 161 $viewmodel = $this->viewmodel; | 180 $viewmodel = $this->viewmodel; |
| 165 } else { | 184 } else { |
| 166 $func = ""; | 185 $func = ""; |
| 167 } | 186 } |
| 168 switch ($func) { | 187 switch ($func) { |
| 169 case 'exportFromExtractionInterface': | 188 case 'exportFromExtractionInterface': |
| 189 $viewmodel->SetInfoFromPreviousPage($this->postdata); | |
| 190 | |
| 170 $this->ReturnView($viewmodel->ExportTable($this->postdata, false), true); | 191 $this->ReturnView($viewmodel->ExportTable($this->postdata, false), true); |
| 171 break; | 192 break; |
| 172 | 193 |
| 173 default: // from file | 194 default: // from file |
| 174 $viewmodel->SetInfoFromPreviousPage($this->postdata); | 195 // exportFromLGServicesHtmlTable |
| 175 $viewmodel->SetTextFromFileId(); | 196 if (isset($this->postdata['fileId'])) { |
| 176 $this->ReturnView($viewmodel->ExportTable($this->postdata, true), true); | 197 $viewmodel->SetInfoFromPreviousPage($this->postdata); // only fileId in postdata |
| 177 break; | 198 |
| 178 | 199 $viewmodel->SetTextFromFileId(); // this will also set section_id |
| 179 } | 200 $viewmodel->SetBookMetadataBySectionId(); |
| 201 } | |
| 202 | |
| 203 $this->ReturnView($viewmodel->ExportTable($this->postdata, true), false); | |
| 204 break; | |
| 205 | |
| 206 } | |
| 207 | |
| 208 | |
| 180 | 209 |
| 181 } | 210 } |
| 182 | 211 |
| 183 protected function EditWordlist() { | 212 protected function EditWordlist() { |
| 184 /** | 213 /** |
