Re: Finding if a event exists for a date

2014-07-23 Thread Jumy Elerossë
7;]; > $formattedDate = > CakeTime::format("{$date['year']}-{$date['month']}-{$date['day']}", "%M %D, > %Y); > > I imagine there's a much better way to do this but I'm strapped for time > right now to think any

Re: Finding if a event exists for a date

2014-07-23 Thread Jumy Elerossë
be a little off maybe, I haven't > had time to test. > > $isBooked = $this->Point->BookedSurvey->find('count', array( >> 'conditions' => CakeTime::dayAsSql('Jul 23, 2014', 'survey_date') // >> replace the date

Re: Finding if a event exists for a date

2014-07-23 Thread Jumy Elerossë
; http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#TimeHelper::dayAsSql > > I'd recommend using the time helper where applicable really, you'd need to > use CakeTime:: if you plan to do this in a controller or model. > > Hope this helps > > > On 23 July

Finding if a event exists for a date

2014-07-22 Thread Jumy Elerossë
Hello everyone. I'm struggling with a problem since a week ago, and this is driving me crazy. I'm doing a website for doing surveys in the forest. This is the schema: 1 place have several points, and for each point, an user can book a day for doing a survey. If that point has booked already a

Booking a date

2014-07-22 Thread Jumy Elerossë
Hello everyone. I'm struggling with this since a week ago and it's driving me crazy. I'm doing a website for doing surveys in a forest. There is many places, and each place has different points. An user can choose one of those points and book a day for a survey, but there can be only one surve

Re: Struggling assigning roles

2014-05-12 Thread Jumy Elerossë
Thank you very much, Kento. I will give it a try ;) On Monday, 12 May 2014 05:56:57 UTC+1, Kento Furui wrote: > > Add value 'belongsTo' to your User.php Model. Like so. > > class User extends AppModel { > public $belongsTo = 'Department';} > > -- Like Us on FaceBook https://www.facebook.com/

Struggling assigning roles

2014-05-11 Thread Jumy Elerossë
Hello everyone. I have a problem. I have a view for adding users to a database, and I would that in the adding new user form a combo box can be used to assign the "departments" where they belong. Those "departments" belongs to a different model and I would that calling to the adding-new-user v

Re: Problems with ACL ARO ACO

2014-05-06 Thread Jumy Elerossë
Thank you very much, mate. I will give it a chance. On Tuesday, 6 May 2014 14:41:53 UTC+1, Dario Savella wrote: > > I am wressling myself with Acl and I've found helpful to use the AclExtras > plugin. > There's a convenient (although slow) page that uses checkboxes to grant > permissions. > --

Re: Problems with ACL ARO ACO

2014-05-06 Thread Jumy Elerossë
If somebody is so kind to share some kind of tutorial that is known to work properly, I will be really happy ;) On Monday, 5 May 2014 13:07:27 UTC+1, Jumy Elerossë wrote: > > Hello everyone. > > I have been struggling with Cake PHP, specially with the part of the ACL, > ARO a

Problems with ACL ARO ACO

2014-05-05 Thread Jumy Elerossë
Hello everyone. I have been struggling with Cake PHP, specially with the part of the ACL, ARO and ACOS. I have been Googling and reading a lot, but the official example seems to be incomplete (looks like incomplete to me), and I can only find out of date examples. I'm using cakephp 2.4.7. This