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");
64 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
67 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
70 if ($enable_internal_rss && !$this->presentation_mode)
72 $this->tpl->setCurrentBlock(
"access");
73 $this->tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
76 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
80 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
82 $this->tpl->parseCurrentBlock();
85 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id",
"");
89 if ($a_set[
"update_date"] !=
"")
91 $this->tpl->setCurrentBlock(
"last_update");
92 $this->tpl->setVariable(
"TXT_LAST_UPDATE",
93 $lng->txt(
"last_update"));
94 $this->tpl->setVariable(
"VAL_LAST_UPDATE",
96 $this->tpl->parseCurrentBlock();
100 $med = $mob->getMediaItem(
"Standard");
102 $this->tpl->setVariable(
"VAL_TITLE",
104 $this->tpl->setVariable(
"VAL_DESCRIPTION",
106 $this->tpl->setVariable(
"TXT_CREATED",
107 $lng->txt(
"created"));
108 $this->tpl->setVariable(
"VAL_CREATED",
111 $this->tpl->setVariable(
"TXT_DURATION",
112 $lng->txt(
"mcst_play_time"));
114 if ($a_set[
"playtime"] !=
"00:00:00")
116 $this->tpl->setVariable(
"VAL_DURATION",
121 $this->tpl->setVariable(
"VAL_DURATION",
"-");
124 if(!$this->edit_order)
126 if ($this->downloadable)
128 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
133 $a_mob = $mob->getMediaItem($purpose);
134 if (!is_object($a_mob))
136 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose", $a_mob->getPurpose());
141 $size =
", ".sprintf(
"%.1f MB",
$size/1024/1024);
143 $format = ($a_mob->getFormat()!=
"")?$a_mob->getFormat():
"audio/mpeg";
144 $this->tpl->setCurrentBlock(
"downloadable");
145 $this->tpl->setVariable(
"TXT_DOWNLOAD", $lng->txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
146 $this->tpl->setVariable(
"CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
147 $this->tpl->setVariable(
"TITLE_DOWNLOAD",
"(".$format.$size.
")");
148 $this->tpl->parseCurrentBlock();
152 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
156 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
157 $mpl->setFile($med->getLocation());
160 $mpl->setMimeType ($med->getFormat());
162 $mpl->setDisplayWidth(
"640");
163 $mpl->setDisplayHeight(
"480");
164 $mpl->setVideoPreviewPic($mob->getVideoPreviewPic());
165 $mpl->setTitle($a_set[
"title"]);
166 $mpl->setDescription($a_set[
"content"]);
168 $med_alt = $mob->getMediaItem(
"VideoAlternative");
169 if (is_object($med_alt))
172 $med_alt->getLocation());
173 $mpl->setAlternativeVideoMimeType($med_alt->getFormat());
178 $this->tpl->setVariable(
"PLAYER", $mpl->getPreviewHtml());
181 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
182 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) &&
183 !$this->presentation_mode)
185 $this->tpl->setCurrentBlock(
"edit");
186 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
187 $this->tpl->setVariable(
"CMD_EDIT",
188 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"editCastItem"));
190 if (!is_int(strpos($med->getFormat(),
"image/")))
192 $this->tpl->setVariable(
"TXT_DET_PLAYTIME", $lng->txt(
"mcst_det_playtime"));
193 $this->tpl->setVariable(
"CMD_DET_PLAYTIME",
194 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"determinePlaytime"));
196 $this->tpl->parseCurrentBlock();
198 $this->tpl->setCurrentBlock(
"edit_checkbox");
199 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
200 $this->tpl->parseCurrentBlock();
206 $this->tpl->setCurrentBlock(
"edit_order");
207 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
208 $this->tpl->setVariable(
"VAL_ORDER", $a_set[
"order"]);
209 $this->tpl->parseCurrentBlock();