78 {
79 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
80
82
83 if (!$this->
settings->isCopyrightSelectionActive() or
85 $this->tpl->setVariable("TXT_COPYRIGHT", $this->lng->txt('meta_copyright'));
86 $this->tpl->setVariable(
87 'COPYRIGHT_VAL',
89 );
90 return true;
91 }
92
94
95 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
96 $found = false;
97 foreach ($entries as $entry) {
98 $this->tpl->setCurrentBlock('copyright_selection');
99
100 if ($entry->getEntryId() == $default_id) {
101 $found = true;
102 $this->tpl->setVariable('COPYRIGHT_CHECKED', 'checked="checked"');
103 }
104 $this->tpl->setVariable('COPYRIGHT_ID', $entry->getEntryId());
105 $this->tpl->setVariable('COPYRIGHT_TITLE', $entry->getTitle());
106 $this->tpl->setVariable('COPYRIGHT_DESCRIPTION', $entry->getDescription());
107 $this->tpl->parseCurrentBlock();
108 }
109
110 $this->tpl->setCurrentBlock('copyright_selection');
111 if (!$found) {
112 $this->tpl->setVariable('COPYRIGHT_CHECKED', 'checked="checked"');
113 }
114 $this->tpl->setVariable('COPYRIGHT_ID', 0);
115 $this->tpl->setVariable('COPYRIGHT_TITLE', $this->lng->txt('meta_cp_own'));
116
117 $this->tpl->setVariable("TXT_COPYRIGHT", $this->lng->txt('meta_copyright'));
118 if (!$found) {
119 $this->tpl->setVariable('COPYRIGHT_VAL', $desc);
120 }
121 }
static _extractEntryId($a_cp_string)
extract entry id
static _getEntries()
get entries
static _lookupDescription($a_rbac_id, $a_obj_id)
Lookup description (copyright)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public