24 require_once(
"./Modules/LearningModule/classes/class.ilBibItem.php");
52 $lng->loadLanguageModule(
"bibitem");
62 $this->obj->initBibItemObject();
63 $this->bib_obj = $this->obj->bib_obj;
64 # echo $this->bib_obj->getXML();
72 if(is_object($this->meta_obj))
75 return $this->meta_obj->$method();
90 foreach($languages as $code => $text)
92 $tpl->setCurrentBlock(
"lg_option");
93 $tpl->setVariable(
"VAL_LG", $code);
94 $tpl->setVariable(
"TXT_LG", $text);
98 $tpl->setVariable(
"SELECTED",
"selected");
100 $tpl->parseCurrentBlock();
102 $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
103 $tpl->setVariable(
"SEL_NAME", $a_name);
104 $return =
$tpl->get();
110 function fill($a_formaction, $a_index = 0, $a_language =
"")
112 $this->tpl->setVariable(
"TXT_BIBITEM", $this->lng->txt(
"bibitem_bibitem"));
113 $this->tpl->setVariable(
"BIBITEM_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
114 $this->tpl->setVariable(
"BIBITEM_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemName=BibItem");
115 $this->tpl->setVariable(
"BIBITEM_TXT_ADD", $this->lng->txt(
"bibitem_add"));
116 $this->tpl->setVariable(
"BIBITEM_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=BibItem");
117 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"bibitem_new_element"));
118 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"bibitem_language"));
119 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"bibitem_author"));
120 $this->tpl->setVariable(
"TXT_CROSSREF", $this->lng->txt(
"bibitem_cross_reference"));
121 $this->tpl->setVariable(
"TXT_EDITOR", $this->lng->txt(
"bibitem_editor"));
122 $this->tpl->setVariable(
"TXT_WHERE_PUBLISHED", $this->lng->txt(
"bibitem_where_published"));
123 $this->tpl->setVariable(
"TXT_INSTITUTION", $this->lng->txt(
"bibitem_institution"));
124 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"bibitem_keyword"));
125 $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"bibitem_school"));
126 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"bibitem_add"));
128 $bibitem = $this->bib_obj->getElement(
"BibItem");
129 $this->tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"bibitem_type"));
130 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"bibitem_please_select"));
131 $this->tpl->setVariable(
"TXT_BOOK", $this->lng->txt(
"bibitem_book"));
132 $this->tpl->setVariable(
"TXT_INBOOK", $this->lng->txt(
"bibitem_inbook"));
133 $this->tpl->setVariable(
"TXT_JOURNALARTICLE", $this->lng->txt(
"bibitem_journal_article"));
134 $this->tpl->setVariable(
"TXT_PROCEEDINGS", $this->lng->txt(
"bibitem_proceedings"));
135 $this->tpl->setVariable(
"TXT_INPROCEEDINGS", $this->lng->txt(
"bibitem_inproceedings"));
136 $this->tpl->setVariable(
"TXT_DISSERTATION", $this->lng->txt(
"bibitem_dissertation"));
137 $this->tpl->setVariable(
"TXT_PHDTHESIS", $this->lng->txt(
"bibitem_phd_thesis"));
138 $this->tpl->setVariable(
"TXT_MASTERSTHESIS", $this->lng->txt(
"bibitem_master_thesis"));
139 $this->tpl->setVariable(
"TXT_TECHREPORT", $this->lng->txt(
"bibitem_technical_report"));
140 $this->tpl->setVariable(
"TXT_MANUAL", $this->lng->txt(
"bibitem_manual"));
141 $this->tpl->setVariable(
"TXT_NEWSPAPERARTICLE", $this->lng->txt(
"bibitem_newspaper_article"));
142 $this->tpl->setVariable(
"TXT_AV", $this->lng->txt(
"bibitem_av"));
143 $this->tpl->setVariable(
"TXT_INTERNET", $this->lng->txt(
"bibitem_internet"));
144 $this->tpl->setVariable(
"TXT_UNPUBLISHED", $this->lng->txt(
"bibitem_unpublished"));
147 $this->tpl->setVariable(
"TXT_LABEL", $this->lng->txt(
"bibitem_label"));
150 $identifier = $this->bib_obj->getElement(
"Identifier",
"BibItem[" . ($a_index+1) .
"]");
151 $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"bibitem_identifier"));
152 $this->tpl->setVariable(
"TXT_CATALOG", $this->lng->txt(
"bibitem_catalog"));
154 $this->tpl->setVariable(
"TXT_ENTRY", $this->lng->txt(
"bibitem_entry"));
158 if (is_array($language = $this->bib_obj->getElement(
"Language",
"BibItem[" . ($a_index+1) .
"]")) &&
159 count($language) > 0)
161 for ($i = 0; $i < count($language); $i++)
163 if (count($language) > 1)
165 $this->tpl->setCurrentBlock(
"language_delete");
166 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Language");
167 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
168 $this->tpl->parseCurrentBlock();
170 $this->tpl->setCurrentBlock(
"language_loop");
171 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"bibitem_language"));
172 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
showLangSel(
"meta[Language][" . $i .
"][Language]", $language[$i][
"Language"]));
173 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Language&bibItemPath=BibItem&bibItemIndex=" . $a_index);
174 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
175 $this->tpl->parseCurrentBlock();
180 if (is_array($author = $this->bib_obj->getElement(
"Author",
"BibItem[" . ($a_index+1) .
"]")) &&
183 for ($i = 0; $i < count($author); $i++)
185 $this->tpl->setCurrentBlock(
"author_loop");
186 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_AUTHOR", $this->lng->txt(
"bibitem_author"));
187 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
188 $this->tpl->setVariable(
"AUTHOR_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Author");
189 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
190 $this->tpl->setVariable(
"AUTHOR_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Author&bibItemPath=BibItem&bibItemIndex=" . $a_index);
191 $this->tpl->setVariable(
"AUTHOR_LOOP_NO", $i);
192 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_FIRSTNAME", $this->lng->txt(
"bibitem_first_name"));
193 if (is_array($firstname = $this->bib_obj->getElement(
"FirstName",
"BibItem[" . ($a_index+1) .
"]/Author[" . ($i+1) .
"]")))
197 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_MIDDLENAME", $this->lng->txt(
"bibitem_middle_name"));
198 if (is_array($middlename = $this->bib_obj->getElement(
"MiddleName",
"BibItem[" . ($a_index+1) .
"]/Author[" . ($i+1) .
"]")))
202 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_LASTNAME", $this->lng->txt(
"bibitem_last_name"));
203 if (is_array($lastname = $this->bib_obj->getElement(
"LastName",
"BibItem[" . ($a_index+1) .
"]/Author[" . ($i+1) .
"]")))
207 $this->tpl->parseCurrentBlock(
"author_loop");
211 $booktitle = $this->bib_obj->getElement(
"Booktitle",
"BibItem[" . ($a_index+1) .
"]");
212 $this->tpl->setVariable(
"TXT_BOOKTITLE", $this->lng->txt(
"bibitem_booktitle"));
214 $this->tpl->setVariable(
"BOOKTITLE_VAL_LANGUAGE", $this->
showLangSel(
"meta[Booktitle][Language]", $booktitle[0][
"Language"]));
217 if (is_array($crossref = $this->bib_obj->getElement(
"CrossRef",
"BibItem[" . ($a_index+1) .
"]")) &&
218 count($crossref) > 0)
220 for ($i = 0; $i < count($crossref); $i++)
222 $this->tpl->setCurrentBlock(
"crossref_loop");
223 $this->tpl->setVariable(
"CROSSREF_LOOP_TXT_CROSSREF", $this->lng->txt(
"bibitem_cross_reference"));
224 $this->tpl->setVariable(
"CROSSREF_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
225 $this->tpl->setVariable(
"CROSSREF_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=CrossRef");
226 $this->tpl->setVariable(
"CROSSREF_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
227 $this->tpl->setVariable(
"CROSSREF_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=CrossRef&bibItemPath=BibItem&bibItemIndex=" . $a_index);
228 $this->tpl->setVariable(
"CROSSREF_LOOP_NO", $i);
230 $this->tpl->parseCurrentBlock(
"crossref_loop");
234 $edition = $this->bib_obj->getElement(
"Edition",
"BibItem[" . ($a_index+1) .
"]");
235 $this->tpl->setVariable(
"TXT_EDITION", $this->lng->txt(
"bibitem_edition"));
239 if (is_array($editor = $this->bib_obj->getElement(
"Editor",
"BibItem[" . ($a_index+1) .
"]")) &&
242 for ($i = 0; $i < count($editor); $i++)
244 $this->tpl->setCurrentBlock(
"editor_loop");
245 $this->tpl->setVariable(
"EDITOR_LOOP_TXT_EDITOR", $this->lng->txt(
"bibitem_editor"));
246 $this->tpl->setVariable(
"EDITOR_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
247 $this->tpl->setVariable(
"EDITOR_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Editor");
248 $this->tpl->setVariable(
"EDITOR_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
249 $this->tpl->setVariable(
"EDITOR_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Editor&bibItemPath=BibItem&bibItemIndex=" . $a_index);
250 $this->tpl->setVariable(
"EDITOR_LOOP_NO", $i);
252 $this->tpl->parseCurrentBlock(
"editor_loop");
256 $howPublished = $this->bib_obj->getElement(
"HowPublished",
"BibItem[" . ($a_index+1) .
"]");
257 $this->tpl->setVariable(
"TXT_HOWPUBLISHED", $this->lng->txt(
"bibitem_how_published"));
258 $this->tpl->setVariable(
"TXT_GREYLITERATURE", $this->lng->txt(
"bibitem_grey_literature"));
259 $this->tpl->setVariable(
"TXT_PRINT", $this->lng->txt(
"bibitem_print"));
260 $this->tpl->setVariable(
"HOWPUBLISHED_TYPE_VAL_" . strtoupper(
ilUtil::prepareFormOutput($howPublished[0][
"Type"])),
" selected");
263 if (is_array($wherepublished = $this->bib_obj->getElement(
"WherePublished",
"BibItem[" . ($a_index+1) .
"]")) &&
264 count($wherepublished) > 0)
266 for ($i = 0; $i < count($wherepublished); $i++)
268 $this->tpl->setCurrentBlock(
"wherepublished_loop");
269 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_TXT_WHEREPUBLISHED", $this->lng->txt(
"bibitem_where_published"));
270 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
271 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=WherePublished");
272 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
273 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=WherePublished&bibItemPath=BibItem&bibItemIndex=" . $a_index);
274 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_NO", $i);
276 $this->tpl->parseCurrentBlock(
"wherepublished_loop");
281 if (is_array($institution = $this->bib_obj->getElement(
"Institution",
"BibItem[" . ($a_index+1) .
"]")) &&
282 count($institution) > 0)
284 for ($i = 0; $i < count($institution); $i++)
286 $this->tpl->setCurrentBlock(
"institution_loop");
287 $this->tpl->setVariable(
"INSTITUTION_LOOP_TXT_INSTITUTION", $this->lng->txt(
"bibitem_institution"));
288 $this->tpl->setVariable(
"INSTITUTION_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
289 $this->tpl->setVariable(
"INSTITUTION_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Institution");
290 $this->tpl->setVariable(
"INSTITUTION_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
291 $this->tpl->setVariable(
"INSTITUTION_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Institution&bibItemPath=BibItem&bibItemIndex=" . $a_index);
292 $this->tpl->setVariable(
"INSTITUTION_LOOP_NO", $i);
294 $this->tpl->parseCurrentBlock(
"institution_loop");
299 if (is_array($journal = $this->bib_obj->getElement(
"Journal",
"BibItem[" . ($a_index+1) .
"]")) &&
302 $this->tpl->setCurrentBlock(
"journal");
303 $this->tpl->setVariable(
"JOURNAL_TXT_JOURNAL", $this->lng->txt(
"bibitem_journal"));
304 $this->tpl->setVariable(
"JOURNAL_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
305 $this->tpl->setVariable(
"JOURNAL_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemPath=BibItem&bibItemName=Journal");
310 $this->tpl->parseCurrentBlock(
"journal");
315 $this->tpl->setVariable(
"TXT_JOURNAL", $this->lng->txt(
"bibitem_journal"));
319 if (is_array($keyword = $this->bib_obj->getElement(
"Keyword",
"BibItem[" . ($a_index+1) .
"]")) &&
322 for ($i = 0; $i < count($keyword); $i++)
324 $this->tpl->setCurrentBlock(
"keyword_loop");
325 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"bibitem_keyword"));
326 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
327 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Keyword");
328 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
329 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Keyword&bibItemPath=BibItem&bibItemIndex=" . $a_index);
330 $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $i);
332 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"bibitem_language"));
333 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
showLangSel(
"meta[Language][" . $i .
"][Language]", $keyword[$i][
"Language"]));
334 $this->tpl->parseCurrentBlock(
"keyword_loop");
339 if (is_array($month = $this->bib_obj->getElement(
"Month",
"BibItem[" . ($a_index+1) .
"]")) &&
342 $this->tpl->setCurrentBlock(
"month");
343 $this->tpl->setVariable(
"MONTH_TXT_MONTH", $this->lng->txt(
"bibitem_month"));
344 $this->tpl->setVariable(
"MONTH_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
345 $this->tpl->setVariable(
"MONTH_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemPath=BibItem&bibItemName=Month");
347 $this->tpl->parseCurrentBlock(
"journal");
351 $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
"bibitem_month"));
355 if (is_array($pages = $this->bib_obj->getElement(
"Pages",
"BibItem[" . ($a_index+1) .
"]")) &&
358 $this->tpl->setCurrentBlock(
"pages");
359 $this->tpl->setVariable(
"PAGES_TXT_PAGES", $this->lng->txt(
"bibitem_pages"));
360 $this->tpl->setVariable(
"PAGES_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
361 $this->tpl->setVariable(
"PAGES_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemPath=BibItem&bibItemName=Pages");
363 $this->tpl->parseCurrentBlock(
"pages");
367 $this->tpl->setVariable(
"TXT_PAGES", $this->lng->txt(
"bibitem_pages"));
370 $publisher = $this->bib_obj->getElement(
"Publisher",
"BibItem[" . ($a_index+1) .
"]");
371 $this->tpl->setVariable(
"TXT_PUBLISHER", $this->lng->txt(
"bibitem_publisher"));
375 if (is_array($school = $this->bib_obj->getElement(
"School",
"BibItem[" . ($a_index+1) .
"]")) &&
378 for ($i = 0; $i < count($school); $i++)
380 $this->tpl->setCurrentBlock(
"school_loop");
381 $this->tpl->setVariable(
"SCHOOL_LOOP_TXT_SCHOOL", $this->lng->txt(
"bibitem_school"));
382 $this->tpl->setVariable(
"SCHOOL_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
383 $this->tpl->setVariable(
"SCHOOL_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=School");
384 $this->tpl->setVariable(
"SCHOOL_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
385 $this->tpl->setVariable(
"SCHOOL_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=School&bibItemPath=BibItem&bibItemIndex=" . $a_index);
386 $this->tpl->setVariable(
"SCHOOL_LOOP_NO", $i);
388 $this->tpl->parseCurrentBlock(
"school_loop");
393 if (is_array($series = $this->bib_obj->getElement(
"Series",
"BibItem[" . ($a_index+1) .
"]")) &&
396 $this->tpl->setCurrentBlock(
"series");
397 $this->tpl->setVariable(
"SERIES_TXT_SERIES", $this->lng->txt(
"bibitem_series"));
398 $this->tpl->setVariable(
"SERIES_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
399 $this->tpl->setVariable(
"SERIES_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&&bibItemPath=BibItem[" . ($a_index+1) .
"]&bibItemName=Series");
400 $this->tpl->setVariable(
"SERIES_TXT_SERIESTITLE", $this->lng->txt(
"bibitem_series_title"));
401 if (is_array(
$title = $this->bib_obj->getElement(
"SeriesTitle",
"BibItem[" . ($a_index+1) .
"]/Series")))
405 $this->tpl->setVariable(
"SERIES_TXT_SERIESEDITOR", $this->lng->txt(
"bibitem_series_editor"));
406 if (is_array($editor = $this->bib_obj->getElement(
"SeriesEditor",
"BibItem[" . ($a_index+1) .
"]/Series")))
410 $this->tpl->setVariable(
"SERIES_TXT_SERIESVOLUME", $this->lng->txt(
"bibitem_series_volume"));
411 if (is_array($volume = $this->bib_obj->getElement(
"SeriesVolume",
"BibItem[" . ($a_index+1) .
"]/Series")))
415 $this->tpl->parseCurrentBlock(
"series");
419 $this->tpl->setVariable(
"TXT_SERIES", $this->lng->txt(
"bibitem_series"));
422 $year = $this->bib_obj->getElement(
"Year",
"BibItem[" . ($a_index+1) .
"]");
423 $this->tpl->setVariable(
"TXT_YEAR", $this->lng->txt(
"bibitem_year"));
427 if (is_array($url = $this->bib_obj->getElement(
"URL",
"BibItem[" . ($a_index+1) .
"]")) &&
430 $url_isbn_issn[
"type"] =
"URL";
431 $url_isbn_issn[
"value"] = $url[0][
"value"];
433 else if (is_array($isbn = $this->bib_obj->getElement(
"ISBN",
"BibItem[" . ($a_index+1) .
"]")) &&
436 $url_isbn_issn[
"type"] =
"ISBN";
437 $url_isbn_issn[
"value"] = $isbn[0][
"value"];
439 else if (is_array($issn = $this->bib_obj->getElement(
"ISSN",
"BibItem[" . ($a_index+1) .
"]")) &&
442 $url_isbn_issn[
"type"] =
"ISSN";
443 $url_isbn_issn[
"value"] = $issn[0][
"value"];
445 $this->tpl->setVariable($url_isbn_issn[
"type"],
" selected");
448 $this->tpl->setVariable(
"EDIT_ACTION", $a_formaction .
"&cmd=post");
450 $this->tpl->setVariable(
"VAL_INDEX", $a_index);
451 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"bibitem_save"));
456 function edit($a_temp_var, $a_temp_block, $a_formaction, $a_index = 0, $a_language =
"")
458 if ($a_language ==
"")
460 $a_language = $this->ilias->account->getLanguage();
462 $this->tpl->addBlockFile($a_temp_var, $a_temp_block,
"tpl.bib_data_editor.html",
"Modules/LearningModule");
464 #echo "Pr�fen, ob BibItems vorhanden sind:<br>\n";
465 if (!is_array(
$data = $this->bib_obj->getElement(
"BibItem")))
468 $this->tpl->setCurrentBlock(
"not_found");
469 $this->tpl->setVariable(
"NOT_FOUND_ACTION", $a_formaction .
"&cmd=addBibItem&bibItemName=BibItem");
470 $this->tpl->setVariable(
"NOT_FOUND_TXT" , $this->lng->txt(
"bibitem_not_found"));
471 $this->tpl->setVariable(
"NOT_FOUND_TXT_ADD" , $this->lng->txt(
"bibitem_add"));
472 $this->tpl->parseCurrentBlock();
478 for ($i = 0; $i < count(
$data); $i++)
480 $edition = $this->bib_obj->getElement(
"Edition",
"BibItem", $i);
481 $year = $this->bib_obj->getElement(
"Year",
"BibItem", $i);
482 $this->tpl->setCurrentBlock(
"index_loop");
483 $this->tpl->setVariable(
"INDEX_LOOP_VALUE", $i);
486 $this->tpl->setVariable(
"INDEX_LOOP_SELECTED",
" selected");
488 $this->tpl->setVariable(
"INDEX_LOOP_TEXT", $edition[0][
"value"] .
", " . $year[0][
"value"]);
489 $this->tpl->parseCurrentBlock(
"index_loop");
491 $this->tpl->setCurrentBlock(
"found");
492 $this->tpl->setVariable(
"FOUND_ACTION", $a_formaction .
"&cmd=editBibItem");
493 $this->tpl->setVariable(
"FOUND_TXT" , $this->lng->txt(
"bibitem_choose_index"));
494 #echo "Einlesen des BibItems:<br>\n";
495 $this->
fill($a_formaction, $a_index, $a_language);
496 $this->tpl->parseCurrentBlock();
502 $p =
"//Bibliography";
503 $this->bib_obj->nested_obj->updateDomNode($p,
$_POST[
"meta"], $a_index);
504 $this->bib_obj->nested_obj->updateFromDom();
505 $data = $this->bib_obj->getElement(
"BibItem");
506 return (count(
$data) - 1);
519 if ($this->target_frame[$a_cmd] !=
"")
521 return $this->target_frame[$a_cmd];
523 elseif (!empty($a_target_frame))
525 return $a_target_frame;
542 $this->target_frame[$a_cmd] = $a_target_frame;