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 68
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules
END

View File

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

View File

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

View File

@@ -0,0 +1,37 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course
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 83
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 101
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/actions/actions.class.php
END

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2010-07-31T05:41:51.000000Z
61fdd700fcf34c8a5c6170d39081b653
2009-05-28T02:14:48.119086Z
25
ben
1060

View File

@@ -0,0 +1,44 @@
<?php
/**
* course actions.
*
* @package pae
* @subpackage course
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class courseActions extends autocourseActions
{
/**
* Custom course saving functionality
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateCourseFromRequest()
{
parent::updateCourseFromRequest();
$request = $this->getRequest();
// save the titles
foreach($request->getParameter('title') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setTitle($value);
}
// save the descriptions
foreach($request->getParameter('description') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setDescription($value);
}
// create/save slug
$titles = $request->getParameter('title');
$slug = preg_replace("/\W+/", "", $titles['en']);
$this->course->setSlug($slug);
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* course actions.
*
* @package pae
* @subpackage course
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class courseActions extends autocourseActions
{
/**
* Custom course saving functionality
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateCourseFromRequest()
{
parent::updateCourseFromRequest();
$request = $this->getRequest();
// save the titles
foreach($request->getParameter('title') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setTitle($value);
}
// save the descriptions
foreach($request->getParameter('description') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setDescription($value);
}
// create/save slug
$titles = $request->getParameter('title');
$slug = preg_replace("/\W+/", "", $titles['en']);
$this->course->setSlug($slug);
}
}

View File

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

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
generator.yml
file
2010-07-31T05:41:51.000000Z
fc58038d54ccc8acfc45dc1dd77b09f6
2009-05-28T02:14:48.119086Z
25
ben
520

View File

@@ -0,0 +1,25 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Course
theme: default
list:
max_per_page: 100
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [_listTitle]
fields:
list_title:
name: "Title"
edit:
fields:
edit_title:
name: "Titles"
edit_description:
name: "Descriptions"
display: [_editTitle, _editDescription]

View File

@@ -0,0 +1,25 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Course
theme: default
list:
max_per_page: 100
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [_listTitle]
fields:
list_title:
name: "Title"
edit:
fields:
edit_title:
name: "Titles"
edit_description:
name: "Descriptions"
display: [_editTitle, _editDescription]

View File

@@ -0,0 +1,23 @@
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates
END
_list_title.php
K 25
svn:wc:ra_dav:version-url
V 101
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates/_list_title.php
END
_edit_title.php
K 25
svn:wc:ra_dav:version-url
V 101
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates/_edit_title.php
END
_edit_description.php
K 25
svn:wc:ra_dav:version-url
V 107
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates/_edit_description.php
END

View File

@@ -0,0 +1,130 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
_list_title.php
file
2010-07-31T05:41:51.000000Z
58d004a7c894adf24fbaee75fcfd0843
2009-05-28T02:14:48.119086Z
25
ben
60
_edit_title.php
file
2010-07-31T05:41:51.000000Z
c38aa1b69467b2eeebd72037cff81a74
2009-05-28T02:14:48.119086Z
25
ben
262
_edit_description.php
file
2010-07-31T05:41:51.000000Z
d855c9d9b576750c203b89a3a1a68a2f
2009-05-28T02:14:48.119086Z
25
ben
320

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $course->setCulture('en'); echo textarea_tag('description[en]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>
<p>
<label>German</label>
<?php $course->setCulture('de'); echo textarea_tag('description[de]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>

View File

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

View File

@@ -0,0 +1 @@
<?php $course->setCulture('en'); echo $course->getTitle() ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $course->setCulture('en'); echo textarea_tag('description[en]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>
<p>
<label>German</label>
<?php $course->setCulture('de'); echo textarea_tag('description[de]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>

View File

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

View File

@@ -0,0 +1 @@
<?php $course->setCulture('en'); echo $course->getTitle() ?>

View File

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

View File

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

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/default/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 102
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/actions/actions.class.php
END

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2010-07-31T05:41:51.000000Z
c90760bc850ef949c089ea983e33eb8a
2009-05-28T02:14:48.119086Z
25
ben
1570

View File

@@ -0,0 +1,79 @@
<?php
/**
* default actions.
*
* @package pae
* @subpackage default
* @author Your name here
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
*/
class defaultActions extends sfActions
{
/**
* Executes index action
*
*/
public function executeIndex()
{
}
/**
* Login action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogin()
{
$request = $this->getRequest();
if($request->getMethod() != sfRequest::POST)
{
if($this->getUser()->isAuthenticated())
{
$this->redirect('default/index');
}
return sfView::SUCCESS;
}
else
{
$u = $this->getUser();
if($this->getRequestParameter('username') == 'admin'
&& $this->getRequestParameter('password') == 'gerard.1995')
{
$u->setAuthenticated(true);
$u->addCredential('admin');
$this->redirect('default/index');
}
else
{
$request->setError('Login failed', 'Username and/or password was not correct. Please try again.');
return sfView::SUCCESS;
}
}
}
/**
* Logout action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogout()
{
$this->getUser()->setAuthenticated(false);
$this->redirect('default/login');
}
/**
* Secure action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeSecure()
{
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* default actions.
*
* @package pae
* @subpackage default
* @author Your name here
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
*/
class defaultActions extends sfActions
{
/**
* Executes index action
*
*/
public function executeIndex()
{
}
/**
* Login action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogin()
{
$request = $this->getRequest();
if($request->getMethod() != sfRequest::POST)
{
if($this->getUser()->isAuthenticated())
{
$this->redirect('default/index');
}
return sfView::SUCCESS;
}
else
{
$u = $this->getUser();
if($this->getRequestParameter('username') == 'admin'
&& $this->getRequestParameter('password') == 'gerard.1995')
{
$u->setAuthenticated(true);
$u->addCredential('admin');
$this->redirect('default/index');
}
else
{
$request->setError('Login failed', 'Username and/or password was not correct. Please try again.');
return sfView::SUCCESS;
}
}
}
/**
* Logout action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogout()
{
$this->getUser()->setAuthenticated(false);
$this->redirect('default/login');
}
/**
* Secure action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeSecure()
{
}
}

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 83
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/config
END
security.yml
K 25
svn:wc:ra_dav:version-url
V 96
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/config/security.yml
END

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
security.yml
file
2010-07-31T05:41:52.000000Z
f73debeb69beec726489f372d4d8bc5d
2009-05-28T02:14:48.119086Z
25
ben
51

View File

@@ -0,0 +1,5 @@
login:
is_secure: off
logout:
is_secure: off

View File

@@ -0,0 +1,5 @@
login:
is_secure: off
logout:
is_secure: off

View File

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

View File

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

View File

@@ -0,0 +1,23 @@
K 25
svn:wc:ra_dav:version-url
V 86
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates
END
secureSuccess.php
K 25
svn:wc:ra_dav:version-url
V 104
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates/secureSuccess.php
END
indexSuccess.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates/indexSuccess.php
END
loginSuccess.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates/loginSuccess.php
END

View File

@@ -0,0 +1,130 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
secureSuccess.php
file
2010-07-31T05:41:52.000000Z
a3bb2d45ee548fe6234c42a58e0f47e3
2009-05-28T02:14:48.119086Z
25
ben
137
indexSuccess.php
file
2010-07-31T05:41:52.000000Z
d541fb2e9d80de632b49ee371f4a5db1
2009-05-28T02:14:48.119086Z
25
ben
347
loginSuccess.php
file
2010-07-31T05:41:52.000000Z
62daab3fe84cd59b4cd5d2e6796181ec
2009-05-28T02:14:48.119086Z
25
ben
488

View File

@@ -0,0 +1,12 @@
<h2>Pro Active English Site Administration</h2>
<p>
Welcome to the administration section of Pro Active English.
</p>
<p>
Here, by clicking the links above, you can edit various sections of
the site.
</p>
<p>
If you need any help, don't hesitate to contact me at
<?php echo mail_to("ben.ramey@gmail.com", "ben.ramey@gmail.com") ?>.
</p>

View File

@@ -0,0 +1,21 @@
<h2>Welcome!</h2>
<p>
Please login below.
</p>
<?php echo form_tag('default/login', 'method=post') ?>
<fieldset class='login'>
<legend>Login</legend>
<div class='field'>
<label>Username</label>
<?php echo input_tag('username') ?>
</div>
<div class='field'>
<label>Password</label>
<?php echo input_password_tag('password') ?>
</div>
<div class='field field-submit'>
<label>&nbsp;</label>
<?php echo submit_tag('Login') ?>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,4 @@
<p>I'm sorry, you do not have the right credentials to access this page.</p>
<p>
<?php echo link_to('Logout', 'default/logout') ?>
</p>

View File

@@ -0,0 +1,12 @@
<h2>Pro Active English Site Administration</h2>
<p>
Welcome to the administration section of Pro Active English.
</p>
<p>
Here, by clicking the links above, you can edit various sections of
the site.
</p>
<p>
If you need any help, don't hesitate to contact me at
<?php echo mail_to("ben.ramey@gmail.com", "ben.ramey@gmail.com") ?>.
</p>

View File

@@ -0,0 +1,21 @@
<h2>Welcome!</h2>
<p>
Please login below.
</p>
<?php echo form_tag('default/login', 'method=post') ?>
<fieldset class='login'>
<legend>Login</legend>
<div class='field'>
<label>Username</label>
<?php echo input_tag('username') ?>
</div>
<div class='field'>
<label>Password</label>
<?php echo input_password_tag('password') ?>
</div>
<div class='field field-submit'>
<label>&nbsp;</label>
<?php echo submit_tag('Login') ?>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,4 @@
<p>I'm sorry, you do not have the right credentials to access this page.</p>
<p>
<?php echo link_to('Logout', 'default/logout') ?>
</p>

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/default/validate
END
login.yml
K 25
svn:wc:ra_dav:version-url
V 95
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/validate/login.yml
END

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/validate
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
login.yml
file
2010-07-31T05:41:52.000000Z
7287ce25163287baf28308764003d8a7
2009-05-28T02:14:48.119086Z
25
ben
23

View File

@@ -0,0 +1,2 @@
fillin:
enabled: true

View File

@@ -0,0 +1,2 @@
fillin:
enabled: true

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,62 @@
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
2010-07-31T05:41:51.000000Z
d984a26589f4fd8d16b931057f6abbc7
2009-05-28T02:14:48.119086Z
25
ben
2253

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,62 @@
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
2010-07-31T05:41:51.000000Z
9ae294c6d4751f1c8c9199305ce9219b
2009-05-28T02:14:48.119086Z
25
ben
808

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,164 @@
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
2010-07-31T05:41:51.000000Z
a8f295de43c803c2c18b0be7d1f8f165
2009-05-28T02:14:48.119086Z
25
ben
152
_edit_title.php
file
2010-07-31T05:41:51.000000Z
0723d06c7e5ba940c04e2dc6e34ab2cb
2009-05-28T02:14:48.119086Z
25
ben
270
_list_picture.php
file
2010-07-31T05:41:51.000000Z
0b482d529712a47f75d2065ce0128da2
2009-05-28T02:14:48.119086Z
25
ben
76
_edit_biography.php
file
2010-07-31T05:41:51.000000Z
97095eb018d6438ffff2925ccafcda1e
2009-05-28T02:14:48.119086Z
25
ben
298

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()) ?>

View File

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

View File

@@ -0,0 +1,37 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event
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 82
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 100
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/actions/actions.class.php
END

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2010-07-31T05:41:51.000000Z
2078e5c11f949799e77d28b3431cbb37
2009-05-28T02:14:48.119086Z
25
ben
1889

View File

@@ -0,0 +1,66 @@
<?php
/**
* event actions.
*
* @package pae
* @subpackage event
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class eventActions extends autoeventActions
{
/**
* Custom event saving functionality
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateEventFromRequest()
{
parent::updateEventFromRequest();
$request = $this->getRequest();
// save the titles
foreach($request->getParameter('title') as $culture => $value)
{
$this->event->setCulture($culture);
$this->event->setTitle($value);
}
// save the descriptions
foreach($request->getParameter('description') as $culture => $value)
{
$this->event->setCulture($culture);
$this->event->setDescription($value);
}
// save the event picture
if($request->hasFiles())
{
foreach($request->getFileNames() as $fileName)
{
if($request->getFileSize($fileName) <= 0)
continue;
$eventImagePath = sfConfig::get('sf_web_dir').'/images/events';
$pictureName = preg_replace("/\W/", "", $this->event->getTitle()) . $request->getFileExtension($fileName);
$request->moveFile($fileName, $eventImagePath.'/'.$pictureName);
// resize the image to the standard size
$image = new phMagick($eventImagePath.'/'.$pictureName);
$image->setDestination($eventImagePath.'/'.$pictureName);
$image->resize(400, 0);
// create the thumbnail image
$thumbnail = $image;
$thumbnail->setDestination($eventImagePath.'/thumb_'.$pictureName);
$thumbnail->resize(70,0);
// save the image name in the employee
$this->event->setPicture($pictureName);
}
}
}
}

View File

@@ -0,0 +1,66 @@
<?php
/**
* event actions.
*
* @package pae
* @subpackage event
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class eventActions extends autoeventActions
{
/**
* Custom event saving functionality
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateEventFromRequest()
{
parent::updateEventFromRequest();
$request = $this->getRequest();
// save the titles
foreach($request->getParameter('title') as $culture => $value)
{
$this->event->setCulture($culture);
$this->event->setTitle($value);
}
// save the descriptions
foreach($request->getParameter('description') as $culture => $value)
{
$this->event->setCulture($culture);
$this->event->setDescription($value);
}
// save the event picture
if($request->hasFiles())
{
foreach($request->getFileNames() as $fileName)
{
if($request->getFileSize($fileName) <= 0)
continue;
$eventImagePath = sfConfig::get('sf_web_dir').'/images/events';
$pictureName = preg_replace("/\W/", "", $this->event->getTitle()) . $request->getFileExtension($fileName);
$request->moveFile($fileName, $eventImagePath.'/'.$pictureName);
// resize the image to the standard size
$image = new phMagick($eventImagePath.'/'.$pictureName);
$image->setDestination($eventImagePath.'/'.$pictureName);
$image->resize(400, 0);
// create the thumbnail image
$thumbnail = $image;
$thumbnail->setDestination($eventImagePath.'/thumb_'.$pictureName);
$thumbnail->resize(70,0);
// save the image name in the employee
$this->event->setPicture($pictureName);
}
}
}
}

View File

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

View File

@@ -0,0 +1,62 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
generator.yml
file
2010-07-31T05:41:51.000000Z
8fcecea6f1e4d05af8f2ee701b9270f0
2009-05-28T02:14:48.119086Z
25
ben
618

View File

@@ -0,0 +1,27 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Event
theme: default
list:
max_per_page: 10
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [_listPicture, _listTitle, expires_on]
fields:
list_picture:
name: "Picture"
list_title:
name: "Title"
edit:
fields:
edit_description:
name: "Descriptions"
edit_title:
name: "Titles"
display: [_editTitle, expires_on, _editPicture, _editDescription]

View File

@@ -0,0 +1,27 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Event
theme: default
list:
max_per_page: 10
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [_listPicture, _listTitle, expires_on]
fields:
list_picture:
name: "Picture"
list_title:
name: "Title"
edit:
fields:
edit_description:
name: "Descriptions"
edit_title:
name: "Titles"
display: [_editTitle, expires_on, _editPicture, _editDescription]

View File

@@ -0,0 +1,35 @@
K 25
svn:wc:ra_dav:version-url
V 84
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates
END
_list_title.php
K 25
svn:wc:ra_dav:version-url
V 100
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates/_list_title.php
END
_edit_picture.php
K 25
svn:wc:ra_dav:version-url
V 102
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates/_edit_picture.php
END
_edit_title.php
K 25
svn:wc:ra_dav:version-url
V 100
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates/_edit_title.php
END
_list_picture.php
K 25
svn:wc:ra_dav:version-url
V 102
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates/_list_picture.php
END
_edit_description.php
K 25
svn:wc:ra_dav:version-url
V 106
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates/_edit_description.php
END

View File

@@ -0,0 +1,198 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/event/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
_list_title.php
file
2010-07-31T05:41:51.000000Z
a3796b76790ce4dd6b7124cc2ff757a3
2009-05-28T02:14:48.119086Z
25
ben
58
_edit_picture.php
file
2010-07-31T05:41:51.000000Z
69e38bebd365593d6bb64360145c0487
2009-05-28T02:14:48.119086Z
25
ben
134
_edit_title.php
file
2010-07-31T05:41:51.000000Z
00a96b80fe2b41df153c3a35de2caad5
2009-05-28T02:14:48.119086Z
25
ben
258
_list_picture.php
file
2010-07-31T05:41:51.000000Z
755291279f0c467f06d60282437c0e0b
2009-05-28T02:14:48.119086Z
25
ben
61
_edit_description.php
file
2010-07-31T05:41:51.000000Z
9213de9edfb33d37e57bd17401eaad19
2009-05-28T02:14:48.119086Z
25
ben
316

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $event->setCulture('en'); echo textarea_tag('description[en]', $event->getDescription(), 'rich=true size=100x12') ?>
</p>
<p>
<label>German</label>
<?php $event->setCulture('de'); echo textarea_tag('description[de]', $event->getDescription(), 'rich=true size=100x12') ?>
</p>

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
<?php $event->setCulture('en'); echo $event->getTitle() ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $event->setCulture('en'); echo textarea_tag('description[en]', $event->getDescription(), 'rich=true size=100x12') ?>
</p>
<p>
<label>German</label>
<?php $event->setCulture('de'); echo textarea_tag('description[de]', $event->getDescription(), 'rich=true size=100x12') ?>
</p>

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
<?php $event->setCulture('en'); echo $event->getTitle() ?>