-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/11-App | |||
|
|||
# default values | |||
#all: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
<?php | |||
|
|||
class backendConfiguration extends sfApplicationConfiguration | |||
{ | |||
public function configure() | |||
{ | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/09-Cache | |||
|
|||
default: | |||
enabled: false | |||
with_layout: false | |||
lifetime: 86400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,42 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/05-Factories | |||
|
|||
prod: | |||
logger: | |||
class: sfNoLogger | |||
param: | |||
level: err | |||
loggers: ~ | |||
|
|||
test: | |||
storage: | |||
class: sfSessionTestStorage | |||
param: | |||
session_path: %SF_TEST_CACHE_DIR%/sessions | |||
|
|||
response: | |||
class: sfWebResponse | |||
param: | |||
send_http_headers: false | |||
|
|||
mailer: | |||
param: | |||
delivery_strategy: none | |||
|
|||
dev: | |||
mailer: | |||
param: | |||
delivery_strategy: none | |||
|
|||
all: | |||
routing: | |||
class: sfPatternRouting | |||
param: | |||
generate_shortest_url: true | |||
extra_parameters_as_query_string: true | |||
|
|||
view_cache_manager: | |||
class: sfViewCacheManager | |||
param: | |||
cache_key_use_vary_headers: true | |||
cache_key_use_host_name: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/12-Filters | |||
|
|||
rendering: ~ | |||
security: ~ | |||
|
|||
# insert your own filters here | |||
|
|||
cache: ~ | |||
execution: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
projects: | |||
class: sfDoctrineRouteCollection | |||
options: | |||
model: projects | |||
module: projects | |||
prefix_path: /projects | |||
column: id | |||
with_wildcard_routes: true | |||
|
|||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/10-Routing | |||
|
|||
# default rules | |||
homepage: | |||
url: / | |||
param: { module: projects, action: index } | |||
|
|||
# generic rules | |||
# please, remove them by adding more specific rules | |||
default_index: | |||
url: /:module | |||
param: { action: index } | |||
|
|||
default: | |||
url: /:module/:action/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/08-Security | |||
|
|||
default: | |||
is_secure: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,35 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/04-Settings | |||
|
|||
prod: | |||
.settings: | |||
no_script_name: false | |||
logging_enabled: false | |||
|
|||
dev: | |||
.settings: | |||
error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?> | |||
web_debug: true | |||
cache: false | |||
no_script_name: false | |||
etag: false | |||
|
|||
test: | |||
.settings: | |||
error_reporting: <?php echo ((E_ALL | E_STRICT) ^ E_NOTICE)."\n" ?> | |||
cache: false | |||
web_debug: false | |||
no_script_name: false | |||
etag: false | |||
|
|||
all: | |||
.settings: | |||
# Form security secret (CSRF protection) | |||
csrf_secret: 26193c53dc5e0b09e8c7fbe6a9d12c64ec5f7c22 | |||
|
|||
# Output escaping settings | |||
escaping_strategy: true | |||
escaping_method: ESC_SPECIALCHARS | |||
|
|||
# Enable the database manager | |||
use_database: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/13-View | |||
|
|||
default: | |||
http_metas: | |||
content-type: text/html | |||
|
|||
metas: | |||
#title: symfony project | |||
#description: symfony project | |||
#keywords: symfony, project | |||
#language: en | |||
#robots: index, follow | |||
|
|||
stylesheets: [main.css] | |||
|
|||
javascripts: [] | |||
|
|||
has_layout: true | |||
layout: layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
<?php | |||
|
|||
class myUser extends sfBasicSecurityUser | |||
{ | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
<?php | |||
|
|||
require_once dirname(__FILE__).'/../lib/projectsGeneratorConfiguration.class.php'; | |||
require_once dirname(__FILE__).'/../lib/projectsGeneratorHelper.class.php'; | |||
|
|||
/** | |||
* projects actions. | |||
* | |||
* @package posting | |||
* @subpackage projects | |||
* @author Your name here | |||
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | |||
*/ | |||
class projectsActions extends autoProjectsActions | |||
{ | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
generator: | |||
class: sfDoctrineGenerator | |||
param: | |||
model_class: projects | |||
theme: admin | |||
non_verbose_templates: true | |||
with_show: false | |||
singular: ~ | |||
plural: ~ | |||
route_prefix: projects | |||
with_doctrine_route: true | |||
actions_base_class: sfActions | |||
|
|||
config: | |||
actions: ~ | |||
fields: ~ | |||
list: | |||
title: Список проектов | |||
filter: ~ | |||
form: | |||
class: BackendprojectsForm | |||
edit: | |||
title: Редактирование проекта «%%title%%» | |||
new: | |||
title: Добавление нового проекта |
13 changes: 13 additions & 0 deletions
13
apps/backend/modules/projects/lib/projectsGeneratorConfiguration.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<?php | |||
|
|||
/** | |||
* projects module configuration. | |||
* | |||
* @package posting | |||
* @subpackage projects | |||
* @author Your name here | |||
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | |||
*/ | |||
class projectsGeneratorConfiguration extends BaseProjectsGeneratorConfiguration | |||
{ | |||
} |
13 changes: 13 additions & 0 deletions
13
apps/backend/modules/projects/lib/projectsGeneratorHelper.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<?php | |||
|
|||
/** | |||
* projects module helper. | |||
* | |||
* @package posting | |||
* @subpackage projects | |||
* @author Your name here | |||
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | |||
*/ | |||
class projectsGeneratorHelper extends BaseProjectsGeneratorHelper | |||
{ | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head> | |||
<?php include_http_metas() ?> | |||
<?php include_metas() ?> | |||
<?php include_title() ?> | |||
<link rel="shortcut icon" href="/favicon.ico" /> | |||
<?php include_stylesheets() ?> | |||
<?php include_javascripts() ?> | |||
</head> | |||
<body> | |||
<?php echo $sf_content ?> | |||
</body> | |||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
# You can find more information about this file on the symfony website: | |||
# http://www.symfony-project.org/reference/1_4/en/11-App | |||
|
|||
# default values | |||
all: | |||
projects_per_page: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,35 @@ | |||
<?php | |||
|
|||
/** | |||
* projects form. | |||
* | |||
* @package posting | |||
* @subpackage form | |||
* @author Max Istlyaev | |||
* @version SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | |||
*/ | |||
class BackendprojectsForm extends projectsForm | |||
{ | |||
public function configure() | |||
{ | |||
parent::configure(); | |||
} | |||
|
|||
protected function setFields() | |||
{ | |||
$this->useFields(array('author_id', 'title', 'text', 'price', 'status', 'views_users', 'views_guests', 'expired_at', 'created_at', 'updated_at')); | |||
|
|||
$this->widgetSchema->setHelp('title', 'например, «Наполнение автомобильного форума»'); | |||
$this->widgetSchema->setHelp('text', 'подробное описание проекта для исполнителей'); | |||
$this->widgetSchema->setHelp('price', 'предполагаемый бюджет'); | |||
$this->widgetSchema->setHelp('status', 'статус проекта'); | |||
|
|||
$this->widgetSchema->setLabels(array( | |||
'title' => 'Название проекта', | |||
'text' => 'Описание проекта', | |||
'price' => 'Бюджет', | |||
'status' => 'Статус', | |||
)); | |||
|
|||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
<?php | |||
|
|||
include(dirname(__FILE__).'/../../bootstrap/functional.php'); | |||
|
|||
$browser = new sfTestFunctional(new sfBrowser()); | |||
|
|||
$browser-> | |||
get('/projects/index')-> | |||
|
|||
with('request')->begin()-> | |||
isParameter('module', 'projects')-> | |||
isParameter('action', 'index')-> | |||
end()-> | |||
|
|||
with('response')->begin()-> | |||
isStatusCode(200)-> | |||
checkElement('body', '!/This is a temporary page/')-> | |||
end() | |||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
<?php | |||
|
|||
|
|||
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |||
|
|||
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'prod', true); | |||
sfContext::createInstance($configuration)->dispatch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<?php | |||
|
|||
// this check prevents access to debug front controllers that are deployed by accident to production servers. | |||
// feel free to remove this, extend it or make something more sophisticated. | |||
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) | |||
{ | |||
die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); | |||
} | |||
|
|||
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |||
|
|||
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'dev', true); | |||
sfContext::createInstance($configuration)->dispatch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
../lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/web |