6 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
22 $a_presentation_mode =
false)
26 $this->edit_order = (bool)$a_edit_order;
27 $this->presentation_mode = (bool)$a_presentation_mode;
33 $this->downloadable = $mediacast->getDownloadable();
35 if (!$this->presentation_mode)
40 $this->
addColumn($lng->txt(
"properties"));
41 if(!$this->edit_order)
43 $this->
addColumn($lng->txt(
"mcst_play"),
"",
"320px");
66 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
69 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
71 if ($this->presentation_mode)
73 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"presentation",
"1");
77 if ($enable_internal_rss && !$this->presentation_mode)
79 $this->tpl->setCurrentBlock(
"access");
80 $this->tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
83 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
87 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
89 $this->tpl->parseCurrentBlock();
92 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id",
"");
96 if ($a_set[
"update_date"] !=
"")
98 $this->tpl->setCurrentBlock(
"last_update");
99 $this->tpl->setVariable(
"TXT_LAST_UPDATE",
100 $lng->txt(
"last_update"));
101 $this->tpl->setVariable(
"VAL_LAST_UPDATE",
103 $this->tpl->parseCurrentBlock();
107 $med = $mob->getMediaItem(
"Standard");
109 $this->tpl->setVariable(
"VAL_TITLE",
111 $this->tpl->setVariable(
"VAL_DESCRIPTION",
113 $this->tpl->setVariable(
"TXT_CREATED",
114 $lng->txt(
"created"));
115 $this->tpl->setVariable(
"VAL_CREATED",
118 $this->tpl->setVariable(
"TXT_DURATION",
119 $lng->txt(
"mcst_play_time"));
121 if ($a_set[
"playtime"] !=
"00:00:00")
123 $this->tpl->setVariable(
"VAL_DURATION",
128 $this->tpl->setVariable(
"VAL_DURATION",
"-");
131 if(!$this->edit_order)
133 if ($this->downloadable)
135 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
140 $a_mob = $mob->getMediaItem($purpose);
141 if (!is_object($a_mob))
143 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose", $a_mob->getPurpose());
148 $size =
", ".sprintf(
"%.1f MB",
$size/1024/1024);
150 $format = ($a_mob->getFormat()!=
"")?$a_mob->getFormat():
"audio/mpeg";
151 $this->tpl->setCurrentBlock(
"downloadable");
152 $this->tpl->setVariable(
"TXT_DOWNLOAD", $lng->txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
153 $this->tpl->setVariable(
"CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
154 $this->tpl->setVariable(
"TITLE_DOWNLOAD",
"(".$format.$size.
")");
155 $this->tpl->parseCurrentBlock();
159 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
162 $event_url = ($this->presentation_mode)
163 ? $ilCtrl->getLinkTarget($this->parent_obj,
"handlePlayerEvent",
"",
true,
false)
168 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
169 $mpl->setFile($med->getLocation());
172 $mpl->setMimeType ($med->getFormat());
174 $mpl->setDisplayWidth(
"640");
175 $mpl->setDisplayHeight(
"480");
176 $mpl->setVideoPreviewPic($mob->getVideoPreviewPic());
177 $mpl->setTitle($a_set[
"title"]);
178 $mpl->setDescription($a_set[
"content"]);
180 $med_alt = $mob->getMediaItem(
"VideoAlternative");
181 if (is_object($med_alt))
184 $med_alt->getLocation());
185 $mpl->setAlternativeVideoMimeType($med_alt->getFormat());
190 $this->tpl->setVariable(
"PLAYER", $mpl->getPreviewHtml());
193 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
194 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) &&
195 !$this->presentation_mode)
197 $this->tpl->setCurrentBlock(
"edit");
198 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
199 $this->tpl->setVariable(
"CMD_EDIT",
200 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"editCastItem"));
202 if (!is_int(strpos($med->getFormat(),
"image/")))
204 $this->tpl->setVariable(
"TXT_DET_PLAYTIME", $lng->txt(
"mcst_det_playtime"));
205 $this->tpl->setVariable(
"CMD_DET_PLAYTIME",
206 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"determinePlaytime"));
208 $this->tpl->parseCurrentBlock();
210 $this->tpl->setCurrentBlock(
"edit_checkbox");
211 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
212 $this->tpl->parseCurrentBlock();
218 $this->tpl->setCurrentBlock(
"edit_order");
219 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
220 $this->tpl->setVariable(
"VAL_ORDER", $a_set[
"order"]);
221 $this->tpl->parseCurrentBlock();
226 if (!$this->presentation_mode)
228 if ($a_set[
"mob_cnt_download"] > 0)
230 $this->tpl->setCurrentBlock(
"prop");
231 $this->tpl->setVariable(
"TXT_PROP", $lng->txt(
"mcst_download_cnt"));
232 $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_download"]);
233 $this->tpl->parseCurrentBlock();
235 if ($a_set[
"mob_cnt_play"] > 0)
237 $this->tpl->setCurrentBlock(
"prop");
238 $this->tpl->setVariable(
"TXT_PROP", $lng->txt(
"mcst_play_cnt"));
239 $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_play"]);
240 $this->tpl->parseCurrentBlock();