Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stylistic changes

  • Loading branch information...
commit b902ea769560c3634f406eb66b1307eccc7bd64c 1 parent ceb78d2
@nacmartin authored
View
20 apps/frontend/config/routing.yml
@@ -14,6 +14,26 @@ task_stop:
url: /task-stop/:id
param: { module: task, action: stop }
+task_edit_visible:
+ url: /task-visibility
+ param: { module: task, action: visible }
+
+task_edit:
+ url: /task-edit/:id
+ param: { module: task, action: edit }
+
+task_new:
+ url: /task-new/:id
+ param: { module: task, action: new }
+
+group_edit:
+ url: /group-edit/:id
+ param: { module: task, action: edit }
+
+group_new:
+ url: /group-new/:id
+ param: { module: task, action: new }
+
sf_guard_signin:
url: /login
param: { module: sfGuardAuth, action: signin }
View
5 apps/frontend/modules/task/templates/indexSuccess.php
@@ -1,4 +1,5 @@
<?php include_component('task', 'active') ?>
-<div class="fifty"><?php include_component('task', 'summary') ?></div>
+<div class="fifty"><?php include_component('task', 'summary') ?>
+<?php include_component('task', 'history') ?>
+</diV>
<div class="fifty"><?php include_component('task', 'listtasks') ?></div>
-<div class="clear margintop"><?php include_component('task', 'history') ?></div>
View
2  config/doctrine/schema.yml
@@ -2,6 +2,7 @@ TaskGroup:
columns:
name: { type: string(255), notnull: true}
user_id: { type: integer, notnull: true}
+ hidden: { type: boolean, default: false}
relations:
sfGuardUser:
local: user_id
@@ -14,6 +15,7 @@ Task:
name: { type: string(255), notnull: true}
color: { type: string(6), notnull: true}
taskgroup_id: {type: integer, notnull: true}
+ hidden: { type: boolean, default: false}
relations:
TaskGroup:
local: taskgroup_id
View
4 data/sql/schema.sql
@@ -1,6 +1,6 @@
CREATE TABLE daystat (id BIGINT AUTO_INCREMENT, day DATE NOT NULL, task_id BIGINT NOT NULL, minutes BIGINT NOT NULL, INDEX task_id_idx (task_id), PRIMARY KEY(id)) ENGINE = INNODB;
-CREATE TABLE task (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, color VARCHAR(6) NOT NULL, taskgroup_id BIGINT NOT NULL, INDEX taskgroup_id_idx (taskgroup_id), PRIMARY KEY(id)) ENGINE = INNODB;
-CREATE TABLE task_group (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, user_id BIGINT NOT NULL, INDEX user_id_idx (user_id), PRIMARY KEY(id)) ENGINE = INNODB;
+CREATE TABLE task (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, color VARCHAR(6) NOT NULL, taskgroup_id BIGINT NOT NULL, hidden TINYINT(1) DEFAULT '0', INDEX taskgroup_id_idx (taskgroup_id), PRIMARY KEY(id)) ENGINE = INNODB;
+CREATE TABLE task_group (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, user_id BIGINT NOT NULL, hidden TINYINT(1) DEFAULT '0', INDEX user_id_idx (user_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE uow (id BIGINT AUTO_INCREMENT, start_time DATETIME NOT NULL, end_time DATETIME, task_id BIGINT NOT NULL, INDEX task_id_idx (task_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE sf_guard_forgot_password (id BIGINT AUTO_INCREMENT, user_id BIGINT NOT NULL, unique_key VARCHAR(255), expires_at DATETIME NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX user_id_idx (user_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE sf_guard_group (id BIGINT AUTO_INCREMENT, name VARCHAR(255) UNIQUE, description TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB;
View
3  lib/filter/doctrine/base/BaseTaskFormFilter.class.php
@@ -16,12 +16,14 @@ public function setup()
'name' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'color' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'taskgroup_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('TaskGroup'), 'add_empty' => true)),
+ 'hidden' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
));
$this->setValidators(array(
'name' => new sfValidatorPass(array('required' => false)),
'color' => new sfValidatorPass(array('required' => false)),
'taskgroup_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('TaskGroup'), 'column' => 'id')),
+ 'hidden' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
));
$this->widgetSchema->setNameFormat('task_filters[%s]');
@@ -45,6 +47,7 @@ public function getFields()
'name' => 'Text',
'color' => 'Text',
'taskgroup_id' => 'ForeignKey',
+ 'hidden' => 'Boolean',
);
}
}
View
3  lib/filter/doctrine/base/BaseTaskGroupFormFilter.class.php
@@ -15,11 +15,13 @@ public function setup()
$this->setWidgets(array(
'name' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('sfGuardUser'), 'add_empty' => true)),
+ 'hidden' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
));
$this->setValidators(array(
'name' => new sfValidatorPass(array('required' => false)),
'user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('sfGuardUser'), 'column' => 'id')),
+ 'hidden' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
));
$this->widgetSchema->setNameFormat('task_group_filters[%s]');
@@ -42,6 +44,7 @@ public function getFields()
'id' => 'Number',
'name' => 'Text',
'user_id' => 'ForeignKey',
+ 'hidden' => 'Boolean',
);
}
}
View
2  lib/form/doctrine/base/BaseTaskForm.class.php
@@ -19,6 +19,7 @@ public function setup()
'name' => new sfWidgetFormInputText(),
'color' => new sfWidgetFormInputText(),
'taskgroup_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('TaskGroup'), 'add_empty' => false)),
+ 'hidden' => new sfWidgetFormInputCheckbox(),
));
$this->setValidators(array(
@@ -26,6 +27,7 @@ public function setup()
'name' => new sfValidatorString(array('max_length' => 255)),
'color' => new sfValidatorString(array('max_length' => 6)),
'taskgroup_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('TaskGroup'))),
+ 'hidden' => new sfValidatorBoolean(array('required' => false)),
));
$this->widgetSchema->setNameFormat('task[%s]');
View
2  lib/form/doctrine/base/BaseTaskGroupForm.class.php
@@ -18,12 +18,14 @@ public function setup()
'id' => new sfWidgetFormInputHidden(),
'name' => new sfWidgetFormInputText(),
'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('sfGuardUser'), 'add_empty' => false)),
+ 'hidden' => new sfWidgetFormInputCheckbox(),
));
$this->setValidators(array(
'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
'name' => new sfValidatorString(array('max_length' => 255)),
'user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('sfGuardUser'))),
+ 'hidden' => new sfValidatorBoolean(array('required' => false)),
));
$this->widgetSchema->setNameFormat('task_group[%s]');
View
4 lib/model/doctrine/TaskGroup.class.php
@@ -12,4 +12,8 @@
*/
class TaskGroup extends BaseTaskGroup
{
+ public function __toString(){
+ return $this['name']." (".$this['sfGuardUser']['username'].")";
+ }
+
}
View
7 lib/model/doctrine/base/BaseTask.class.php
@@ -8,6 +8,7 @@
* @property string $name
* @property string $color
* @property integer $taskgroup_id
+ * @property boolean $hidden
* @property TaskGroup $TaskGroup
* @property Doctrine_Collection $Uows
* @property Doctrine_Collection $Daystats
@@ -15,12 +16,14 @@
* @method string getName() Returns the current record's "name" value
* @method string getColor() Returns the current record's "color" value
* @method integer getTaskgroupId() Returns the current record's "taskgroup_id" value
+ * @method boolean getHidden() Returns the current record's "hidden" value
* @method TaskGroup getTaskGroup() Returns the current record's "TaskGroup" value
* @method Doctrine_Collection getUows() Returns the current record's "Uows" collection
* @method Doctrine_Collection getDaystats() Returns the current record's "Daystats" collection
* @method Task setName() Sets the current record's "name" value
* @method Task setColor() Sets the current record's "color" value
* @method Task setTaskgroupId() Sets the current record's "taskgroup_id" value
+ * @method Task setHidden() Sets the current record's "hidden" value
* @method Task setTaskGroup() Sets the current record's "TaskGroup" value
* @method Task setUows() Sets the current record's "Uows" collection
* @method Task setDaystats() Sets the current record's "Daystats" collection
@@ -49,6 +52,10 @@ public function setTableDefinition()
'type' => 'integer',
'notnull' => true,
));
+ $this->hasColumn('hidden', 'boolean', null, array(
+ 'type' => 'boolean',
+ 'default' => false,
+ ));
}
public function setUp()
View
7 lib/model/doctrine/base/BaseTaskGroup.class.php
@@ -7,15 +7,18 @@
*
* @property string $name
* @property integer $user_id
+ * @property boolean $hidden
* @property sfGuardUser $sfGuardUser
* @property Doctrine_Collection $Tasks
*
* @method string getName() Returns the current record's "name" value
* @method integer getUserId() Returns the current record's "user_id" value
+ * @method boolean getHidden() Returns the current record's "hidden" value
* @method sfGuardUser getSfGuardUser() Returns the current record's "sfGuardUser" value
* @method Doctrine_Collection getTasks() Returns the current record's "Tasks" collection
* @method TaskGroup setName() Sets the current record's "name" value
* @method TaskGroup setUserId() Sets the current record's "user_id" value
+ * @method TaskGroup setHidden() Sets the current record's "hidden" value
* @method TaskGroup setSfGuardUser() Sets the current record's "sfGuardUser" value
* @method TaskGroup setTasks() Sets the current record's "Tasks" collection
*
@@ -38,6 +41,10 @@ public function setTableDefinition()
'type' => 'integer',
'notnull' => true,
));
+ $this->hasColumn('hidden', 'boolean', null, array(
+ 'type' => 'boolean',
+ 'default' => false,
+ ));
}
public function setUp()
View
18 web/css/main.css
@@ -42,10 +42,10 @@ div.topline
.topline a:link,
.topline a:active,
{
- text-decoration: none;
- color: #ccc;
- text-transform: lowercase;
- text-decoration: underline;
+ text-decoration: none;
+ color: #ccc;
+ text-transform: lowercase;
+ text-decoration: underline;
}
div.topline ul
@@ -81,6 +81,8 @@ div.topline li
#active-task{
padding: 5px;
background-color: #fff;
+ border-radius: 10px;
+ -webkit-border-radius: 10px;
-moz-border-radius: 10px;
border: 1px solid #ccc;
margin-bottom: 20px;
@@ -96,6 +98,8 @@ td {
}
.taskbox{
+ border-radius: 4px;
+ -webkit-border-radius: 4px;
-moz-border-radius: 4px;
border: 1px solid #aaa;
padding: 3px;
@@ -142,6 +146,8 @@ li {
.shadowsquare{
padding: 20px;
background-color: #fff;
+ border-radius: 10px;
+ -webkit-border-radius: 10px;
-moz-border-radius: 10px;
border: 1px solid #ccc;
-moz-box-shadow: 2px 2px 5px #aaa;
@@ -153,8 +159,8 @@ li {
}
div.fifty {
- width: 48%;
- float: left;
+ width: 48%;
+ float: left;
}
.clear{
Please sign in to comment.
Something went wrong with that request. Please try again.