- Beschreibungsfeld für Content hinzugefügt

- Spacer für CMS Menüs hinzugefügt
This commit is contained in:
Andreas Österreicher
2011-08-08 11:35:35 +00:00
parent 4b435a3b1f
commit ea5db70d25
5 changed files with 134 additions and 27 deletions
+9 -2
View File
@@ -79,8 +79,8 @@ $berechtigte_oe = $rechte->getOEkurzbz('basis/cms')
theme_advanced_resizing : true,
force_br_newlines : true,
force_p_newlines : false,
forced_root_block : ''
forced_root_block : '',
editor_deselector : "mceNoEditor"
}
);
function FHCFileBrowser(field_name, url, type, win)
@@ -197,6 +197,7 @@ if(!is_null($method))
$content->sprache=DEFAULT_LANGUAGE;
$content->insertvon = $user;
$content->insertamum = date('Y-m-d H:i:s');
$content->beschreibung = '';
if($content->save())
{
@@ -336,6 +337,7 @@ if(!is_null($method))
$aktiv=isset($_POST['aktiv']);
$menu_open=isset($_POST['menu_open']);
$template_kurzbz = $_POST['template_kurzbz'];
$beschreibung = $_POST['beschreibung'];
if($content->getContent($content_id, $sprache, $version))
{
@@ -347,6 +349,7 @@ if(!is_null($method))
$content->template_kurzbz = $template_kurzbz;
$content->updateamum=date('Y-m-d H:i:s');
$content->updatevon=$user;
$content->beschreibung = $beschreibung;
if($content->save())
{
@@ -1009,6 +1012,10 @@ function print_prefs()
<td>Menü offen</td>
<td><input type="checkbox" name="menu_open" '.($content->menu_open?'checked':'').'></td>
</tr>
<tr>
<td>Beschreibung</td>
<td><textarea name="beschreibung" cols="50" class="mceNoEditor" >'.$content->beschreibung.'</textarea></td>
</tr>
<tr>
<td></td>
<td><hr></td>
+42
View File
@@ -0,0 +1,42 @@
<?php
/* Copyright (C) 2011 FH Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
*/
/**
* Addon fuer Abstandhalter im Menuebaum
*/
require_once(dirname(__FILE__).'/menu_addon.class.php');
class menu_addon_spacer extends menu_addon
{
public function __construct()
{
parent::__construct();
$this->link=false;
$this->block='
<br /><br />
';
$this->output();
}
}
new menu_addon_spacer();
?>
+10 -3
View File
@@ -37,6 +37,7 @@ class content extends basis_db
public $oe_kurzbz;
public $aktiv;
public $menu_open;
public $beschreibung;
public $contentsprache_id;
public $sprache;
@@ -124,6 +125,7 @@ class content extends basis_db
$this->menu_open = ($row->menu_open=='t'?true:false);
$this->aktiv = ($row->aktiv=='t'?true:false);
$this->gesperrt_uid = $row->gesperrt_uid;
$this->beschreibung = $row->beschreibung;
return true;
}
else
@@ -385,7 +387,7 @@ class content extends basis_db
if($new)
{
$qry = "BEGIN;INSERT INTO campus.tbl_content(template_kurzbz, oe_kurzbz, updatevon, updateamum, insertvon, insertamum, aktiv, menu_open) VALUES(".
$qry = "BEGIN;INSERT INTO campus.tbl_content(template_kurzbz, oe_kurzbz, updatevon, updateamum, insertvon, insertamum, aktiv, menu_open, beschreibung) VALUES(".
$this->addslashes($this->template_kurzbz).','.
$this->addslashes($this->oe_kurzbz).','.
$this->addslashes($this->updatevon).','.
@@ -393,7 +395,8 @@ class content extends basis_db
$this->addslashes($this->insertvon).','.
$this->addslashes($this->insertamum).','.
($this->aktiv?'true':'false').','.
($this->menu_open?'true':'false').');';
($this->menu_open?'true':'false').','.
$this->addslashes($this->beschreibung).');';
}
else
{
@@ -403,7 +406,8 @@ class content extends basis_db
" template_kurzbz=".$this->addslashes($this->template_kurzbz).','.
" oe_kurzbz=".$this->addslashes($this->oe_kurzbz).','.
" aktiv=".($this->aktiv?'true':'false').','.
" menu_open=".($this->menu_open?'true':'false').
" menu_open=".($this->menu_open?'true':'false').','.
" beschreibung=".$this->addslashes($this->beschreibung).
" WHERE content_id='".addslashes($this->content_id)."';";
}
@@ -635,6 +639,7 @@ class content extends basis_db
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->beschreibung = $row->beschreibung;
$this->result[] = $obj;
}
@@ -751,6 +756,7 @@ class content extends basis_db
$obj->insertvon = $row->insertvon;
$obj->aktiv = ($row->aktiv=='t'?true:false);
$obj->menu_open = ($row->menu_open=='t'?true:false);
$obj->beschreibung = $row->beschreibung;
$this->result[] = $obj;
}
@@ -793,6 +799,7 @@ class content extends basis_db
$obj->insertvon = $row->insertvon;
$obj->aktiv = ($row->aktiv=='t'?true:false);
$obj->menu_open = ($row->menu_open=='t'?true:false);
$obj->beschreibung = $row->beschreibung;
$this->result[] = $obj;
}
+62 -21
View File
@@ -34916,7 +34916,7 @@
<Left>6368</Left>
<z>0</z>
<Width>811</Width>
<Height>395</Height>
<Height>434</Height>
<dz>0</dz>
<RecalculateSizes>1</RecalculateSizes>
<UseWorkSpaceRecalculateSizes>1</UseWorkSpaceRecalculateSizes>
@@ -36017,7 +36017,7 @@
<Id>{E1C9E6E3-90B8-49A2-85A0-2C382A2DEEB0}</Id>
</WorkSpaceShape2>
<NamePositionX>6166</NamePositionX>
<NamePositionY>1334</NamePositionY>
<NamePositionY>1347</NamePositionY>
<Points>
<Point>
<x>6182</x>
@@ -36029,11 +36029,11 @@
</Point>
<Point>
<x>6337</x>
<y>1333</y>
<y>1359</y>
</Point>
<Point>
<x>6368</x>
<y>1333</y>
<y>1359</y>
</Point>
</Points>
</WorkSpaceLinePERRelationPG83>
@@ -36060,15 +36060,15 @@
<Id>{EA51A6CA-3B44-4BC2-A8BE-355113344D54}</Id>
</WorkSpaceShape2>
<NamePositionX>6170</NamePositionX>
<NamePositionY>1037</NamePositionY>
<NamePositionY>1044</NamePositionY>
<Points>
<Point>
<x>6368</x>
<y>1202</y>
<y>1215</y>
</Point>
<Point>
<x>6337</x>
<y>1202</y>
<y>1215</y>
</Point>
<Point>
<x>6221</x>
@@ -36103,15 +36103,15 @@
<Id>{A98D91E4-4C4C-49F6-BBB7-DFB162F4DFA2}</Id>
</WorkSpaceShape2>
<NamePositionX>6653</NamePositionX>
<NamePositionY>1482</NamePositionY>
<NamePositionY>1502</NamePositionY>
<Points>
<Point>
<x>6774</x>
<y>1465</y>
<y>1504</y>
</Point>
<Point>
<x>6774</x>
<y>1496</y>
<y>1535</y>
</Point>
<Point>
<x>6748</x>
@@ -36373,15 +36373,15 @@
<Id>{15453C36-D1FA-4853-B57E-FAB64B00021D}</Id>
</WorkSpaceShape2>
<NamePositionX>7357</NamePositionX>
<NamePositionY>1673</NamePositionY>
<NamePositionY>1683</NamePositionY>
<Points>
<Point>
<x>7179</x>
<y>1268</y>
<y>1287</y>
</Point>
<Point>
<x>7210</x>
<y>1268</y>
<y>1287</y>
</Point>
<Point>
<x>7704</x>
@@ -43975,7 +43975,7 @@
<Company>Technikum Wien</Company>
<Version>2.0</Version>
<CreatedDate>2009-04-17T11:15:21.000+02:00</CreatedDate>
<ModifiedDate>2011-06-06T15:18:19.958+02:00</ModifiedDate>
<ModifiedDate>2011-08-08T10:47:00.461+02:00</ModifiedDate>
<Project>FH-Complete 2.0</Project>
<Description>&lt;?xml-stylesheet type="text/xsl" href="FHCompleteTDM3PG83.xsl"?&gt;
</Description>
@@ -56346,7 +56346,7 @@ Studiengang&gt;0 und Semester&gt;0 -&gt; News fuer bestimmtes Semester im Studie
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
@@ -68439,7 +68439,7 @@ Studiengang&gt;0 und Semester&gt;0 -&gt; News fuer bestimmtes Semester im Studie
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
@@ -76758,7 +76758,7 @@ Studiengang&gt;0 und Semester&gt;0 -&gt; News fuer bestimmtes Semester im Studie
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
@@ -78507,7 +78507,7 @@ Studiengang&gt;0 und Semester&gt;0 -&gt; News fuer bestimmtes Semester im Studie
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
@@ -86354,7 +86354,7 @@ art=tbl_benutzerrolle.art &amp; tbl_rolleberechtigung.art</Comments>
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
@@ -92110,7 +92110,7 @@ art=tbl_benutzerrolle.art &amp; tbl_rolleberechtigung.art</Comments>
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
@@ -131053,6 +131053,47 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a
<ArrDims></ArrDims>
<IsArray>0</IsArray>
</PERAttributePG83>
<PERAttributePG83 ObjectType="2003" CSAOName="PERAttributePG83">
<Id>{7F32B01F-6958-4A6E-B27A-EFDFB1562019}</Id>
<Name>beschreibung</Name>
<Ordinal>0</Ordinal>
<HistoryID>{E415024B-4DB4-4AA8-A9E1-C252A37F9AD2}</HistoryID>
<GlobalOrder>0</GlobalOrder>
<RNOffset>0</RNOffset>
<RNLength>0</RNLength>
<IgnoreNC>0</IgnoreNC>
<GenerateCode>1</GenerateCode>
<BeforeScript></BeforeScript>
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1></DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
<NotNull>0</NotNull>
<Migrated>0</Migrated>
<Caption>beschreibung</Caption>
<Unique>0</Unique>
<OriginalName></OriginalName>
<CheckConstraint></CheckConstraint>
<CheckConstraintName></CheckConstraintName>
<KeyConstraintItems/>
<PKForeignKeys/>
<FKForeignKeys/>
<DictType/>
<Domain/>
<DataType>
<Id>{8D91E2A4-12F5-40E3-BAC2-BFCF7BE1C8B7}</Id>
</DataType>
<UserDataType/>
<IndexItems/>
<Default/>
<CheckConstraints/>
<KeyConstraint/>
<ArrDims></ArrDims>
<IsArray>0</IsArray>
</PERAttributePG83>
</Attributes>
<Keys>
<PERKeyConstraintPG83 ObjectType="2010" CSAOName="PERKeyConstraintPG83">
@@ -132598,7 +132639,7 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a
<AfterScript></AfterScript>
<Notes></Notes>
<Comments></Comments>
<DataTypeParam1>16</DataTypeParam1>
<DataTypeParam1>32</DataTypeParam1>
<DataTypeParam2></DataTypeParam2>
<KeepForeignKey>0</KeepForeignKey>
<DefaultValue></DefaultValue>
+11 -1
View File
@@ -2592,6 +2592,16 @@ if($result = @$db->db_query("SELECT character_maximum_length as len FROM informa
}
}
//tbl_content beschreibung hinzufuegen
if(!$result = @$db->db_query("SELECT beschreibung FROM campus.tbl_content LIMIT 1;"))
{
$qry = "ALTER TABLE campus.tbl_content ADD COLUMN beschreibung text;";
if(!$db->db_query($qry))
echo '<strong>campus.tbl_content: '.$db->db_last_error().'</strong><br>';
else
echo 'campus.tbl_content: Spalte beschreibung hinzugefuegt!<br>';
}
echo '<br>';
@@ -2620,7 +2630,7 @@ $tabellen=array(
"campus.tbl_abgabe" => array("abgabe_id","abgabedatei","abgabezeit","anmerkung"),
"campus.tbl_beispiel" => array("beispiel_id","uebung_id","nummer","bezeichnung","punkte","updateamum","updatevon","insertamum","insertvon"),
"campus.tbl_benutzerlvstudiensemester" => array("uid","studiensemester_kurzbz","lehrveranstaltung_id"),
"campus.tbl_content" => array("content_id","template_kurzbz","updatevon","updateamum","insertamum","insertvon","oe_kurzbz","menu_open","aktiv"),
"campus.tbl_content" => array("content_id","template_kurzbz","updatevon","updateamum","insertamum","insertvon","oe_kurzbz","menu_open","aktiv","beschreibung"),
"campus.tbl_contentchild" => array("contentchild_id","content_id","child_content_id","updatevon","updateamum","insertamum","insertvon","sort"),
"campus.tbl_contentgruppe" => array("content_id","gruppe_kurzbz","insertamum","insertvon"),
"campus.tbl_contentlog" => array("contentlog_id","contentsprache_id","uid","start","ende"),