Alba-desarrollo
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
April 2007
- 2 participants
- 97 discussions
SVN Alba r4552 - in prosistem/alba/trunk/alba: config lib/model lib/model/map lib/model/om
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: hsanchez
Date: 2007-04-18 13:22:53 -0300 (Wed, 18 Apr 2007)
New Revision: 4552
Added:
prosistem/alba/trunk/alba/lib/model/Roles.php
prosistem/alba/trunk/alba/lib/model/RolesPeer.php
prosistem/alba/trunk/alba/lib/model/map/RolesMapBuilder.php
prosistem/alba/trunk/alba/lib/model/om/BaseRoles.php
prosistem/alba/trunk/alba/lib/model/om/BaseRolesPeer.php
Modified:
prosistem/alba/trunk/alba/config/schema.xml
Log:
Agregando al schema y el modelo para roles de responsables
Modified: prosistem/alba/trunk/alba/config/schema.xml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.xml 2007-04-18 16:21:23 UTC (rev 4551)
+++ prosistem/alba/trunk/alba/config/schema.xml 2007-04-18 16:22:53 UTC (rev 4552)
@@ -723,4 +723,10 @@
<column name="grupo" type="varchar" size="30" required="false" default=""/>
<column name="defecto" type="boolean" required="true" default="0"/>
</table>
+ <table name="roles" idMethod="native">
+ <column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"/>
+ <column name="nombre" type="VARCHAR" size="128" required="true" default=""/>
+ <column name="descripcion" type="VARCHAR" size="255" default=""/>
+ <column name="activo" type="BOOLEAN" required="true" default="true"/>
+ </table>
</database>
\ No newline at end of file
Added: prosistem/alba/trunk/alba/lib/model/Roles.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/Roles.php 2007-04-18 16:21:23 UTC (rev 4551)
+++ prosistem/alba/trunk/alba/lib/model/Roles.php 2007-04-18 16:22:53 UTC (rev 4552)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for representing a row from the 'roles' table.
+ *
+ *
+ *
+ * @package lib.model
+ */
+class Roles extends BaseRoles
+{
+}
Property changes on: prosistem/alba/trunk/alba/lib/model/Roles.php
___________________________________________________________________
Name: svn:keywords
+ Id Date Author Rev URL
Added: prosistem/alba/trunk/alba/lib/model/RolesPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/RolesPeer.php 2007-04-18 16:21:23 UTC (rev 4551)
+++ prosistem/alba/trunk/alba/lib/model/RolesPeer.php 2007-04-18 16:22:53 UTC (rev 4552)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for performing query and update operations on the 'roles' table.
+ *
+ *
+ *
+ * @package lib.model
+ */
+class RolesPeer extends BaseRolesPeer
+{
+}
Property changes on: prosistem/alba/trunk/alba/lib/model/RolesPeer.php
___________________________________________________________________
Name: svn:keywords
+ Id Date Author Rev URL
Added: prosistem/alba/trunk/alba/lib/model/map/RolesMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/RolesMapBuilder.php 2007-04-18 16:21:23 UTC (rev 4551)
+++ prosistem/alba/trunk/alba/lib/model/map/RolesMapBuilder.php 2007-04-18 16:22:53 UTC (rev 4552)
@@ -0,0 +1,44 @@
+<?php
+
+
+
+class RolesMapBuilder {
+
+
+ const CLASS_NAME = 'lib.model.map.RolesMapBuilder';
+
+
+ private $dbMap;
+
+
+ public function isBuilt()
+ {
+ return ($this->dbMap !== null);
+ }
+
+
+ public function getDatabaseMap()
+ {
+ return $this->dbMap;
+ }
+
+
+ public function doBuild()
+ {
+ $this->dbMap = Propel::getDatabaseMap('alba');
+
+ $tMap = $this->dbMap->addTable('roles');
+ $tMap->setPhpName('Roles');
+
+ $tMap->setUseIdGenerator(true);
+
+ $tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('NOMBRE', 'Nombre', 'string', CreoleTypes::VARCHAR, true, 128);
+
+ $tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('ACTIVO', 'Activo', 'boolean', CreoleTypes::BOOLEAN, true);
+
+ }
+}
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/lib/model/map/RolesMapBuilder.php
___________________________________________________________________
Name: svn:keywords
+ Id Date Author Rev URL
Added: prosistem/alba/trunk/alba/lib/model/om/BaseRoles.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRoles.php 2007-04-18 16:21:23 UTC (rev 4551)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRoles.php 2007-04-18 16:22:53 UTC (rev 4552)
@@ -0,0 +1,379 @@
+<?php
+
+
+abstract class BaseRoles extends BaseObject implements Persistent {
+
+
+
+ protected static $peer;
+
+
+
+ protected $id;
+
+
+
+ protected $nombre = '';
+
+
+
+ protected $descripcion = '';
+
+
+
+ protected $activo = true;
+
+
+ protected $alreadyInSave = false;
+
+
+ protected $alreadyInValidation = false;
+
+
+ public function getId()
+ {
+
+ return $this->id;
+ }
+
+
+ public function getNombre()
+ {
+
+ return $this->nombre;
+ }
+
+
+ public function getDescripcion()
+ {
+
+ return $this->descripcion;
+ }
+
+
+ public function getActivo()
+ {
+
+ return $this->activo;
+ }
+
+
+ public function setId($v)
+ {
+
+ if ($this->id !== $v) {
+ $this->id = $v;
+ $this->modifiedColumns[] = RolesPeer::ID;
+ }
+
+ }
+
+ public function setNombre($v)
+ {
+
+ if ($this->nombre !== $v || $v === '') {
+ $this->nombre = $v;
+ $this->modifiedColumns[] = RolesPeer::NOMBRE;
+ }
+
+ }
+
+ public function setDescripcion($v)
+ {
+
+ if ($this->descripcion !== $v || $v === '') {
+ $this->descripcion = $v;
+ $this->modifiedColumns[] = RolesPeer::DESCRIPCION;
+ }
+
+ }
+
+ public function setActivo($v)
+ {
+
+ if ($this->activo !== $v || $v === true) {
+ $this->activo = $v;
+ $this->modifiedColumns[] = RolesPeer::ACTIVO;
+ }
+
+ }
+
+ public function hydrate(ResultSet $rs, $startcol = 1)
+ {
+ try {
+
+ $this->id = $rs->getInt($startcol + 0);
+
+ $this->nombre = $rs->getString($startcol + 1);
+
+ $this->descripcion = $rs->getString($startcol + 2);
+
+ $this->activo = $rs->getBoolean($startcol + 3);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ return $startcol + 4;
+ } catch (Exception $e) {
+ throw new PropelException("Error populating Roles object", $e);
+ }
+ }
+
+
+ public function delete($con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("This object has already been deleted.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(RolesPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ RolesPeer::doDelete($this, $con);
+ $this->setDeleted(true);
+ $con->commit();
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+
+ public function save($con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("You cannot save an object that has been deleted.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(RolesPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ $affectedRows = $this->doSave($con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+
+ protected function doSave($con)
+ {
+ $affectedRows = 0; if (!$this->alreadyInSave) {
+ $this->alreadyInSave = true;
+
+
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = RolesPeer::doInsert($this, $con);
+ $affectedRows += 1;
+ $this->setId($pk);
+ $this->setNew(false);
+ } else {
+ $affectedRows += RolesPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ }
+
+ protected $validationFailures = array();
+
+
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = RolesPeer::doValidate($this, $columns)) !== true) {
+ $failureMap = array_merge($failureMap, $retval);
+ }
+
+
+
+ $this->alreadyInValidation = false;
+ }
+
+ return (!empty($failureMap) ? $failureMap : true);
+ }
+
+
+ public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
+ {
+ $pos = RolesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ return $this->getByPosition($pos);
+ }
+
+
+ public function getByPosition($pos)
+ {
+ switch($pos) {
+ case 0:
+ return $this->getId();
+ break;
+ case 1:
+ return $this->getNombre();
+ break;
+ case 2:
+ return $this->getDescripcion();
+ break;
+ case 3:
+ return $this->getActivo();
+ break;
+ default:
+ return null;
+ break;
+ } }
+
+
+ public function toArray($keyType = BasePeer::TYPE_PHPNAME)
+ {
+ $keys = RolesPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getId(),
+ $keys[1] => $this->getNombre(),
+ $keys[2] => $this->getDescripcion(),
+ $keys[3] => $this->getActivo(),
+ );
+ return $result;
+ }
+
+
+ public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
+ {
+ $pos = RolesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ return $this->setByPosition($pos, $value);
+ }
+
+
+ public function setByPosition($pos, $value)
+ {
+ switch($pos) {
+ case 0:
+ $this->setId($value);
+ break;
+ case 1:
+ $this->setNombre($value);
+ break;
+ case 2:
+ $this->setDescripcion($value);
+ break;
+ case 3:
+ $this->setActivo($value);
+ break;
+ } }
+
+
+ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
+ {
+ $keys = RolesPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
+ if (array_key_exists($keys[1], $arr)) $this->setNombre($arr[$keys[1]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDescripcion($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setActivo($arr[$keys[3]]);
+ }
+
+
+ public function buildCriteria()
+ {
+ $criteria = new Criteria(RolesPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(RolesPeer::ID)) $criteria->add(RolesPeer::ID, $this->id);
+ if ($this->isColumnModified(RolesPeer::NOMBRE)) $criteria->add(RolesPeer::NOMBRE, $this->nombre);
+ if ($this->isColumnModified(RolesPeer::DESCRIPCION)) $criteria->add(RolesPeer::DESCRIPCION, $this->descripcion);
+ if ($this->isColumnModified(RolesPeer::ACTIVO)) $criteria->add(RolesPeer::ACTIVO, $this->activo);
+
+ return $criteria;
+ }
+
+
+ public function buildPkeyCriteria()
+ {
+ $criteria = new Criteria(RolesPeer::DATABASE_NAME);
+
+ $criteria->add(RolesPeer::ID, $this->id);
+
+ return $criteria;
+ }
+
+
+ public function getPrimaryKey()
+ {
+ return $this->getId();
+ }
+
+
+ public function setPrimaryKey($key)
+ {
+ $this->setId($key);
+ }
+
+
+ public function copyInto($copyObj, $deepCopy = false)
+ {
+
+ $copyObj->setNombre($this->nombre);
+
+ $copyObj->setDescripcion($this->descripcion);
+
+ $copyObj->setActivo($this->activo);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setId(NULL);
+ }
+
+
+ public function copy($deepCopy = false)
+ {
+ $clazz = get_class($this);
+ $copyObj = new $clazz();
+ $this->copyInto($copyObj, $deepCopy);
+ return $copyObj;
+ }
+
+
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new RolesPeer();
+ }
+ return self::$peer;
+ }
+
+}
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/lib/model/om/BaseRoles.php
___________________________________________________________________
Name: svn:keywords
+ Id Date Author Rev URL
Added: prosistem/alba/trunk/alba/lib/model/om/BaseRolesPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRolesPeer.php 2007-04-18 16:21:23 UTC (rev 4551)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRolesPeer.php 2007-04-18 16:22:53 UTC (rev 4552)
@@ -0,0 +1,378 @@
+<?php
+
+
+abstract class BaseRolesPeer {
+
+
+ const DATABASE_NAME = 'alba';
+
+
+ const TABLE_NAME = 'roles';
+
+
+ const CLASS_DEFAULT = 'lib.model.Roles';
+
+
+ const NUM_COLUMNS = 4;
+
+
+ const NUM_LAZY_LOAD_COLUMNS = 0;
+
+
+
+ const ID = 'roles.ID';
+
+
+ const NOMBRE = 'roles.NOMBRE';
+
+
+ const DESCRIPCION = 'roles.DESCRIPCION';
+
+
+ const ACTIVO = 'roles.ACTIVO';
+
+
+ private static $phpNameMap = null;
+
+
+
+ private static $fieldNames = array (
+ BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Descripcion', 'Activo', ),
+ BasePeer::TYPE_COLNAME => array (RolesPeer::ID, RolesPeer::NOMBRE, RolesPeer::DESCRIPCION, RolesPeer::ACTIVO, ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'descripcion', 'activo', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+ );
+
+
+ private static $fieldKeys = array (
+ BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Descripcion' => 2, 'Activo' => 3, ),
+ BasePeer::TYPE_COLNAME => array (RolesPeer::ID => 0, RolesPeer::NOMBRE => 1, RolesPeer::DESCRIPCION => 2, RolesPeer::ACTIVO => 3, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'descripcion' => 2, 'activo' => 3, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+ );
+
+
+ public static function getMapBuilder()
+ {
+ include_once 'lib/model/map/RolesMapBuilder.php';
+ return BasePeer::getMapBuilder('lib.model.map.RolesMapBuilder');
+ }
+
+ public static function getPhpNameMap()
+ {
+ if (self::$phpNameMap === null) {
+ $map = RolesPeer::getTableMap();
+ $columns = $map->getColumns();
+ $nameMap = array();
+ foreach ($columns as $column) {
+ $nameMap[$column->getPhpName()] = $column->getColumnName();
+ }
+ self::$phpNameMap = $nameMap;
+ }
+ return self::$phpNameMap;
+ }
+
+ static public function translateFieldName($name, $fromType, $toType)
+ {
+ $toNames = self::getFieldNames($toType);
+ $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
+ if ($key === null) {
+ throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
+ }
+ return $toNames[$key];
+ }
+
+
+
+ static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
+ {
+ if (!array_key_exists($type, self::$fieldNames)) {
+ throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
+ }
+ return self::$fieldNames[$type];
+ }
+
+
+ public static function alias($alias, $column)
+ {
+ return str_replace(RolesPeer::TABLE_NAME.'.', $alias.'.', $column);
+ }
+
+
+ public static function addSelectColumns(Criteria $criteria)
+ {
+
+ $criteria->addSelectColumn(RolesPeer::ID);
+
+ $criteria->addSelectColumn(RolesPeer::NOMBRE);
+
+ $criteria->addSelectColumn(RolesPeer::DESCRIPCION);
+
+ $criteria->addSelectColumn(RolesPeer::ACTIVO);
+
+ }
+
+ const COUNT = 'COUNT(roles.ID)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT roles.ID)';
+
+
+ public static function doCount(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $criteria = clone $criteria;
+
+ $criteria->clearSelectColumns()->clearOrderByColumns();
+ if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->addSelectColumn(RolesPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(RolesPeer::COUNT);
+ }
+
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = RolesPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ return 0;
+ }
+ }
+
+ public static function doSelectOne(Criteria $criteria, $con = null)
+ {
+ $critcopy = clone $criteria;
+ $critcopy->setLimit(1);
+ $objects = RolesPeer::doSelect($critcopy, $con);
+ if ($objects) {
+ return $objects[0];
+ }
+ return null;
+ }
+
+ public static function doSelect(Criteria $criteria, $con = null)
+ {
+ return RolesPeer::populateObjects(RolesPeer::doSelectRS($criteria, $con));
+ }
+
+ public static function doSelectRS(Criteria $criteria, $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(self::DATABASE_NAME);
+ }
+
+ if (!$criteria->getSelectColumns()) {
+ $criteria = clone $criteria;
+ RolesPeer::addSelectColumns($criteria);
+ }
+
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ return BasePeer::doSelect($criteria, $con);
+ }
+
+ public static function populateObjects(ResultSet $rs)
+ {
+ $results = array();
+
+ $cls = RolesPeer::getOMClass();
+ $cls = Propel::import($cls);
+ while($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ public static function getTableMap()
+ {
+ return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
+ }
+
+
+ public static function getOMClass()
+ {
+ return RolesPeer::CLASS_DEFAULT;
+ }
+
+
+ public static function doInsert($values, $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(self::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; } else {
+ $criteria = $values->buildCriteria(); }
+
+ $criteria->remove(RolesPeer::ID);
+
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ try {
+ $con->begin();
+ $pk = BasePeer::doInsert($criteria, $con);
+ $con->commit();
+ } catch(PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+
+ return $pk;
+ }
+
+
+ public static function doUpdate($values, $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(self::DATABASE_NAME);
+ }
+
+ $selectCriteria = new Criteria(self::DATABASE_NAME);
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values;
+ $comparison = $criteria->getComparison(RolesPeer::ID);
+ $selectCriteria->add(RolesPeer::ID, $criteria->remove(RolesPeer::ID), $comparison);
+
+ } else { $criteria = $values->buildCriteria(); $selectCriteria = $values->buildPkeyCriteria(); }
+
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ return BasePeer::doUpdate($selectCriteria, $criteria, $con);
+ }
+
+
+ public static function doDeleteAll($con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(self::DATABASE_NAME);
+ }
+ $affectedRows = 0; try {
+ $con->begin();
+ $affectedRows += BasePeer::doDeleteAll(RolesPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+
+ public static function doDelete($values, $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(RolesPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; } elseif ($values instanceof Roles) {
+
+ $criteria = $values->buildPkeyCriteria();
+ } else {
+ $criteria = new Criteria(self::DATABASE_NAME);
+ $criteria->add(RolesPeer::ID, (array) $values, Criteria::IN);
+ }
+
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ $affectedRows = 0;
+ try {
+ $con->begin();
+
+ $affectedRows += BasePeer::doDelete($criteria, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+
+ public static function doValidate(Roles $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(RolesPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(RolesPeer::TABLE_NAME);
+
+ if (! is_array($cols)) {
+ $cols = array($cols);
+ }
+
+ foreach($cols as $colName) {
+ if ($tableMap->containsColumn($colName)) {
+ $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
+ $columns[$colName] = $obj->$get();
+ }
+ }
+ } else {
+
+ }
+
+ $res = BasePeer::doValidate(RolesPeer::DATABASE_NAME, RolesPeer::TABLE_NAME, $columns);
+ if ($res !== true) {
+ $request = sfContext::getInstance()->getRequest();
+ foreach ($res as $failed) {
+ $col = RolesPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
+ $request->setError($col, $failed->getMessage());
+ }
+ }
+
+ return $res;
+ }
+
+
+ public static function retrieveByPK($pk, $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(self::DATABASE_NAME);
+ }
+
+ $criteria = new Criteria(RolesPeer::DATABASE_NAME);
+
+ $criteria->add(RolesPeer::ID, $pk);
+
+
+ $v = RolesPeer::doSelect($criteria, $con);
+
+ return !empty($v) > 0 ? $v[0] : null;
+ }
+
+
+ public static function retrieveByPKs($pks, $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(self::DATABASE_NAME);
+ }
+
+ $objs = null;
+ if (empty($pks)) {
+ $objs = array();
+ } else {
+ $criteria = new Criteria();
+ $criteria->add(RolesPeer::ID, $pks, Criteria::IN);
+ $objs = RolesPeer::doSelect($criteria, $con);
+ }
+ return $objs;
+ }
+
+}
+if (Propel::isInit()) {
+ try {
+ BaseRolesPeer::getMapBuilder();
+ } catch (Exception $e) {
+ Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
+ }
+} else {
+ require_once 'lib/model/map/RolesMapBuilder.php';
+ Propel::registerMapBuilder('lib.model.map.RolesMapBuilder');
+}
Property changes on: prosistem/alba/trunk/alba/lib/model/om/BaseRolesPeer.php
___________________________________________________________________
Name: svn:keywords
+ Id Date Author Rev URL
1
0
SVN Alba r4551 - in prosistem/alba/trunk/alba: data/sql plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: josx
Date: 2007-04-18 13:21:23 -0300 (Wed, 18 Apr 2007)
New Revision: 4551
Added:
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql
Modified:
prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql
prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php
Log:
Se agrego el modulo de biblioteca de contenidos basado en sfMediaLibrary plugin ( ticket #68 )
Added: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-18 15:25:37 UTC (rev 4550)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-18 16:21:23 UTC (rev 4551)
@@ -0,0 +1,9 @@
+SET CHARACTER SET utf8;
+SET FOREIGN_KEY_CHECKS = 0;
+
+INSERT INTO `menu` ( `id` , `nombre` , `link` , `perm` , `fk_padre_menu_id` , `orden` , `target` )
+VALUES (
+'96', 'Biblioteca de contenidos', 'sfMediaLibrary', 'informes', '9', '0', ''
+);
+
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql 2007-04-18 15:25:37 UTC (rev 4550)
+++ prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql 2007-04-18 16:21:23 UTC (rev 4551)
@@ -215,8 +215,8 @@
INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (93, 'Solicitud de Legajo', 'informes/solicitudLegajoBusquedaFormulario', 'informes', '9', '0', '_blank');
INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (94, 'Definir Períodos', '#', 'ciclolectivo', 86, 10, '');
INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (95, 'Ir a Ciclo Lectivo Actual', 'ciclolectivo/agregarTurnosYPeriodos', 'ciclolectivo', 7, 0, '');
+INSERT INTO `menu` ( `id` , `nombre` , `link` , `perm` , `fk_padre_menu_id` , `orden` , `target` ) VALUES (96, 'Biblioteca de contenidos', 'sfMediaLibrary', 'informes', 9, 0, '');
-
--
-- Volcar la base de datos para la tabla 'modulo'
--
Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-04-18 15:25:37 UTC (rev 4550)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-04-18 16:21:23 UTC (rev 4551)
@@ -2711,6 +2711,7 @@
INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (93, 'Boletines', 'informes/boletinFormulario', 'informes', 9, 0, '_blank');
INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (94, 'Certificado de Estudios', 'informes/certificadoEstudiosBusquedaFormulario', 'informes', 9, 0, '_blank');
INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (95, 'Solicitud de Legajo', 'informes/solicitudLegajoBusquedaFormulario', 'informes', 9, 0, '_blank');
+INSERT INTO `menu` ( `id` , `nombre` , `link` , `perm` , `fk_padre_menu_id` , `orden` , `target` ) VALUES (96, 'Biblioteca de contenidos', 'sfMediaLibrary', 'informes', 9, 0, '');
--
-- Volcar la base de datos para la tabla `modulo`
Modified: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php 2007-04-18 15:25:37 UTC (rev 4550)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php 2007-04-18 16:21:23 UTC (rev 4551)
@@ -29,7 +29,7 @@
) + $size2) ?>
<?php if($action === "index"): ?>
<?php echo content_tag('a', $thumbnail, array(
- 'href' => $web_abs_current_path.'/'.$name,
+ 'href' => sfContext::getInstance()->getRequest()->getRelativeUrlRoot().$web_abs_current_path.'/'.$name,
'target' => '_blank',
)) ?>
<?php else: ?>
1
0
SVN Alba r4550 - prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: josx
Date: 2007-04-18 12:25:37 -0300 (Wed, 18 Apr 2007)
New Revision: 4550
Added:
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.es.xml
Log:
Agregando al plugin sfMediaLibrary la traduccion respectiva para el idioma espa?\195?\177ol
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.es.xml
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.es.xml 2007-04-18 15:24:05 UTC (rev 4549)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.es.xml 2007-04-18 15:25:37 UTC (rev 4550)
@@ -0,0 +1,63 @@
+<?xml version="1.0" ?>
+<xliff version="1.0">
+ <file orginal="global" source-language="en_US" datatype="plaintext" date="2004-12-28T18:10:19Z">
+ <body>
+ <trans-unit id="1">
+ <source>Add</source>
+ <target>Agregar</target>
+ </trans-unit>
+ <trans-unit id="2">
+ <source>Media library (%1%)</source>
+ <target>Biblioteca de contenidos (%1%)</target>
+ </trans-unit>
+ <trans-unit id="3">
+ <source>Add a file:</source>
+ <target>Agregar un archivo</target>
+ </trans-unit>
+ <trans-unit id="4">
+ <source>Create a dir:</source>
+ <target>Crear una carpeta</target>
+ </trans-unit>
+ <trans-unit id="5">
+ <source>Create</source>
+ <target>Crear</target>
+ </trans-unit>
+ <trans-unit id="6">
+ <source>Rename in process...</source>
+ <target>Renombrar en proceso...</target>
+ </trans-unit>
+ <trans-unit id="7">
+ <source>Cancel</source>
+ <target>Cancelar</target>
+ </trans-unit>
+ <trans-unit id="8">
+ <source>Delete</source>
+ <target>Borrar</target>
+ </trans-unit>
+ <trans-unit id="9">
+ <source>Click to edit</source>
+ <target>Click para editar</target>
+ </trans-unit>
+ <trans-unit id="10">
+ <source>Are you sure to want to delete this folder?</source>
+ <target>¿Esta seguro que desea borrar esta carpeta?</target>
+ </trans-unit>
+ <trans-unit id="11">
+ <source>Are you sure to want to delete this file?</source>
+ <target>¿Esta seguro que desea borrar este archivo?</target>
+ </trans-unit>
+ <trans-unit id="12">
+ <source>Rename</source>
+ <target>Renombrar</target>
+ </trans-unit>
+ <trans-unit id="13">
+ <source>Please choose a file first</source>
+ <target>Por favor primero elija un archivo</target>
+ </trans-unit>
+ <trans-unit id="14">
+ <source>Please enter a directory name first</source>
+ <target>Por favor primero ingrese un nombre para la carpeta</target>
+ </trans-unit>
+ </body>
+ </file>
+</xliff>
\ No newline at end of file
1
0
SVN Alba r4549 - prosistem/alba/trunk/alba/apps/principal/config
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: josx
Date: 2007-04-18 12:24:05 -0300 (Wed, 18 Apr 2007)
New Revision: 4549
Modified:
prosistem/alba/trunk/alba/apps/principal/config/settings.yml
Log:
Agregando soporte al symfony para el plugin sfMediaLibrary
Modified: prosistem/alba/trunk/alba/apps/principal/config/settings.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/config/settings.yml 2007-04-18 15:23:04 UTC (rev 4548)
+++ prosistem/alba/trunk/alba/apps/principal/config/settings.yml 2007-04-18 15:24:05 UTC (rev 4549)
@@ -27,6 +27,7 @@
.actions:
default_module: default
default_action: index
+
#
# error_404_module: default
# error_404_action: error404
@@ -44,6 +45,8 @@
# unavailable_action: unavailable
#
.settings:
+
+ enabled_modules: [ default, sfMediaLibrary]
# available: on
#
# path_info_array: SERVER
1
0
SVN Alba r4548 - in prosistem/alba/trunk/alba/web: . sfMediaLibraryPlugin sfMediaLibraryPlugin/css sfMediaLibraryPlugin/images sfMediaLibraryPlugin/js
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: josx
Date: 2007-04-18 12:23:04 -0300 (Wed, 18 Apr 2007)
New Revision: 4548
Added:
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/archive.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/bin.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/delete.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/doc.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/edit.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/filenew.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_new.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_open.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/html.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/image.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/pdf.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/ppt.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/txt.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/unknown.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/up.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/xls.png
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/
prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js
Log:
Archivos necesarios para los estilos del plugin sfMediaLibrary
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css
===================================================================
--- prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css 2007-04-18 15:23:08 UTC (rev 4547)
+++ prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css 2007-04-18 15:23:04 UTC (rev 4548)
@@ -0,0 +1,190 @@
+#sf_asset_container ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input
+{ margin: 0; padding: 0; }
+#sf_asset_container a img,:link img,:visited img { border: none; }
+
+#sf_asset_container a:link, #sf_admin_container a:visited
+{
+ text-decoration: none;
+}
+
+#sf_asset_container a:hover
+{
+ text-decoration: underline;
+}
+
+#sf_asset_container td
+{
+ margin: 0;
+ padding: 20px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ background-color: #fff;
+}
+
+#sf_asset_container p
+{
+ margin-bottom: 5px;
+}
+
+
+#sf_asset_container #sf_asset_assets
+{
+ padding-top: 10px;
+ clear: left;
+}
+
+#sf_asset_container h1
+{
+ margin: 8px 0;
+ padding: 3px;
+ padding-left: 0px;
+ color: #555;
+ font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
+ font-size: 25px;
+}
+
+#sf_asset_container input
+{
+ padding: 3px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ border: 1px solid #ddd;
+ vertical-align:middle;
+}
+
+#sf_asset_container label
+{
+ display: block;
+ padding: 0 1em 3px 0;
+ text-align: left;
+ color: #666;
+ font-weight: normal !important;
+}
+
+#sf_asset_container .form-row
+{
+ padding: 10px;
+ border-bottom: 1px solid #ddd;
+ height: 40px;
+}
+
+#sf_asset_container #sf_asset_upload_form
+{
+ width: 240px;
+ margin-right: 10px;
+}
+
+#sf_asset_container #sf_asset_mkdir_form
+{
+ width: 150px;
+}
+
+#sf_asset_container fieldset
+{
+ margin-bottom: 3px;
+ border: 1px solid #ddd;
+ border-bottom: 0px;
+}
+
+#sf_asset_container .float-left
+{
+ float: left;
+}
+
+#sf_asset_container .float-right
+{
+ float: right;
+}
+
+#sf_asset_container ul.sf_asset_actions
+{
+ display: block;
+ margin: 0;
+ list-style-type: none;
+ text-align: right;
+}
+
+#sf_asset_container ul.sf_asset_actions a
+{
+ color: #333;
+}
+
+#sf_asset_container ul.sf_asset_actions li
+{
+ list-style-type: none;
+ display: inline;
+}
+
+#sf_asset_container ul.sf_asset_actions input
+{
+ padding: 3px 3px 3px 20px;
+ color: #333;
+ font-size: 11px;
+ font-family: Arial, sans-serif;
+ border: 0px;
+ border-right: 4px solid #999;
+ background-color: #ffc;
+ cursor: hand;
+ cursor: pointer;
+}
+
+#sf_asset_container .sf_asset_action_add_file
+{
+ background: url(../images/filenew.png) no-repeat 3px 2px;
+ border-right: 4px solid #73B65A !important;
+}
+
+#sf_asset_container .sf_asset_action_add_folder
+{
+ background: url(../images/folder_new.png) no-repeat 3px 2px;
+ border-right: 4px solid #73B65A !important;
+}
+
+#sf_asset_container .sf_asset_filters li
+{
+ list-style-type: none;
+}
+
+#sf_asset_container .assetImage
+{
+ float: left;
+ padding: 10px 20px 5px 20px;
+ margin-right: 15px;
+ margin-bottom: 15px;
+ border: 1px solid #ddd;
+ background-color: #eee;
+ text-align: center;
+}
+
+#sf_asset_container .assetComment
+{
+ font-family: Arial, sans-serif;
+ margin: -5px -20px;
+ margin-top: 10px;
+ padding: 2px;
+ padding-left: 5px;
+ padding-right: 5px;
+ background-color: #aaa;
+ font-size: 90%;
+ color: #eee;
+ text-align: left;
+}
+
+#sf_asset_container .assetComment a
+{
+ border-bottom: 0;
+}
+
+#sf_asset_container .assetImage a
+{
+ color: #eee;
+ border-bottom: 0;
+}
+
+#sf_asset_container .thumbnails
+{
+ width: auto !important;
+ width: 0;
+ height: 64px;
+
+}
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/archive.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/archive.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/bin.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/bin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/delete.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/doc.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/doc.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/edit.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/edit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/filenew.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/filenew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_new.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_new.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_open.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_open.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/html.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/html.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/image.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/pdf.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/pdf.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/ppt.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/ppt.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/txt.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/txt.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/unknown.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/unknown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/up.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/up.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/xls.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/xls.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js
===================================================================
--- prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js 2007-04-18 15:23:08 UTC (rev 4547)
+++ prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js 2007-04-18 15:23:04 UTC (rev 4548)
@@ -0,0 +1,132 @@
+function sfMediaLibrary_Engine()
+{
+ // Browser check
+ var ua = navigator.userAgent;
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+ this.isMSIE5 = this.isMSIE && (ua.indexOf('MSIE 5') != -1);
+ this.isMSIE5_0 = this.isMSIE && (ua.indexOf('MSIE 5.0') != -1);
+ this.isGecko = ua.indexOf('Gecko') != -1;
+ this.isSafari = ua.indexOf('Safari') != -1;
+ this.isOpera = ua.indexOf('Opera') != -1;
+ this.isMac = ua.indexOf('Mac') != -1;
+ this.isNS7 = ua.indexOf('Netscape/7') != -1;
+ this.isNS71 = ua.indexOf('Netscape/7.1') != -1;
+ this.isTinyMCE = false;
+
+ // Fake MSIE on Opera and if Opera fakes IE, Gecko or Safari cancel those
+ if (this.isOpera) {
+ this.isMSIE = true;
+ this.isGecko = false;
+ this.isSafari = false;
+ }
+}
+
+sfMediaLibrary_Engine.prototype = {
+ init : function(url)
+ {
+ this.url = url;
+ },
+
+ fileBrowserReturn : function (url)
+ {
+ if(this.isTinyMCE)
+ {
+ tinyMCE.setWindowArg('editor_id', this.fileBrowserWindowArg);
+ if (this.fileBrowserType == 'image')
+ {
+ this.fileBrowserWin.showPreviewImage(url);
+ }
+ }
+ this.fileBrowserWin.document.forms[this.fileBrowserFormName].elements[this.fileBrowserFieldName].value = url;
+ },
+
+ fileBrowserCallBack : function (field_name, url, type, win)
+ {
+ this.isTinyMCE = true;
+ this.fileBrowserWindowArg = tinyMCE.getWindowArg('editor_id');
+ var template = new Array();
+ template['title'] = 'Assets';
+ var url = this.url;
+ if (type == 'image')
+ url += '/images_only/1';
+ template['file'] = url;
+ template['width'] = 550;
+ template['height'] = 600;
+ template['close_previous'] = 'no';
+
+ this.fileBrowserWin = win;
+ this.fileBrowserFormName = 0;
+ this.fileBrowserFieldName = field_name;
+ this.fileBrowserType = type;
+ tinyMCE.openWindow(template, {inline : "yes", scrollbars: 'yes'});
+ },
+
+ openWindow : function(options)
+ {
+ var width, height, x, y, resizable, scrollbars, url;
+
+ if (!options)
+ return;
+ if (!options['field_name'])
+ return;
+ if (!options['url'] && !this.url)
+ return;
+ this.fileBrowserWin = self;
+ this.fileBrowserFormName = (options['form_name'] == '') ? 0 : options['form_name'];
+ this.fileBrowserFieldName = options['field_name'];
+ this.fileBrowserType = options['type'];
+
+ url = this.url;
+ if (options['type'] == 'image')
+ url += '/images_only/1';
+
+ if (!(width = parseInt(options['width'])))
+ width = 550;
+
+ if (!(width = parseInt(options['width'])))
+ width = 550;
+
+ if (!(height = parseInt(options['height'])))
+ height = 600;
+
+ // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!!
+ if (sfMediaLibrary.isMSIE)
+ height += 40;
+ else
+ height += 20;
+
+ x = parseInt(screen.width / 2.0) - (width / 2.0);
+ y = parseInt(screen.height / 2.0) - (height / 2.0);
+
+ resizable = (options && options['resizable']) ? options['resizable'] : "no";
+ scrollbars = (options && options['scrollbars']) ? options['scrollbars'] : "no";
+
+ var modal = (resizable == "yes") ? "no" : "yes";
+
+ if (sfMediaLibrary.isGecko && sfMediaLibrary.isMac)
+ modal = "no";
+
+ if (options['close_previous'] != "no")
+ try {sfMediaLibrary.lastWindow.close();} catch (ex) {}
+
+ var win = window.open(url, "sfPopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable);
+
+ if (options['close_previous'] != "no")
+ sfMediaLibrary.lastWindow = win;
+
+ eval('try { win.resizeTo(width, height); } catch(e) { }');
+
+ // Make it bigger if statusbar is forced
+ if (sfMediaLibrary.isGecko)
+ {
+ if (win.document.defaultView.statusbar.visible)
+ win.resizeBy(0, sfMediaLibrary.isMac ? 10 : 24);
+ }
+
+ win.focus();
+
+ }
+}
+
+var SfMediaLibrary = sfMediaLibrary_Engine; // Compatiblity with gzip compressors
+var sfMediaLibrary = new sfMediaLibrary_Engine();
1
0
SVN Alba r4547 - prosistem/alba/trunk/alba/apps/principal/modules/alumno/validate
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: hsanchez
Date: 2007-04-18 12:23:08 -0300 (Wed, 18 Apr 2007)
New Revision: 4547
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/alumno/validate/edit.yml
Log:
Cambiando la validacion del dni en el alumno
Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/validate/edit.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/alumno/validate/edit.yml 2007-04-18 15:22:07 UTC (rev 4546)
+++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/validate/edit.yml 2007-04-18 15:23:08 UTC (rev 4547)
@@ -40,7 +40,7 @@
alumno{nro_documento}:
required: Yes
required_msg: El campo número de documento es obligatorio
- validators: validaNroDocumento
+ validators: validaNroDocumento, validarNumero
alumno{ciudad}:
required: Yes
@@ -129,10 +129,8 @@
validaNroDocumento:
class: sfStringValidator
param:
- max: 16
+ max: 10
max_error: La cantidad m´xima de caracteres permitida es de 10
- min: 6
- min_error: La cantidad minima de caracteres permitida es de 6
validaEmail:
class: sfEmailValidator
1
0
Author: josx
Date: 2007-04-18 12:22:07 -0300 (Wed, 18 Apr 2007)
New Revision: 4546
Added:
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfMediaLibraryHelper.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/actions/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/actions/actions.class.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/config/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/config/view.yml
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.fr.xml
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_dirs.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_files.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/choiceSuccess.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/indexSuccess.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/renameSuccess.php
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.css
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/archive.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/bin.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/delete.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/doc.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/edit.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/filenew.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder_new.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder_open.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/html.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/image.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/pdf.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/ppt.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/txt.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/unknown.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/up.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/xls.png
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/
prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js
Log:
Version 0.81 del plugin sfMediaLibrary
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,7 @@
+Copyright (c) 2004-2007 Fabien Potencier, Frederic Coelho, Fran�ois Zaninotto
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,125 @@
+= sfMediaLibrary plugin =
+
+The `sfMediaLibraryPlugin` provides an easy-to-use interface to manage web assets (images, PDF documents, Flash objects, and so on). It also provides an extension to tinyMCE so that the media inclusion feature of rich text editors uses the assets uploaded through the plugin's module.
+
+This plug-in consists of:
+
+ - one module
+ - one helper group
+ - one JavaScript script
+
+== Installation ==
+
+To install the plugin for a symfony project, the usual process is to use the symfony command line:
+{{{
+$ php symfony plugin-install http://plugins.symfony-project.com/sfMediaLibraryPlugin
+}}}
+
+Alternatively, if you don't have PEAR installed, you can download the latest package attached to this plugin's wiki page and extract it under your project's `plugins/` directory. You will also have to copy the contents of the `myproject/plugins/sfMediaLibraryPlugin/web/` directory into a `myproject/web/sfMediaLibraryPlugin/` directory.
+
+Enable the new module in your application, via the `settings.yml` file.
+{{{
+// in myproject/apps/frontend/config/settings.yml
+all:
+ .settings:
+ enabled_modules: [default, sfMediaLibrary]
+}}}
+
+Clear the cache to enable the autoloading to find the new classes:
+{{{
+$ php symfony cc
+}}}
+
+Start using the new module by making a request to:
+
+{{{
+http://myproject/frontend_dev.php/sfMediaLibrary
+}}}
+
+== The `sfMediaLibrary` module ==
+
+The module allows for the upload, renaming and deletion of all types of files (image, pdf, spreadsheet, etc). Click on an asset name to rename it, click on the trashcan icon to delete it.
+
+You can create, rename and delete subdirectories as well, resulting in a real tree structure that will keep your media assets organized.
+
+The module is fully i18n'ed, and the plugin comes with English and French translations.
+
+Uploaded assets end up under the `myproject/web/uploads/assets/` directory. This means that when you want to include them in a template with, for instance, an `image_tag()`, you must use an absolute path, as follows:
+
+{{{
+<?php echo image_tag('/uploads/assets/path_to_asset.suffix') ?>
+}}}
+
+== Using the media library with TinyMCE ==
+
+If you want to use the sfMediaLibrary plugin as a replacement for tinyMCE's file browser for image insertion, you must first initiate the plugin with a helper in the template:
+
+{{{
+<?php use_helper('sfMediaLibrary') ?>
+<?php echo init_media_library() ?>
+}}}
+
+The next thing to do is to pass a special JavaScript callback function to the TinyMCE object at initialization. This is done with the `tinymce_options` option of the `textarea_tag()` helper:
+
+{{{
+<?php echo textarea_tag('content', '', array (
+ 'rich' => true,
+ 'tinymce_options' => 'file_browser_callback:"sfMediaLibrary.fileBrowserCallBack"',
+ )); ?>
+}}}
+
+That's it, the TinyMCE file browser is now the sfMediaLibrary's one.
+
+Tip: For use with an admin generated module, place the `init_media_library()` call in the `_edit_header.php` partial in the `templates/` directory of the module. To define the callback in a `generator.yml`, do as follows:
+
+{{{
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: Post
+ theme: default
+
+ edit:
+ fields:
+ content: { params: rich=true tinymce_options=\'file_browser_callback:"sfMediaLibrary.fileBrowserCallBack"\' }
+}}}
+
+== Using the Media Library input_file helper ==
+
+Traditionally, when an asset has to be referenced in a form, a file input is used (`<input type='file'>`). It allows the user to upload a file from his computer to the server, and this file can be further embedded in a rich text content.
+
+Using the sfMediaLibrary, you can change this control into some sort of file input that wouldn't refer to the client's computer, but to the media library itself, or, to put it differently, to the files located in `web/uploads/assets/`. The plugin comes with a special helper for that purpose, the `input_asset_tag()`. Use is just like a regular `input_tag()`:
+
+{{{
+<?php echo form_tag('foo/bar') ?>
+ <?php echo input_asset_tag('my_asset_field', '') ?>
+</form>
+}}}
+
+The input is not a real file input tag, meaning that the chosen asset file will not be posted woth the request. It is iseless anyway, since the file is already on the server. Instead, the action will be able to retrieve the asset file path relative to the web root, exactly what is needed to display it.
+
+Optionally, you can restrict the choice of possible assets in this input to images only, as follows:
+
+{{{
+<?php echo input_asset_tag('my_asset_field', '', array('images_only' => true)) ?>
+}}}
+
+== TODO ==
+
+ * Add screenshots to the wiki description
+ * Use [wiki:sfThumbnailPlugin] when available
+ * Improve CSS and design
+ * Improve compatibility
+ * Allow to move an asset to another directory
+ * Make path clickable to go up in the tree structure
+ * More translations for the `sfMediaLibrary` module
+
+== Changelog ==
+
+=== 2007-04-16 | 0.8.1 Beta ===
+
+ * francois: Fixed a conflict with URL rewriting rules making folder navigation impossible
+
+=== 2007-04-13 | 0.8.0 Beta ===
+
+ * francois: Initial release
\ No newline at end of file
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfMediaLibraryHelper.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfMediaLibraryHelper.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfMediaLibraryHelper.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,56 @@
+<?php
+
+function init_media_library()
+{
+ sfContext::getInstance()->getResponse()->addJavascript('/sfMediaLibraryPlugin/js/main', 'last');
+ $url = url_for('sfMediaLibrary/choice');
+ $js = 'sfMediaLibrary.init(\''.$url.'\')';
+
+ return javascript_tag($js);
+}
+
+function input_asset_tag($name, $value, $options = array())
+{
+ use_helper('Javascript');
+
+ $type = 'all';
+ if (isset($options['images_only']))
+ {
+ $type = 'image';
+ unset($options['images_only']);
+ }
+
+ $form_name = 'this.previousSibling.previousSibling.form.name';
+ if (isset($options['form_name']))
+ {
+ $form_name = '\''.$options['form_name'].'\'';
+ unset($options['form_name']);
+ }
+
+ $html = '';
+
+ if (is_file(sfConfig::get('sf_web_dir').$value))
+ {
+ $ext = substr($value, strpos($value, '.') - strlen($value) + 1);
+ if (in_array($ext, array('png', 'jpg', 'gif')))
+ {
+ $image_path = $value;
+ }
+ else
+ {
+ if (!is_file(sfConfig::get('sf_plugins_dir').'/sfMediaLibraryPlugin/web/images/'.$ext.'.png'))
+ {
+ $ext = 'unknown';
+ }
+ $image_path = '/sfMediaLibraryPlugin/images/'.$ext;
+ }
+ $html .= link_to_function(image_tag($image_path, array('alt' => 'File', 'height' => '64')), "window.open('$value')");
+ $html .= '<br />';
+ }
+
+ $html .= input_tag($name, $value, $options);
+ $html .= ' '.image_tag('/sfMediaLibraryPlugin/images/folder_open', array('alt' => __('Insert Image'), 'style' => 'cursor: pointer; vertical-align: middle', 'onclick' => 'sfMediaLibrary.openWindow({ form_name: '.$form_name.', field_name: \''.$name.'\', type: \''.$type.'\', scrollbars: \'yes\' })'));
+ $html .= init_media_library();
+
+ return $html;
+}
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfMediaLibraryHelper.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/actions/actions.class.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/actions/actions.class.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) 2004-2006 Fabien Potencier <fabien.potencier(a)symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+require_once(dirname(__FILE__).'/../lib/BasesfMediaLibraryActions.class.php');
+
+/**
+ *
+ * @package symfony
+ * @subpackage plugin
+ * @author Fabien Potencier <fabien.potencier(a)symfony-project.com>
+ * @version SVN: $Id: actions.class.php 1949 2006-09-05 14:40:20Z fabien $
+ */
+class sfMediaLibraryActions extends BasesfMediaLibraryActions
+{
+}
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/actions/actions.class.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/config/view.yml
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/config/view.yml 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/config/view.yml 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,6 @@
+all:
+ stylesheets: [%SF_ADMIN_WEB_DIR%/main, /sfMediaLibraryPlugin/css/media]
+
+choiceSuccess:
+ has_layout: false
+ stylesheets: [-*, %SF_ADMIN_WEB_DIR%/main, /sfMediaLibraryPlugin/css/media]
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/config/view.yml
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.fr.xml
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.fr.xml 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n/sfMediaLibrary.fr.xml 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,63 @@
+<?xml version="1.0" ?>
+<xliff version="1.0">
+ <file orginal="global" source-language="en_US" datatype="plaintext" date="2004-12-28T18:10:19Z">
+ <body>
+ <trans-unit id="1">
+ <source>Add</source>
+ <target>Ajouter</target>
+ </trans-unit>
+ <trans-unit id="2">
+ <source>Media library (%1%)</source>
+ <target>Médiathèque (%1%)</target>
+ </trans-unit>
+ <trans-unit id="3">
+ <source>Add a file:</source>
+ <target>Ajouter un fichier</target>
+ </trans-unit>
+ <trans-unit id="4">
+ <source>Create a dir:</source>
+ <target>Créer un répertoire</target>
+ </trans-unit>
+ <trans-unit id="5">
+ <source>Create</source>
+ <target>Créer</target>
+ </trans-unit>
+ <trans-unit id="6">
+ <source>Rename in process...</source>
+ <target>Renommage en cours...</target>
+ </trans-unit>
+ <trans-unit id="7">
+ <source>Cancel</source>
+ <target>Annuler</target>
+ </trans-unit>
+ <trans-unit id="8">
+ <source>Delete</source>
+ <target>Supprimer</target>
+ </trans-unit>
+ <trans-unit id="9">
+ <source>Click to edit</source>
+ <target>Cliquer pour editer</target>
+ </trans-unit>
+ <trans-unit id="10">
+ <source>Are you sure to want to delete this folder?</source>
+ <target>Etes-vous sûr de vouloir supprimer ce répertoire ?</target>
+ </trans-unit>
+ <trans-unit id="11">
+ <source>Are you sure to want to delete this file?</source>
+ <target>Etes-vous sûr de vouloir supprimer ce fichier ?</target>
+ </trans-unit>
+ <trans-unit id="12">
+ <source>Rename</source>
+ <target>Renommer</target>
+ </trans-unit>
+ <trans-unit id="13">
+ <source>Please choose a file first</source>
+ <target>Veuillez d\'abord sélectionner un fichier à charger</target>
+ </trans-unit>
+ <trans-unit id="14">
+ <source>Please enter a directory name first</source>
+ <target>Veuillez d\'abord saisir un nom de répertoire</target>
+ </trans-unit>
+ </body>
+ </file>
+</xliff>
\ No newline at end of file
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,195 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) 2004-2006 Fabien Potencier <fabien.potencier(a)symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ *
+ * @package symfony
+ * @subpackage plugin
+ * @author Fabien Potencier <fabien.potencier(a)symfony-project.com>
+ * @version SVN: $Id: actions.class.php 1949 2006-09-05 14:40:20Z fabien $
+ */
+class BasesfMediaLibraryActions extends sfActions
+{
+ public function executeIndex()
+ {
+ $currentDir = $this->dot2slash($this->getRequestParameter('dir'));
+ $this->currentDir = $this->getRequestParameter('dir');
+ $this->current_dir_slash = $currentDir . '/';
+ $this->webAbsCurrentDir = '/'.sfConfig::get('sf_upload_dir_name').'/assets'.$currentDir;
+ $this->absCurrentDir = sfConfig::get('sf_upload_dir').'/assets/'.$currentDir;
+
+ $this->forward404Unless(is_dir($this->absCurrentDir));
+
+ $dirs = sfFinder::type('dir')->maxdepth(0)->prune('.*')->discard('.*')->relative()->in($this->absCurrentDir);
+ $files = sfFinder::type('file')->maxdepth(0)->prune('.*')->discard('.*')->relative()->in($this->absCurrentDir);
+
+ sort($dirs);
+ sort($files);
+
+ $this->dirs = $dirs;
+
+ // compute some stats for each file
+ $infos = array();
+ foreach ($files as $file)
+ {
+ $info = array();
+
+ $info['ext'] = substr($file, strpos($file, '.') - strlen($file) + 1);
+ if ($this->getRequestParameter('images_only') && !$this->isImage($info['ext']))
+ {
+ continue;
+ }
+ $stats = stat($this->absCurrentDir.'/'.$file);
+ $info['size'] = $stats['size'];
+ $info['icon'] = $this->isImage($info['ext']) ? $this->webAbsCurrentDir.'/'.$file : (is_readable(sfConfig::get('sf_web_dir').'/sfMediaLibraryPlugin/images/'.$info['ext'].'.png') ? '/sfMediaLibraryPlugin/images/'.$info['ext'].'.png' : '/sfMediaLibraryPlugin/images/unknown.png');
+ $infos[$file] = $info;
+ }
+ $this->files = $infos;
+
+ // parent dir
+ $tmp = explode(' ', $this->currentDir);
+ array_pop($tmp);
+ $this->parentDir = implode(' ', $tmp);
+ }
+
+ protected function isImage($ext)
+ {
+ return in_array($ext, array('png', 'jpg', 'gif'));
+ }
+
+ public function executeChoice()
+ {
+ $this->executeIndex();
+ }
+
+ public function executeRename()
+ {
+ $current_path = $this->dot2slash($this->getRequestParameter('current_path'));
+ $this->current_path = $this->getRequestParameter('current_path');
+ $type = $this->getRequestParameter('type');
+ $this->count = $this->getRequestParameter('count');
+
+ $this->abs_current_path = sfConfig::get('sf_upload_dir').'/assets/'.$current_path;
+ $this->web_abs_current_path = '/'.sfConfig::get('sf_upload_dir_name').'/assets/'.$current_path;
+
+ $name = $this->getRequestParameter('name');
+ $new_name = $this->getRequestParameter('new_name');
+ if ($type === 'folder')
+ {
+ $new_name = $this->sanitizeDir($new_name);
+ $this->forward404Unless(is_dir($this->abs_current_path.'/'.$name));
+ }
+ else
+ {
+ $new_name = $this->sanitizeFile($new_name);
+ $this->forward404Unless(is_file($this->abs_current_path.'/'.$name));
+ }
+
+ @rename($this->abs_current_path.'/'.$name, $this->abs_current_path.'/'.$new_name);
+
+ $this->info = array();
+ if (is_dir($this->abs_current_path.'/'.$new_name) and ($type === 'folder'))
+ {
+ $this->name = $new_name;
+ }
+ else if (is_file($this->abs_current_path.'/'.$new_name) and ($type === 'file'))
+ {
+ $this->name = $new_name;
+ $this->getInfo($new_name);
+ }
+ else
+ {
+ $this->name = $name;
+ $this->getInfo($name);
+ }
+ $this->type = $type;
+ }
+
+ protected function getInfo($filename)
+ {
+ $this->info['ext'] = substr($filename, strpos($filename, '.') - strlen($filename) + 1);
+ $stats = stat($this->abs_current_path.'/'.$filename);
+ $this->info['size'] = $stats['size'];
+ $this->info['icon'] = $this->isImage($this->info['ext']) ? $this->web_abs_current_path.'/'.$filename : (is_readable(sfConfig::get('sf_web_dir').'/sfMediaLibraryPlugin/images/'.$this->info['ext'].'.png') ? '/sfMediaLibraryPlugin/images/'.$this->info['ext'].'.png' : '/sfMediaLibraryPlugin/images/unknown.png');
+ }
+
+ public function executeUpload()
+ {
+ $currentDir = $this->dot2slash($this->getRequestParameter('current_dir'));
+ $webAbsCurrentDir = '/'.sfConfig::get('sf_upload_dir_name').'/assets/'.$currentDir;
+ $absCurrentDir = sfConfig::get('sf_upload_dir').'/assets/'.$currentDir;
+
+ $this->forward404Unless(is_dir($absCurrentDir));
+
+ $fileName = $this->sanitizeFile($this->getRequest()->getFileName('file'));
+
+ $this->getRequest()->moveFile('file', $absCurrentDir.'/'.$fileName);
+
+ $this->redirect('sfMediaLibrary/index?dir='.$this->getRequestParameter('current_dir'));
+ }
+
+ public function executeDelete()
+ {
+ $currentDir = $this->dot2slash($this->getRequestParameter('current_path'));
+ $currentFile = $this->getRequestParameter('name');
+ $absCurrentFile = sfConfig::get('sf_upload_dir').'/assets/'.$currentDir.'/'.$currentFile;
+
+ $this->forward404Unless(is_readable($absCurrentFile));
+
+ unlink($absCurrentFile);
+
+ $this->redirect('sfMediaLibrary/index?dir='.$this->getRequestParameter('current_path'));
+ }
+
+ public function executeMkdir()
+ {
+ $currentDir = $this->dot2slash($this->getRequestParameter('current_dir'));
+ $dirName = $this->sanitizeDir($this->getRequestParameter('name'));
+ $absCurrentDir = sfConfig::get('sf_upload_dir').'/assets/'.(empty($currentDir) ? '' : $currentDir.'/').$dirName;
+
+ $old = umask(0000);
+ @mkdir($absCurrentDir, 0777);
+ umask($old);
+
+ $this->redirect('sfMediaLibrary/index?dir='.$this->getRequestParameter('current_dir'));
+ }
+
+ public function executeRmdir()
+ {
+ $currentDir = $this->dot2slash('.'.$this->getRequestParameter('current_path'));
+ $absCurrentDir = sfConfig::get('sf_upload_dir').'/assets/'.$currentDir.'/'.$this->getRequestParameter('name');
+
+ $this->forward404Unless(is_dir($absCurrentDir));
+
+ rmdir($absCurrentDir);
+
+ $this->redirect('sfMediaLibrary/index?dir='.$this->getRequestParameter('current_path'));
+ }
+
+ protected function dot2slash($txt)
+ {
+ return preg_replace('#[\+\s]+#', '/', $txt);
+ }
+
+ protected function slash2dot($txt)
+ {
+ return preg_replace('#/+#', '+', $txt);
+ }
+
+ protected function sanitizeDir($dir)
+ {
+ return preg_replace('/[^a-z0-9_-]/i', '_', $dir);
+ }
+
+ protected function sanitizeFile($file)
+ {
+ return preg_replace('/[^a-z0-9_\.-]/i', '_', $file);
+ }
+}
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,85 @@
+<?php if($sf_context->getActionName() !== 'choice'): ?>
+ <?php $action = 'index' ?>
+<?php else: ?>
+ <?php $action = $sf_context->getActionName() ?>
+<?php endif; ?>
+
+<div class="thumbnails">
+<?php if ($type === 'folder'): ?>
+ <?php echo link_to(image_tag('/sfMediaLibraryPlugin/images/folder', array(
+ 'alt' => $name,
+ 'title' => $name,
+ 'size' => '64x64',
+ )), 'sfMediaLibrary/'.$action.'?dir='.$current_path.'+'.$name) ?>
+ <?php if (($action !== "index") and $is_file): ?>
+ <?php $size = ' ' ?>
+ <?php else: ?>
+ <?php $size = '' ?>
+ <?php endif; ?>
+ <?php $delete = 'rmdir' ?>
+<?php else: ?>
+ <?php if ($info['size'] < 4000): ?>
+ <?php $size2 = array() ?>
+ <?php else: ?>
+ <?php $size2 = array('height' => '64') ?>
+ <?php endif; ?>
+ <?php $thumbnail = image_tag($info['icon'], array(
+ 'alt' => $name,
+ 'title' => $name,
+ ) + $size2) ?>
+ <?php if($action === "index"): ?>
+ <?php echo content_tag('a', $thumbnail, array(
+ 'href' => $web_abs_current_path.'/'.$name,
+ 'target' => '_blank',
+ )) ?>
+ <?php else: ?>
+ <?php echo link_to_function($thumbnail, "setFileSrc('".$web_abs_current_path.'/'.$name."')") ?>
+ <?php endif; ?>
+
+ <?php ob_start() ?>
+ <?php if ($info['size'] < 1000): ?>
+ [<?php printf('%d', $info['size']) ?> o]
+ <?php else: ?>
+ [<?php printf('%d', $info['size'] / 1000) ?> Ko]
+ <?php endif; ?>
+ <?php $size = ob_get_contents() ?>
+ <?php ob_end_clean() ?>
+ <?php $delete = 'delete' ?>
+<?php endif; ?>
+</div>
+<div class="assetComment">
+ <div id="view_<?php echo $count ?>"><?php echo ($action === "index") ? link_to_function($name, "Element.show('edit_".$count."');Element.hide('view_".$count."')") : $name ?></div>
+ <?php if($action === "index"): ?>
+ <div id="edit_<?php echo $count ?>">
+ <?php echo form_tag('sfMediaLibrary/rename', 'name=sf_asset_rename_form') ?>
+ <?php echo input_hidden_tag('current_path', $current_path) ?>
+ <?php echo input_hidden_tag('name', $name) ?>
+ <?php echo input_hidden_tag('type', $type) ?>
+ <?php echo input_hidden_tag('count', $count) ?>
+ <?php echo input_tag('new_name', $name) ?>
+ <?php echo submit_to_remote('rename', __('Rename', null, 'sfMediaLibrary'), array(
+ 'url' => 'sfMediaLibrary/rename',
+ 'update' => 'block_'.$count,
+ 'script'=> true,
+ 'before' => visual_effect('opacity', 'block_'.$count, array('duration' => '0.5', 'from' => '1.0', 'to' => '0.3')),
+ 'complete' => visual_effect('opacity', 'block_'.$count, array('duration' => '0.5', 'from' => '0.3', 'to' => '1.0')),
+ ),'class=sf_asset_action_rename')?>
+ <?php echo button_to_function(__('Cancel', null, 'sfMediaLibrary'), "Element.hide('edit_".$count."');Element.show('view_".$count."')") ?>
+ </form>
+ </div>
+ <?php echo javascript_tag("
+ Element.hide('edit_".$count."');
+ ") ?>
+ <div style="text-align:right">
+ <?php echo $size ?>
+ <?php echo link_to(image_tag('/sfMediaLibraryPlugin/images/delete.png', array(
+ 'alt' => __('Delete', null, 'sfMediaLibrary'),
+ 'title' => __('Delete', null, 'sfMediaLibrary'),
+ 'align' => 'absmiddle',
+ )), 'sfMediaLibrary/'.$delete.'?name='.$name.'¤t_path='.$current_path, array(
+ 'confirm' => __('Are you sure to want to delete this '.$type.'?', null, 'sfMediaLibrary')
+ )) ?>
+ </div>
+ <?php endif; ?>
+</div>
+
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_block.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_dirs.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_dirs.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_dirs.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,17 @@
+<?php if ($currentDir != ''): ?>
+ <div class="assetImage"><?php echo link_to(image_tag('/sfMediaLibraryPlugin/images/up', array('alt' => '..', 'title' => '..', 'size' => '64x64')), 'sfMediaLibrary/'.$sf_context->getActionName().'?dir='.$parentDir) ?>
+ <p class="assetComment">» ..<?php if ($is_file or ($sf_context->getActionName() === 'index')): ?>
+ <br />
+ <?php endif; ?></p>
+ </div>
+<?php endif; ?>
+<?php $count = 0; foreach ($dirs as $dir): $count++ ?>
+ <div id="block_<?php echo $count ?>" class="assetImage"><?php include_partial('sfMediaLibrary/block', array(
+ 'name' => $dir,
+ 'current_path' => $currentDir,
+ 'type' => 'folder',
+ 'info' => array(),
+ 'count' => $count,
+ 'is_file' => $is_file,
+ )) ?></div>
+<?php endforeach; ?>
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_dirs.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_files.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_files.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_files.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,10 @@
+<?php foreach ($files as $file => $info): $count++ ?>
+<div id="block_<?php echo $count ?>" class="assetImage"><?php include_partial('sfMediaLibrary/block', array(
+ 'name' => $file,
+ 'current_path' => $currentDir,
+ 'web_abs_current_path' => $webAbsCurrentDir,
+ 'type' => 'file',
+ 'info' => $info,
+ 'count' => $count,
+)) ?></div>
+<?php endforeach; ?>
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/_files.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/choiceSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/choiceSuccess.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/choiceSuccess.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-200000126/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+</head>
+<body>
+
+<?php use_helper('Javascript', 'I18N') ?>
+<?php echo javascript_tag("
+function setFileSrc(src)
+{
+ opener.sfMediaLibrary.fileBrowserReturn(src);
+ window.close();
+}
+") ?>
+<div id="sf_asset_container">
+ <h1><?php echo __('Media library (%1%)', array('%1%' => $current_dir_slash), 'sfMediaLibrary') ?></h1>
+ <div id="sf_asset_content_popup">
+ <?php include_partial('sfMediaLibrary/dirs', array('dirs' => $dirs, 'currentDir' => $currentDir, 'parentDir' => $parentDir, 'is_file' => (count($files) > 0))) ?>
+ <?php include_partial('sfMediaLibrary/files', array('files' => $files, 'currentDir' => $currentDir, 'webAbsCurrentDir' => $webAbsCurrentDir, 'count' => count($dirs))) ?>
+ </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/choiceSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/indexSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/indexSuccess.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/indexSuccess.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,60 @@
+<?php use_helper('Javascript', 'I18N') ?>
+
+<div id="sf_asset_container">
+
+ <h1><?php echo __('Media library (%1%)', array('%1%' => $current_dir_slash), 'sfMediaLibrary') ?></h1>
+
+<div id="sf_asset_content">
+
+ <div id="sf_asset_controls">
+
+ <?php echo form_tag('sfMediaLibrary/upload', 'class=float-left id=sf_asset_upload_form name=sf_asset_upload_form multipart=true') ?>
+ <?php echo input_hidden_tag('current_dir', $currentDir) ?>
+ <fieldset>
+ <div class="form-row">
+ <?php echo label_for('file', __('Add a file:', null, 'sfMediaLibrary'), '') ?>
+ <div class="content"><?php echo input_file_tag('file') ?></div>
+ </div>
+ </fieldset>
+
+ <ul class="sf_asset_actions">
+ <li><?php echo submit_tag(__('Add', null, 'sfMediaLibrary'), array (
+ 'name' => 'add',
+ 'class' => 'sf_asset_action_add_file',
+ 'onclick' => "if($('file').value=='') { alert('".__('Please choose a file first', null, 'sfMediaLibrary')."');return false; }",
+ )) ?></li>
+ </ul>
+
+ </form>
+
+ <?php echo form_tag('sfMediaLibrary/mkdir', 'class=float-left id=sf_asset_mkdir_form name=sf_asset_mkdir_form') ?>
+ <?php echo input_hidden_tag('current_dir', $currentDir) ?>
+ <fieldset>
+ <div class="form-row">
+ <?php echo label_for('dir', __('Create a dir:', null, 'sfMediaLibrary'), '') ?>
+ <div class="content"><?php echo input_tag('name', null, 'size=15 id=dir') ?></div>
+ </div>
+ </fieldset>
+
+ <ul class="sf_asset_actions">
+ <li><?php echo submit_tag(__('Create', null, 'sfMediaLibrary'), array (
+ 'name' => 'create',
+ 'class' => 'sf_asset_action_add_folder',
+ 'onclick' => "if($('dir').value=='') { alert('".__('Please enter a directory name first', null, 'sfMediaLibrary')."');return false; }",
+ )) ?></li>
+ </ul>
+
+ </form>
+
+ </div>
+
+ <div id="sf_asset_assets">
+
+ <?php include_partial('sfMediaLibrary/dirs', array('dirs' => $dirs, 'currentDir' => $currentDir, 'parentDir' => $parentDir, 'is_file' => (count($files) > 0))) ?>
+ <?php include_partial('sfMediaLibrary/files', array('files' => $files, 'currentDir' => $currentDir, 'webAbsCurrentDir' => $webAbsCurrentDir, 'count' => count($dirs))) ?>
+
+ </div>
+
+</div>
+
+</div>
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/indexSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/renameSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/renameSuccess.php 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/renameSuccess.php 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,10 @@
+<?php use_helper('Javascript', 'I18N') ?>
+
+<?php include_partial('sfMediaLibrary/block', array(
+ 'name' => $name,
+ 'current_path' => $current_path,
+ 'web_abs_current_path' => $web_abs_current_path,
+ 'type' => $type,
+ 'info' => $info,
+ 'count' => $count,
+)) ?>
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/templates/renameSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.css
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.css 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.css 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,190 @@
+#sf_asset_container ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input
+{ margin: 0; padding: 0; }
+#sf_asset_container a img,:link img,:visited img { border: none; }
+
+#sf_asset_container a:link, #sf_admin_container a:visited
+{
+ text-decoration: none;
+}
+
+#sf_asset_container a:hover
+{
+ text-decoration: underline;
+}
+
+#sf_asset_container td
+{
+ margin: 0;
+ padding: 20px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ background-color: #fff;
+}
+
+#sf_asset_container p
+{
+ margin-bottom: 5px;
+}
+
+
+#sf_asset_container #sf_asset_assets
+{
+ padding-top: 10px;
+ clear: left;
+}
+
+#sf_asset_container h1
+{
+ margin: 8px 0;
+ padding: 3px;
+ padding-left: 0px;
+ color: #555;
+ font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
+ font-size: 25px;
+}
+
+#sf_asset_container input
+{
+ padding: 3px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ border: 1px solid #ddd;
+ vertical-align:middle;
+}
+
+#sf_asset_container label
+{
+ display: block;
+ padding: 0 1em 3px 0;
+ text-align: left;
+ color: #666;
+ font-weight: normal !important;
+}
+
+#sf_asset_container .form-row
+{
+ padding: 10px;
+ border-bottom: 1px solid #ddd;
+ height: 40px;
+}
+
+#sf_asset_container #sf_asset_upload_form
+{
+ width: 240px;
+ margin-right: 10px;
+}
+
+#sf_asset_container #sf_asset_mkdir_form
+{
+ width: 150px;
+}
+
+#sf_asset_container fieldset
+{
+ margin-bottom: 3px;
+ border: 1px solid #ddd;
+ border-bottom: 0px;
+}
+
+#sf_asset_container .float-left
+{
+ float: left;
+}
+
+#sf_asset_container .float-right
+{
+ float: right;
+}
+
+#sf_asset_container ul.sf_asset_actions
+{
+ display: block;
+ margin: 0;
+ list-style-type: none;
+ text-align: right;
+}
+
+#sf_asset_container ul.sf_asset_actions a
+{
+ color: #333;
+}
+
+#sf_asset_container ul.sf_asset_actions li
+{
+ list-style-type: none;
+ display: inline;
+}
+
+#sf_asset_container ul.sf_asset_actions input
+{
+ padding: 3px 3px 3px 20px;
+ color: #333;
+ font-size: 11px;
+ font-family: Arial, sans-serif;
+ border: 0px;
+ border-right: 4px solid #999;
+ background-color: #ffc;
+ cursor: hand;
+ cursor: pointer;
+}
+
+#sf_asset_container .sf_asset_action_add_file
+{
+ background: url(../images/filenew.png) no-repeat 3px 2px;
+ border-right: 4px solid #73B65A !important;
+}
+
+#sf_asset_container .sf_asset_action_add_folder
+{
+ background: url(../images/folder_new.png) no-repeat 3px 2px;
+ border-right: 4px solid #73B65A !important;
+}
+
+#sf_asset_container .sf_asset_filters li
+{
+ list-style-type: none;
+}
+
+#sf_asset_container .assetImage
+{
+ float: left;
+ padding: 10px 20px 5px 20px;
+ margin-right: 15px;
+ margin-bottom: 15px;
+ border: 1px solid #ddd;
+ background-color: #eee;
+ text-align: center;
+}
+
+#sf_asset_container .assetComment
+{
+ font-family: Arial, sans-serif;
+ margin: -5px -20px;
+ margin-top: 10px;
+ padding: 2px;
+ padding-left: 5px;
+ padding-right: 5px;
+ background-color: #aaa;
+ font-size: 90%;
+ color: #eee;
+ text-align: left;
+}
+
+#sf_asset_container .assetComment a
+{
+ border-bottom: 0;
+}
+
+#sf_asset_container .assetImage a
+{
+ color: #eee;
+ border-bottom: 0;
+}
+
+#sf_asset_container .thumbnails
+{
+ width: auto !important;
+ width: 0;
+ height: 64px;
+
+}
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/archive.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/archive.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/bin.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/bin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/delete.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/doc.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/doc.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/edit.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/edit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/filenew.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/filenew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder_new.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder_new.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder_open.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/folder_open.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/html.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/html.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/image.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/pdf.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/pdf.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/ppt.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/ppt.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/txt.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/txt.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/unknown.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/unknown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/up.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/up.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/xls.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/xls.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js
===================================================================
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js 2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js 2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,132 @@
+function sfMediaLibrary_Engine()
+{
+ // Browser check
+ var ua = navigator.userAgent;
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+ this.isMSIE5 = this.isMSIE && (ua.indexOf('MSIE 5') != -1);
+ this.isMSIE5_0 = this.isMSIE && (ua.indexOf('MSIE 5.0') != -1);
+ this.isGecko = ua.indexOf('Gecko') != -1;
+ this.isSafari = ua.indexOf('Safari') != -1;
+ this.isOpera = ua.indexOf('Opera') != -1;
+ this.isMac = ua.indexOf('Mac') != -1;
+ this.isNS7 = ua.indexOf('Netscape/7') != -1;
+ this.isNS71 = ua.indexOf('Netscape/7.1') != -1;
+ this.isTinyMCE = false;
+
+ // Fake MSIE on Opera and if Opera fakes IE, Gecko or Safari cancel those
+ if (this.isOpera) {
+ this.isMSIE = true;
+ this.isGecko = false;
+ this.isSafari = false;
+ }
+}
+
+sfMediaLibrary_Engine.prototype = {
+ init : function(url)
+ {
+ this.url = url;
+ },
+
+ fileBrowserReturn : function (url)
+ {
+ if(this.isTinyMCE)
+ {
+ tinyMCE.setWindowArg('editor_id', this.fileBrowserWindowArg);
+ if (this.fileBrowserType == 'image')
+ {
+ this.fileBrowserWin.showPreviewImage(url);
+ }
+ }
+ this.fileBrowserWin.document.forms[this.fileBrowserFormName].elements[this.fileBrowserFieldName].value = url;
+ },
+
+ fileBrowserCallBack : function (field_name, url, type, win)
+ {
+ this.isTinyMCE = true;
+ this.fileBrowserWindowArg = tinyMCE.getWindowArg('editor_id');
+ var template = new Array();
+ template['title'] = 'Assets';
+ var url = this.url;
+ if (type == 'image')
+ url += '/images_only/1';
+ template['file'] = url;
+ template['width'] = 550;
+ template['height'] = 600;
+ template['close_previous'] = 'no';
+
+ this.fileBrowserWin = win;
+ this.fileBrowserFormName = 0;
+ this.fileBrowserFieldName = field_name;
+ this.fileBrowserType = type;
+ tinyMCE.openWindow(template, {inline : "yes", scrollbars: 'yes'});
+ },
+
+ openWindow : function(options)
+ {
+ var width, height, x, y, resizable, scrollbars, url;
+
+ if (!options)
+ return;
+ if (!options['field_name'])
+ return;
+ if (!options['url'] && !this.url)
+ return;
+ this.fileBrowserWin = self;
+ this.fileBrowserFormName = (options['form_name'] == '') ? 0 : options['form_name'];
+ this.fileBrowserFieldName = options['field_name'];
+ this.fileBrowserType = options['type'];
+
+ url = this.url;
+ if (options['type'] == 'image')
+ url += '/images_only/1';
+
+ if (!(width = parseInt(options['width'])))
+ width = 550;
+
+ if (!(width = parseInt(options['width'])))
+ width = 550;
+
+ if (!(height = parseInt(options['height'])))
+ height = 600;
+
+ // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!!
+ if (sfMediaLibrary.isMSIE)
+ height += 40;
+ else
+ height += 20;
+
+ x = parseInt(screen.width / 2.0) - (width / 2.0);
+ y = parseInt(screen.height / 2.0) - (height / 2.0);
+
+ resizable = (options && options['resizable']) ? options['resizable'] : "no";
+ scrollbars = (options && options['scrollbars']) ? options['scrollbars'] : "no";
+
+ var modal = (resizable == "yes") ? "no" : "yes";
+
+ if (sfMediaLibrary.isGecko && sfMediaLibrary.isMac)
+ modal = "no";
+
+ if (options['close_previous'] != "no")
+ try {sfMediaLibrary.lastWindow.close();} catch (ex) {}
+
+ var win = window.open(url, "sfPopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable);
+
+ if (options['close_previous'] != "no")
+ sfMediaLibrary.lastWindow = win;
+
+ eval('try { win.resizeTo(width, height); } catch(e) { }');
+
+ // Make it bigger if statusbar is forced
+ if (sfMediaLibrary.isGecko)
+ {
+ if (win.document.defaultView.statusbar.visible)
+ win.resizeBy(0, sfMediaLibrary.isMac ? 10 : 24);
+ }
+
+ win.focus();
+
+ }
+}
+
+var SfMediaLibrary = sfMediaLibrary_Engine; // Compatiblity with gzip compressors
+var sfMediaLibrary = new sfMediaLibrary_Engine();
1
0
SVN Alba r4545 - prosistem/alba/trunk/alba/web/uploads/assets
by commits@pressenter.com.ar 18 Apr '07
by commits@pressenter.com.ar 18 Apr '07
18 Apr '07
Author: josx
Date: 2007-04-18 12:20:37 -0300 (Wed, 18 Apr 2007)
New Revision: 4545
Modified:
prosistem/alba/trunk/alba/web/uploads/assets/
Log:
Ignorando archivos
Property changes on: prosistem/alba/trunk/alba/web/uploads/assets
___________________________________________________________________
Name: svn:ignore
+
1
0
18 Apr '07
Author: josx
Date: 2007-04-18 12:20:11 -0300 (Wed, 18 Apr 2007)
New Revision: 4544
Modified:
prosistem/alba/trunk/alba/web/uploads/
Log:
Ignorando archivos
Property changes on: prosistem/alba/trunk/alba/web/uploads
___________________________________________________________________
Name: svn:ignore
- *
+ archivo de la biblioteca de contenidos
1
0
#166: Alta Docente
--------------------------+-------------------------------------------------
Reporter: hsanchez | Owner: somebody
Type: mejora | Status: new
Priority: normal | Milestone: version 1.0rc
Component: alba-docente | Version: desarollo
Severity: menor | Keywords:
--------------------------+-------------------------------------------------
No se valida el DNI, lo cual me permite ingresar cualquier caracter,
definir una validación para el número.
--
Ticket URL: <http://alba.pressenter.com.ar/cgi-bin/trac.cgi/ticket/166>
Pressenter - SVN Alba <http://wwww.proyectoalba.com.ar/>
Proyecto Alba
1
2