initial commit

This commit is contained in:
Ben Ramey
2017-03-02 21:57:21 -06:00
commit fd8ad64063
22097 changed files with 1960930 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 77
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee
END

View File

@@ -0,0 +1,37 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions
dir
config
dir
templates
dir

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/actions/actions.class.php
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2009-05-28T02:26:42.000000Z
d984a26589f4fd8d16b931057f6abbc7
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,71 @@
<?php
/**
* employee actions.
*
* @package pae
* @subpackage employee
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class employeeActions extends autoemployeeActions
{
/**
* Override of base-class method to handle saving
* the partial that does the picture edit field.
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateEmployeeFromRequest()
{
parent::updateEmployeeFromRequest();
$request = $this->getRequest();
// create the slug
$slug = strtolower(preg_replace("/\W+/", "", $this->employee->getName()));
$this->employee->setSlug($slug);
// save the titles which are also internationalized
foreach($request->getParameter('title') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setTitle($value);
}
// save the biographies as we also use a custom template for them
foreach($request->getParameter('biography') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setBiography($value);
}
// save the picture as we use a custom template for it
if($request->hasFiles())
{
foreach($request->getFileNames() as $fileName)
{
if($request->getFileSize($fileName) <= 0)
continue;
$employeeImagePath = sfConfig::get('sf_web_dir').'/images/whoarewe/employees';
$pictureName = str_replace(" ", "", $this->employee->getName()) . $request->getFileExtension($fileName);
$request->moveFile($fileName, $employeeImagePath.'/'.$pictureName);
// resize the image to the standard size
$image = new phMagick($employeeImagePath.'/'.$pictureName);
$image->setDestination($employeeImagePath.'/'.$pictureName);
$image->resize(200, 0);
// create the thumbnail image
$thumbnail = $image;
$thumbnail->setDestination($employeeImagePath.'/thumb_'.$pictureName);
$thumbnail->resize(70,0);
// save the image name in the employee
$this->employee->setPicture($pictureName);
}
}
}
}

View File

@@ -0,0 +1,71 @@
<?php
/**
* employee actions.
*
* @package pae
* @subpackage employee
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class employeeActions extends autoemployeeActions
{
/**
* Override of base-class method to handle saving
* the partial that does the picture edit field.
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateEmployeeFromRequest()
{
parent::updateEmployeeFromRequest();
$request = $this->getRequest();
// create the slug
$slug = strtolower(preg_replace("/\W+/", "", $this->employee->getName()));
$this->employee->setSlug($slug);
// save the titles which are also internationalized
foreach($request->getParameter('title') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setTitle($value);
}
// save the biographies as we also use a custom template for them
foreach($request->getParameter('biography') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setBiography($value);
}
// save the picture as we use a custom template for it
if($request->hasFiles())
{
foreach($request->getFileNames() as $fileName)
{
if($request->getFileSize($fileName) <= 0)
continue;
$employeeImagePath = sfConfig::get('sf_web_dir').'/images/whoarewe/employees';
$pictureName = str_replace(" ", "", $this->employee->getName()) . $request->getFileExtension($fileName);
$request->moveFile($fileName, $employeeImagePath.'/'.$pictureName);
// resize the image to the standard size
$image = new phMagick($employeeImagePath.'/'.$pictureName);
$image->setDestination($employeeImagePath.'/'.$pictureName);
$image->resize(200, 0);
// create the thumbnail image
$thumbnail = $image;
$thumbnail->setDestination($employeeImagePath.'/thumb_'.$pictureName);
$thumbnail->resize(70,0);
// save the image name in the employee
$this->employee->setPicture($pictureName);
}
}
}
}

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 84
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/config
END
generator.yml
K 25
svn:wc:ra_dav:version-url
V 98
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/config/generator.yml
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
generator.yml
file
2009-05-28T02:26:42.000000Z
9ae294c6d4751f1c8c9199305ce9219b
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,30 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Employee
theme: default
list:
max_per_page: 10
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [active, _listPicture, name, email, degrees, position_text]
edit:
fields:
position:
params: text_method=getPosition
edit_biography:
name: "Biographies"
edit_title:
name: "Titles"
edit_picture:
name: "Picture"
display:
Personal Information: [name, _editTitle, degrees, position, _editPicture]
Contact Information: [phone, cellphone, email]
Biography: [_editBiography]
Display Information: [active, sort_order]

View File

@@ -0,0 +1,30 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Employee
theme: default
list:
max_per_page: 10
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [active, _listPicture, name, email, degrees, position_text]
edit:
fields:
position:
params: text_method=getPosition
edit_biography:
name: "Biographies"
edit_title:
name: "Titles"
edit_picture:
name: "Picture"
display:
Personal Information: [name, _editTitle, degrees, position, _editPicture]
Contact Information: [phone, cellphone, email]
Biography: [_editBiography]
Display Information: [active, sort_order]

View File

@@ -0,0 +1,29 @@
K 25
svn:wc:ra_dav:version-url
V 87
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates
END
_edit_picture.php
K 25
svn:wc:ra_dav:version-url
V 105
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_edit_picture.php
END
_edit_title.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_edit_title.php
END
_list_picture.php
K 25
svn:wc:ra_dav:version-url
V 105
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_list_picture.php
END
_edit_biography.php
K 25
svn:wc:ra_dav:version-url
V 107
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_edit_biography.php
END

View File

@@ -0,0 +1,76 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
_edit_picture.php
file
2009-05-28T02:26:42.000000Z
a8f295de43c803c2c18b0be7d1f8f165
2009-05-28T02:14:48.119086Z
25
ben
_edit_title.php
file
2009-05-28T02:26:42.000000Z
0723d06c7e5ba940c04e2dc6e34ab2cb
2009-05-28T02:14:48.119086Z
25
ben
_list_picture.php
file
2009-05-28T02:26:42.000000Z
0b482d529712a47f75d2065ce0128da2
2009-05-28T02:14:48.119086Z
25
ben
_edit_biography.php
file
2009-05-28T02:26:42.000000Z
97095eb018d6438ffff2925ccafcda1e
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo textarea_tag('biography[en]', $employee->getBiography(), 'size=100x8') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo textarea_tag('biography[de]', $employee->getBiography(), 'size=100x8') ?>
</p>

View File

@@ -0,0 +1,2 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture(), array("class" => "employee-thumb")) ?>
<?php echo input_file_tag("picture") ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo input_tag('title[en]', $employee->getTitle(), 'size=40') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo input_tag('title[de]', $employee->getTitle(), 'size=40') ?>
</p>

View File

@@ -0,0 +1 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture()) ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo textarea_tag('biography[en]', $employee->getBiography(), 'size=100x8') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo textarea_tag('biography[de]', $employee->getBiography(), 'size=100x8') ?>
</p>

View File

@@ -0,0 +1,2 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture(), array("class" => "employee-thumb")) ?>
<?php echo input_file_tag("picture") ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo input_tag('title[en]', $employee->getTitle(), 'size=40') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo input_tag('title[de]', $employee->getTitle(), 'size=40') ?>
</p>

View File

@@ -0,0 +1 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture()) ?>