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))
74 $method =
"get".$a_val_name;
75 return $this->meta_obj->$method();
91 foreach($languages as $code => $text)
93 $tpl->setCurrentBlock(
"lg_option");
94 $tpl->setVariable(
"VAL_LG", $code);
95 $tpl->setVariable(
"TXT_LG", $text);
99 $tpl->setVariable(
"SELECTED",
"selected");
101 $tpl->parseCurrentBlock();
103 $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
104 $tpl->setVariable(
"SEL_NAME", $a_name);
105 $return =
$tpl->get();
111 function fill($a_formaction, $a_index = 0, $a_language =
"")
113 $this->tpl->setVariable(
"TXT_BIBITEM", $this->lng->txt(
"bibitem_bibitem"));
114 $this->tpl->setVariable(
"BIBITEM_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
115 $this->tpl->setVariable(
"BIBITEM_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemName=BibItem");
116 $this->tpl->setVariable(
"BIBITEM_TXT_ADD", $this->lng->txt(
"bibitem_add"));
117 $this->tpl->setVariable(
"BIBITEM_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=BibItem");
118 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"bibitem_new_element"));
119 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"bibitem_language"));
120 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"bibitem_author"));
121 $this->tpl->setVariable(
"TXT_CROSSREF", $this->lng->txt(
"bibitem_cross_reference"));
122 $this->tpl->setVariable(
"TXT_EDITOR", $this->lng->txt(
"bibitem_editor"));
123 $this->tpl->setVariable(
"TXT_WHERE_PUBLISHED", $this->lng->txt(
"bibitem_where_published"));
124 $this->tpl->setVariable(
"TXT_INSTITUTION", $this->lng->txt(
"bibitem_institution"));
125 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"bibitem_keyword"));
126 $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"bibitem_school"));
127 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"bibitem_add"));
129 $bibitem = $this->bib_obj->getElement(
"BibItem");
130 $this->tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"bibitem_type"));
131 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"bibitem_please_select"));
132 $this->tpl->setVariable(
"TXT_BOOK", $this->lng->txt(
"bibitem_book"));
133 $this->tpl->setVariable(
"TXT_INBOOK", $this->lng->txt(
"bibitem_inbook"));
134 $this->tpl->setVariable(
"TXT_JOURNALARTICLE", $this->lng->txt(
"bibitem_journal_article"));
135 $this->tpl->setVariable(
"TXT_PROCEEDINGS", $this->lng->txt(
"bibitem_proceedings"));
136 $this->tpl->setVariable(
"TXT_INPROCEEDINGS", $this->lng->txt(
"bibitem_inproceedings"));
137 $this->tpl->setVariable(
"TXT_DISSERTATION", $this->lng->txt(
"bibitem_dissertation"));
138 $this->tpl->setVariable(
"TXT_PHDTHESIS", $this->lng->txt(
"bibitem_phd_thesis"));
139 $this->tpl->setVariable(
"TXT_MASTERSTHESIS", $this->lng->txt(
"bibitem_master_thesis"));
140 $this->tpl->setVariable(
"TXT_TECHREPORT", $this->lng->txt(
"bibitem_technical_report"));
141 $this->tpl->setVariable(
"TXT_MANUAL", $this->lng->txt(
"bibitem_manual"));
142 $this->tpl->setVariable(
"TXT_NEWSPAPERARTICLE", $this->lng->txt(
"bibitem_newspaper_article"));
143 $this->tpl->setVariable(
"TXT_AV", $this->lng->txt(
"bibitem_av"));
144 $this->tpl->setVariable(
"TXT_INTERNET", $this->lng->txt(
"bibitem_internet"));
145 $this->tpl->setVariable(
"TXT_UNPUBLISHED", $this->lng->txt(
"bibitem_unpublished"));
148 $this->tpl->setVariable(
"TXT_LABEL", $this->lng->txt(
"bibitem_label"));
151 $identifier = $this->bib_obj->getElement(
"Identifier",
"BibItem[" . ($a_index+1) .
"]");
152 $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"bibitem_identifier"));
153 $this->tpl->setVariable(
"TXT_CATALOG", $this->lng->txt(
"bibitem_catalog"));
155 $this->tpl->setVariable(
"TXT_ENTRY", $this->lng->txt(
"bibitem_entry"));
159 if (is_array($language = $this->bib_obj->getElement(
"Language",
"BibItem[" . ($a_index+1) .
"]")) &&
160 count($language) > 0)
162 for ($i = 0; $i < count($language); $i++)
164 if (count($language) > 1)
166 $this->tpl->setCurrentBlock(
"language_delete");
167 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Language");
168 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
169 $this->tpl->parseCurrentBlock();
171 $this->tpl->setCurrentBlock(
"language_loop");
172 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"bibitem_language"));
173 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
showLangSel(
"meta[Language][" . $i .
"][Language]", $language[$i][
"Language"]));
174 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Language&bibItemPath=BibItem&bibItemIndex=" . $a_index);
175 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
176 $this->tpl->parseCurrentBlock();
181 if (is_array($author = $this->bib_obj->getElement(
"Author",
"BibItem[" . ($a_index+1) .
"]")) &&
184 for ($i = 0; $i < count($author); $i++)
186 $this->tpl->setCurrentBlock(
"author_loop");
187 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_AUTHOR", $this->lng->txt(
"bibitem_author"));
188 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
189 $this->tpl->setVariable(
"AUTHOR_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Author");
190 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
191 $this->tpl->setVariable(
"AUTHOR_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Author&bibItemPath=BibItem&bibItemIndex=" . $a_index);
192 $this->tpl->setVariable(
"AUTHOR_LOOP_NO", $i);
193 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_FIRSTNAME", $this->lng->txt(
"bibitem_first_name"));
194 if (is_array($firstname = $this->bib_obj->getElement(
"FirstName",
"BibItem[" . ($a_index+1) .
"]/Author[" . ($i+1) .
"]")))
198 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_MIDDLENAME", $this->lng->txt(
"bibitem_middle_name"));
199 if (is_array($middlename = $this->bib_obj->getElement(
"MiddleName",
"BibItem[" . ($a_index+1) .
"]/Author[" . ($i+1) .
"]")))
203 $this->tpl->setVariable(
"AUTHOR_LOOP_TXT_LASTNAME", $this->lng->txt(
"bibitem_last_name"));
204 if (is_array($lastname = $this->bib_obj->getElement(
"LastName",
"BibItem[" . ($a_index+1) .
"]/Author[" . ($i+1) .
"]")))
208 $this->tpl->parseCurrentBlock(
"author_loop");
212 $booktitle = $this->bib_obj->getElement(
"Booktitle",
"BibItem[" . ($a_index+1) .
"]");
213 $this->tpl->setVariable(
"TXT_BOOKTITLE", $this->lng->txt(
"bibitem_booktitle"));
215 $this->tpl->setVariable(
"BOOKTITLE_VAL_LANGUAGE", $this->
showLangSel(
"meta[Booktitle][Language]", $booktitle[0][
"Language"]));
218 if (is_array($crossref = $this->bib_obj->getElement(
"CrossRef",
"BibItem[" . ($a_index+1) .
"]")) &&
219 count($crossref) > 0)
221 for ($i = 0; $i < count($crossref); $i++)
223 $this->tpl->setCurrentBlock(
"crossref_loop");
224 $this->tpl->setVariable(
"CROSSREF_LOOP_TXT_CROSSREF", $this->lng->txt(
"bibitem_cross_reference"));
225 $this->tpl->setVariable(
"CROSSREF_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
226 $this->tpl->setVariable(
"CROSSREF_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=CrossRef");
227 $this->tpl->setVariable(
"CROSSREF_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
228 $this->tpl->setVariable(
"CROSSREF_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=CrossRef&bibItemPath=BibItem&bibItemIndex=" . $a_index);
229 $this->tpl->setVariable(
"CROSSREF_LOOP_NO", $i);
231 $this->tpl->parseCurrentBlock(
"crossref_loop");
235 $edition = $this->bib_obj->getElement(
"Edition",
"BibItem[" . ($a_index+1) .
"]");
236 $this->tpl->setVariable(
"TXT_EDITION", $this->lng->txt(
"bibitem_edition"));
240 if (is_array($editor = $this->bib_obj->getElement(
"Editor",
"BibItem[" . ($a_index+1) .
"]")) &&
243 for ($i = 0; $i < count($editor); $i++)
245 $this->tpl->setCurrentBlock(
"editor_loop");
246 $this->tpl->setVariable(
"EDITOR_LOOP_TXT_EDITOR", $this->lng->txt(
"bibitem_editor"));
247 $this->tpl->setVariable(
"EDITOR_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
248 $this->tpl->setVariable(
"EDITOR_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Editor");
249 $this->tpl->setVariable(
"EDITOR_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
250 $this->tpl->setVariable(
"EDITOR_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Editor&bibItemPath=BibItem&bibItemIndex=" . $a_index);
251 $this->tpl->setVariable(
"EDITOR_LOOP_NO", $i);
253 $this->tpl->parseCurrentBlock(
"editor_loop");
257 $howPublished = $this->bib_obj->getElement(
"HowPublished",
"BibItem[" . ($a_index+1) .
"]");
258 $this->tpl->setVariable(
"TXT_HOWPUBLISHED", $this->lng->txt(
"bibitem_how_published"));
259 $this->tpl->setVariable(
"TXT_GREYLITERATURE", $this->lng->txt(
"bibitem_grey_literature"));
260 $this->tpl->setVariable(
"TXT_PRINT", $this->lng->txt(
"bibitem_print"));
261 $this->tpl->setVariable(
"HOWPUBLISHED_TYPE_VAL_" . strtoupper(
ilUtil::prepareFormOutput($howPublished[0][
"Type"])),
" selected");
264 if (is_array($wherepublished = $this->bib_obj->getElement(
"WherePublished",
"BibItem[" . ($a_index+1) .
"]")) &&
265 count($wherepublished) > 0)
267 for ($i = 0; $i < count($wherepublished); $i++)
269 $this->tpl->setCurrentBlock(
"wherepublished_loop");
270 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_TXT_WHEREPUBLISHED", $this->lng->txt(
"bibitem_where_published"));
271 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
272 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=WherePublished");
273 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
274 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=WherePublished&bibItemPath=BibItem&bibItemIndex=" . $a_index);
275 $this->tpl->setVariable(
"WHEREPUBLISHED_LOOP_NO", $i);
277 $this->tpl->parseCurrentBlock(
"wherepublished_loop");
282 if (is_array($institution = $this->bib_obj->getElement(
"Institution",
"BibItem[" . ($a_index+1) .
"]")) &&
283 count($institution) > 0)
285 for ($i = 0; $i < count($institution); $i++)
287 $this->tpl->setCurrentBlock(
"institution_loop");
288 $this->tpl->setVariable(
"INSTITUTION_LOOP_TXT_INSTITUTION", $this->lng->txt(
"bibitem_institution"));
289 $this->tpl->setVariable(
"INSTITUTION_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
290 $this->tpl->setVariable(
"INSTITUTION_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Institution");
291 $this->tpl->setVariable(
"INSTITUTION_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
292 $this->tpl->setVariable(
"INSTITUTION_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Institution&bibItemPath=BibItem&bibItemIndex=" . $a_index);
293 $this->tpl->setVariable(
"INSTITUTION_LOOP_NO", $i);
295 $this->tpl->parseCurrentBlock(
"institution_loop");
300 if (is_array($journal = $this->bib_obj->getElement(
"Journal",
"BibItem[" . ($a_index+1) .
"]")) &&
303 $this->tpl->setCurrentBlock(
"journal");
304 $this->tpl->setVariable(
"JOURNAL_TXT_JOURNAL", $this->lng->txt(
"bibitem_journal"));
305 $this->tpl->setVariable(
"JOURNAL_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
306 $this->tpl->setVariable(
"JOURNAL_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemPath=BibItem&bibItemName=Journal");
311 $this->tpl->parseCurrentBlock(
"journal");
316 $this->tpl->setVariable(
"TXT_JOURNAL", $this->lng->txt(
"bibitem_journal"));
320 if (is_array($keyword = $this->bib_obj->getElement(
"Keyword",
"BibItem[" . ($a_index+1) .
"]")) &&
323 for ($i = 0; $i < count($keyword); $i++)
325 $this->tpl->setCurrentBlock(
"keyword_loop");
326 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"bibitem_keyword"));
327 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
328 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=Keyword");
329 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
330 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=Keyword&bibItemPath=BibItem&bibItemIndex=" . $a_index);
331 $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $i);
333 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"bibitem_language"));
334 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
showLangSel(
"meta[Language][" . $i .
"][Language]", $keyword[$i][
"Language"]));
335 $this->tpl->parseCurrentBlock(
"keyword_loop");
340 if (is_array($month = $this->bib_obj->getElement(
"Month",
"BibItem[" . ($a_index+1) .
"]")) &&
343 $this->tpl->setCurrentBlock(
"month");
344 $this->tpl->setVariable(
"MONTH_TXT_MONTH", $this->lng->txt(
"bibitem_month"));
345 $this->tpl->setVariable(
"MONTH_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
346 $this->tpl->setVariable(
"MONTH_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemPath=BibItem&bibItemName=Month");
348 $this->tpl->parseCurrentBlock(
"journal");
352 $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
"bibitem_month"));
356 if (is_array($pages = $this->bib_obj->getElement(
"Pages",
"BibItem[" . ($a_index+1) .
"]")) &&
359 $this->tpl->setCurrentBlock(
"pages");
360 $this->tpl->setVariable(
"PAGES_TXT_PAGES", $this->lng->txt(
"bibitem_pages"));
361 $this->tpl->setVariable(
"PAGES_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
362 $this->tpl->setVariable(
"PAGES_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"&bibItemPath=BibItem&bibItemName=Pages");
364 $this->tpl->parseCurrentBlock(
"pages");
368 $this->tpl->setVariable(
"TXT_PAGES", $this->lng->txt(
"bibitem_pages"));
371 $publisher = $this->bib_obj->getElement(
"Publisher",
"BibItem[" . ($a_index+1) .
"]");
372 $this->tpl->setVariable(
"TXT_PUBLISHER", $this->lng->txt(
"bibitem_publisher"));
376 if (is_array($school = $this->bib_obj->getElement(
"School",
"BibItem[" . ($a_index+1) .
"]")) &&
379 for ($i = 0; $i < count($school); $i++)
381 $this->tpl->setCurrentBlock(
"school_loop");
382 $this->tpl->setVariable(
"SCHOOL_LOOP_TXT_SCHOOL", $this->lng->txt(
"bibitem_school"));
383 $this->tpl->setVariable(
"SCHOOL_LOOP_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
384 $this->tpl->setVariable(
"SCHOOL_LOOP_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&bibItemIndex=" . $a_index .
"," . $i .
"&bibItemPath=BibItem&bibItemName=School");
385 $this->tpl->setVariable(
"SCHOOL_LOOP_TXT_ADD", $this->lng->txt(
"bibitem_add"));
386 $this->tpl->setVariable(
"SCHOOL_LOOP_ACTION_ADD", $a_formaction .
"&cmd=addBibItem&bibItemName=School&bibItemPath=BibItem&bibItemIndex=" . $a_index);
387 $this->tpl->setVariable(
"SCHOOL_LOOP_NO", $i);
389 $this->tpl->parseCurrentBlock(
"school_loop");
394 if (is_array($series = $this->bib_obj->getElement(
"Series",
"BibItem[" . ($a_index+1) .
"]")) &&
397 $this->tpl->setCurrentBlock(
"series");
398 $this->tpl->setVariable(
"SERIES_TXT_SERIES", $this->lng->txt(
"bibitem_series"));
399 $this->tpl->setVariable(
"SERIES_TXT_DELETE", $this->lng->txt(
"bibitem_delete"));
400 $this->tpl->setVariable(
"SERIES_ACTION_DELETE", $a_formaction .
"&cmd=deleteBibItem&&bibItemPath=BibItem[" . ($a_index+1) .
"]&bibItemName=Series");
401 $this->tpl->setVariable(
"SERIES_TXT_SERIESTITLE", $this->lng->txt(
"bibitem_series_title"));
402 if (is_array(
$title = $this->bib_obj->getElement(
"SeriesTitle",
"BibItem[" . ($a_index+1) .
"]/Series")))
406 $this->tpl->setVariable(
"SERIES_TXT_SERIESEDITOR", $this->lng->txt(
"bibitem_series_editor"));
407 if (is_array($editor = $this->bib_obj->getElement(
"SeriesEditor",
"BibItem[" . ($a_index+1) .
"]/Series")))
411 $this->tpl->setVariable(
"SERIES_TXT_SERIESVOLUME", $this->lng->txt(
"bibitem_series_volume"));
412 if (is_array($volume = $this->bib_obj->getElement(
"SeriesVolume",
"BibItem[" . ($a_index+1) .
"]/Series")))
416 $this->tpl->parseCurrentBlock(
"series");
420 $this->tpl->setVariable(
"TXT_SERIES", $this->lng->txt(
"bibitem_series"));
423 $year = $this->bib_obj->getElement(
"Year",
"BibItem[" . ($a_index+1) .
"]");
424 $this->tpl->setVariable(
"TXT_YEAR", $this->lng->txt(
"bibitem_year"));
428 if (is_array($url = $this->bib_obj->getElement(
"URL",
"BibItem[" . ($a_index+1) .
"]")) &&
431 $url_isbn_issn[
"type"] =
"URL";
432 $url_isbn_issn[
"value"] = $url[0][
"value"];
434 else if (is_array($isbn = $this->bib_obj->getElement(
"ISBN",
"BibItem[" . ($a_index+1) .
"]")) &&
437 $url_isbn_issn[
"type"] =
"ISBN";
438 $url_isbn_issn[
"value"] = $isbn[0][
"value"];
440 else if (is_array($issn = $this->bib_obj->getElement(
"ISSN",
"BibItem[" . ($a_index+1) .
"]")) &&
443 $url_isbn_issn[
"type"] =
"ISSN";
444 $url_isbn_issn[
"value"] = $issn[0][
"value"];
446 $this->tpl->setVariable($url_isbn_issn[
"type"],
" selected");
449 $this->tpl->setVariable(
"EDIT_ACTION", $a_formaction .
"&cmd=post");
451 $this->tpl->setVariable(
"VAL_INDEX", $a_index);
452 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"bibitem_save"));
457 function edit($a_temp_var, $a_temp_block, $a_formaction, $a_index = 0, $a_language =
"")
459 if ($a_language ==
"")
461 $a_language = $this->ilias->account->getLanguage();
463 $this->tpl->addBlockFile($a_temp_var, $a_temp_block,
"tpl.bib_data_editor.html",
"Modules/LearningModule");
465 #echo "Pr�fen, ob BibItems vorhanden sind:<br>\n";
466 if (!is_array(
$data = $this->bib_obj->getElement(
"BibItem")))
469 $this->tpl->setCurrentBlock(
"not_found");
470 $this->tpl->setVariable(
"NOT_FOUND_ACTION", $a_formaction .
"&cmd=addBibItem&bibItemName=BibItem");
471 $this->tpl->setVariable(
"NOT_FOUND_TXT" , $this->lng->txt(
"bibitem_not_found"));
472 $this->tpl->setVariable(
"NOT_FOUND_TXT_ADD" , $this->lng->txt(
"bibitem_add"));
473 $this->tpl->parseCurrentBlock();
479 for ($i = 0; $i < count(
$data); $i++)
481 $edition = $this->bib_obj->getElement(
"Edition",
"BibItem", $i);
482 $year = $this->bib_obj->getElement(
"Year",
"BibItem", $i);
483 $this->tpl->setCurrentBlock(
"index_loop");
484 $this->tpl->setVariable(
"INDEX_LOOP_VALUE", $i);
487 $this->tpl->setVariable(
"INDEX_LOOP_SELECTED",
" selected");
489 $this->tpl->setVariable(
"INDEX_LOOP_TEXT", $edition[0][
"value"] .
", " . $year[0][
"value"]);
490 $this->tpl->parseCurrentBlock(
"index_loop");
492 $this->tpl->setCurrentBlock(
"found");
493 $this->tpl->setVariable(
"FOUND_ACTION", $a_formaction .
"&cmd=editBibItem");
494 $this->tpl->setVariable(
"FOUND_TXT" , $this->lng->txt(
"bibitem_choose_index"));
495 #echo "Einlesen des BibItems:<br>\n";
496 $this->
fill($a_formaction, $a_index, $a_language);
497 $this->tpl->parseCurrentBlock();
503 $p =
"//Bibliography";
504 $this->bib_obj->nested_obj->updateDomNode($p,
$_POST[
"meta"], $a_index);
505 $this->bib_obj->nested_obj->updateFromDom();
506 $data = $this->bib_obj->getElement(
"BibItem");
507 return (count(
$data) - 1);
520 if ($this->target_frame[$a_cmd] !=
"")
522 return $this->target_frame[$a_cmd];
524 elseif (!empty($a_target_frame))
526 return $a_target_frame;
543 $this->target_frame[$a_cmd] = $a_target_frame;