OSDN Git Service

members and notes scoffold
authorcake_67 <cake_67@46fa8b77-3530-0410-9d82-d95c44d28aba>
Fri, 9 Oct 2009 02:31:21 +0000 (02:31 +0000)
committercake_67 <cake_67@46fa8b77-3530-0410-9d82-d95c44d28aba>
Fri, 9 Oct 2009 02:31:21 +0000 (02:31 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/trpgtools-onweb/src/trunk/cakePHP_frame@62 46fa8b77-3530-0410-9d82-d95c44d28aba

22 files changed:
app/config/sql/members.sql [new file with mode: 0644]
app/config/sql/notes.sql [new file with mode: 0644]
app/controllers/members_controller.php [new file with mode: 0644]
app/controllers/notes_controller.php [new file with mode: 0644]
app/models/member.php [new file with mode: 0644]
app/models/note.php [new file with mode: 0644]
app/views/members/add.ctp [new file with mode: 0644]
app/views/members/admin_add.ctp [new file with mode: 0644]
app/views/members/admin_edit.ctp [new file with mode: 0644]
app/views/members/admin_index.ctp [new file with mode: 0644]
app/views/members/admin_view.ctp [new file with mode: 0644]
app/views/members/edit.ctp [new file with mode: 0644]
app/views/members/index.ctp [new file with mode: 0644]
app/views/members/view.ctp [new file with mode: 0644]
app/views/notes/add.ctp [new file with mode: 0644]
app/views/notes/admin_add.ctp [new file with mode: 0644]
app/views/notes/admin_edit.ctp [new file with mode: 0644]
app/views/notes/admin_index.ctp [new file with mode: 0644]
app/views/notes/admin_view.ctp [new file with mode: 0644]
app/views/notes/edit.ctp [new file with mode: 0644]
app/views/notes/index.ctp [new file with mode: 0644]
app/views/notes/view.ctp [new file with mode: 0644]

diff --git a/app/config/sql/members.sql b/app/config/sql/members.sql
new file mode 100644 (file)
index 0000000..11c51db
--- /dev/null
@@ -0,0 +1,12 @@
+CREATE TABLE members (
+  id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+  username VARCHAR(40) NOT NULL default '',
+  password VARCHAR(40) NOT NULL default '',
+  uid VARCHAR(40) NOT NULL,
+  created_at DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+  PRIMARY KEY(id),
+  INDEX members_login(username, password),
+  UNIQUE INDEX members_uid(uid),
+  UNIQUE INDEX members_username(username)
+);
+
diff --git a/app/config/sql/notes.sql b/app/config/sql/notes.sql
new file mode 100644 (file)
index 0000000..f3a5147
--- /dev/null
@@ -0,0 +1,16 @@
+CREATE TABLE notes (
+  id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+  member_id INTEGER UNSIGNED NOT NULL,
+  lat FLOAT NOT NULL,
+  lon FLOAT NOT NULL,
+  title TEXT NOT NULL,
+  body TEXT NOT NULL,
+  public_flag VARCHAR(32) NOT NULL DEFAULT 'private',
+  created DATETIME NOT NULL,
+  modified DATETIME NOT NULL,
+  PRIMARY KEY(id),
+  INDEX note_member_id(member_id),
+  INDEX note_pulic_flag(public_flag, member_id, modified),
+  INDEX note_modified(modified, member_id)
+)
+TYPE=InnoDB;
diff --git a/app/controllers/members_controller.php b/app/controllers/members_controller.php
new file mode 100644 (file)
index 0000000..54f8987
--- /dev/null
@@ -0,0 +1,117 @@
+<?php
+class MembersController extends AppController {
+
+       var $name = 'Members';
+       var $helpers = array('Html', 'Form');
+
+       function index() {
+               $this->Member->recursive = 0;
+               $this->set('members', $this->paginate());
+       }
+
+       function view($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid Member.', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               $this->set('member', $this->Member->read(null, $id));
+       }
+
+       function add() {
+               if (!empty($this->data)) {
+                       $this->Member->create();
+                       if ($this->Member->save($this->data)) {
+                               $this->Session->setFlash(__('The Member has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Member could not be saved. Please, try again.', true));
+                       }
+               }
+       }
+
+       function edit($id = null) {
+               if (!$id && empty($this->data)) {
+                       $this->Session->setFlash(__('Invalid Member', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if (!empty($this->data)) {
+                       if ($this->Member->save($this->data)) {
+                               $this->Session->setFlash(__('The Member has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Member could not be saved. Please, try again.', true));
+                       }
+               }
+               if (empty($this->data)) {
+                       $this->data = $this->Member->read(null, $id);
+               }
+       }
+
+       function delete($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid id for Member', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if ($this->Member->del($id)) {
+                       $this->Session->setFlash(__('Member deleted', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+       }
+
+
+       function admin_index() {
+               $this->Member->recursive = 0;
+               $this->set('members', $this->paginate());
+       }
+
+       function admin_view($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid Member.', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               $this->set('member', $this->Member->read(null, $id));
+       }
+
+       function admin_add() {
+               if (!empty($this->data)) {
+                       $this->Member->create();
+                       if ($this->Member->save($this->data)) {
+                               $this->Session->setFlash(__('The Member has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Member could not be saved. Please, try again.', true));
+                       }
+               }
+       }
+
+       function admin_edit($id = null) {
+               if (!$id && empty($this->data)) {
+                       $this->Session->setFlash(__('Invalid Member', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if (!empty($this->data)) {
+                       if ($this->Member->save($this->data)) {
+                               $this->Session->setFlash(__('The Member has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Member could not be saved. Please, try again.', true));
+                       }
+               }
+               if (empty($this->data)) {
+                       $this->data = $this->Member->read(null, $id);
+               }
+       }
+
+       function admin_delete($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid id for Member', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if ($this->Member->del($id)) {
+                       $this->Session->setFlash(__('Member deleted', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/app/controllers/notes_controller.php b/app/controllers/notes_controller.php
new file mode 100644 (file)
index 0000000..6613c80
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+class NotesController extends AppController {
+
+       var $name = 'Notes';
+       var $helpers = array('Html', 'Form');
+
+       function index() {
+               $this->Note->recursive = 0;
+               $this->set('notes', $this->paginate());
+       }
+
+       function view($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid Note.', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               $this->set('note', $this->Note->read(null, $id));
+       }
+
+       function add() {
+               if (!empty($this->data)) {
+                       $this->Note->create();
+                       if ($this->Note->save($this->data)) {
+                               $this->Session->setFlash(__('The Note has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Note could not be saved. Please, try again.', true));
+                       }
+               }
+               $members = $this->Note->Member->find('list');
+               $this->set(compact('members'));
+       }
+
+       function edit($id = null) {
+               if (!$id && empty($this->data)) {
+                       $this->Session->setFlash(__('Invalid Note', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if (!empty($this->data)) {
+                       if ($this->Note->save($this->data)) {
+                               $this->Session->setFlash(__('The Note has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Note could not be saved. Please, try again.', true));
+                       }
+               }
+               if (empty($this->data)) {
+                       $this->data = $this->Note->read(null, $id);
+               }
+               $members = $this->Note->Member->find('list');
+               $this->set(compact('members'));
+       }
+
+       function delete($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid id for Note', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if ($this->Note->del($id)) {
+                       $this->Session->setFlash(__('Note deleted', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+       }
+
+
+       function admin_index() {
+               $this->Note->recursive = 0;
+               $this->set('notes', $this->paginate());
+       }
+
+       function admin_view($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid Note.', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               $this->set('note', $this->Note->read(null, $id));
+       }
+
+       function admin_add() {
+               if (!empty($this->data)) {
+                       $this->Note->create();
+                       if ($this->Note->save($this->data)) {
+                               $this->Session->setFlash(__('The Note has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Note could not be saved. Please, try again.', true));
+                       }
+               }
+               $members = $this->Note->Member->find('list');
+               $this->set(compact('members'));
+       }
+
+       function admin_edit($id = null) {
+               if (!$id && empty($this->data)) {
+                       $this->Session->setFlash(__('Invalid Note', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if (!empty($this->data)) {
+                       if ($this->Note->save($this->data)) {
+                               $this->Session->setFlash(__('The Note has been saved', true));
+                               $this->redirect(array('action'=>'index'));
+                       } else {
+                               $this->Session->setFlash(__('The Note could not be saved. Please, try again.', true));
+                       }
+               }
+               if (empty($this->data)) {
+                       $this->data = $this->Note->read(null, $id);
+               }
+               $members = $this->Note->Member->find('list');
+               $this->set(compact('members'));
+       }
+
+       function admin_delete($id = null) {
+               if (!$id) {
+                       $this->Session->setFlash(__('Invalid id for Note', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+               if ($this->Note->del($id)) {
+                       $this->Session->setFlash(__('Note deleted', true));
+                       $this->redirect(array('action'=>'index'));
+               }
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/app/models/member.php b/app/models/member.php
new file mode 100644 (file)
index 0000000..16bf051
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+class Member extends AppModel {
+
+       var $name = 'Member';
+       var $validate = array(
+       );
+
+}
+?>
diff --git a/app/models/note.php b/app/models/note.php
new file mode 100644 (file)
index 0000000..ce2e73a
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+class Note extends AppModel {
+
+       var $name = 'Note';
+
+       //The Associations below have been created with all possible keys, those that are not needed can be removed
+       var $belongsTo = array(
+               'Member' => array(
+                       'className' => 'Member',
+                       'foreignKey' => 'member_id',
+                       'conditions' => '',
+                       'fields' => '',
+                       'order' => ''
+               )
+       );
+
+}
+?>
\ No newline at end of file
diff --git a/app/views/members/add.ctp b/app/views/members/add.ctp
new file mode 100644 (file)
index 0000000..1a6a84d
--- /dev/null
@@ -0,0 +1,18 @@
+<div class="members form">
+<?php echo $form->create('Member');?>
+       <fieldset>
+               <legend><?php __('Add Member');?></legend>
+       <?php
+               echo $form->input('username');
+               echo $form->input('password');
+               echo $form->input('uid');
+               echo $form->input('created_at');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('List Members', true), array('action' => 'index'));?></li>
+       </ul>
+</div>
diff --git a/app/views/members/admin_add.ctp b/app/views/members/admin_add.ctp
new file mode 100644 (file)
index 0000000..1a6a84d
--- /dev/null
@@ -0,0 +1,18 @@
+<div class="members form">
+<?php echo $form->create('Member');?>
+       <fieldset>
+               <legend><?php __('Add Member');?></legend>
+       <?php
+               echo $form->input('username');
+               echo $form->input('password');
+               echo $form->input('uid');
+               echo $form->input('created_at');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('List Members', true), array('action' => 'index'));?></li>
+       </ul>
+</div>
diff --git a/app/views/members/admin_edit.ctp b/app/views/members/admin_edit.ctp
new file mode 100644 (file)
index 0000000..33ffdb0
--- /dev/null
@@ -0,0 +1,20 @@
+<div class="members form">
+<?php echo $form->create('Member');?>
+       <fieldset>
+               <legend><?php __('Edit Member');?></legend>
+       <?php
+               echo $form->input('id');
+               echo $form->input('username');
+               echo $form->input('password');
+               echo $form->input('uid');
+               echo $form->input('created_at');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Member.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Member.id'))); ?></li>
+               <li><?php echo $html->link(__('List Members', true), array('action' => 'index'));?></li>
+       </ul>
+</div>
diff --git a/app/views/members/admin_index.ctp b/app/views/members/admin_index.ctp
new file mode 100644 (file)
index 0000000..749f58c
--- /dev/null
@@ -0,0 +1,60 @@
+<div class="members index">
+<h2><?php __('Members');?></h2>
+<p>
+<?php
+echo $paginator->counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?></p>
+<table cellpadding="0" cellspacing="0">
+<tr>
+       <th><?php echo $paginator->sort('id');?></th>
+       <th><?php echo $paginator->sort('username');?></th>
+       <th><?php echo $paginator->sort('password');?></th>
+       <th><?php echo $paginator->sort('uid');?></th>
+       <th><?php echo $paginator->sort('created_at');?></th>
+       <th class="actions"><?php __('Actions');?></th>
+</tr>
+<?php
+$i = 0;
+foreach ($members as $member):
+       $class = null;
+       if ($i++ % 2 == 0) {
+               $class = ' class="altrow"';
+       }
+?>
+       <tr<?php echo $class;?>>
+               <td>
+                       <?php echo $member['Member']['id']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['username']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['password']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['uid']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['created_at']; ?>
+               </td>
+               <td class="actions">
+                       <?php echo $html->link(__('View', true), array('action' => 'view', $member['Member']['id'])); ?>
+                       <?php echo $html->link(__('Edit', true), array('action' => 'edit', $member['Member']['id'])); ?>
+                       <?php echo $html->link(__('Delete', true), array('action' => 'delete', $member['Member']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $member['Member']['id'])); ?>
+               </td>
+       </tr>
+<?php endforeach; ?>
+</table>
+</div>
+<div class="paging">
+       <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ |     <?php echo $paginator->numbers();?>
+       <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('New Member', true), array('action' => 'add')); ?></li>
+       </ul>
+</div>
diff --git a/app/views/members/admin_view.ctp b/app/views/members/admin_view.ctp
new file mode 100644 (file)
index 0000000..699246d
--- /dev/null
@@ -0,0 +1,38 @@
+<div class="members view">
+<h2><?php  __('Member');?></h2>
+       <dl><?php $i = 0; $class = ' class="altrow"';?>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['id']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Username'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['username']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Password'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['password']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Uid'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['uid']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created At'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['created_at']; ?>
+                       &nbsp;
+               </dd>
+       </dl>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Edit Member', true), array('action' => 'edit', $member['Member']['id'])); ?> </li>
+               <li><?php echo $html->link(__('Delete Member', true), array('action' => 'delete', $member['Member']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $member['Member']['id'])); ?> </li>
+               <li><?php echo $html->link(__('List Members', true), array('action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/members/edit.ctp b/app/views/members/edit.ctp
new file mode 100644 (file)
index 0000000..33ffdb0
--- /dev/null
@@ -0,0 +1,20 @@
+<div class="members form">
+<?php echo $form->create('Member');?>
+       <fieldset>
+               <legend><?php __('Edit Member');?></legend>
+       <?php
+               echo $form->input('id');
+               echo $form->input('username');
+               echo $form->input('password');
+               echo $form->input('uid');
+               echo $form->input('created_at');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Member.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Member.id'))); ?></li>
+               <li><?php echo $html->link(__('List Members', true), array('action' => 'index'));?></li>
+       </ul>
+</div>
diff --git a/app/views/members/index.ctp b/app/views/members/index.ctp
new file mode 100644 (file)
index 0000000..749f58c
--- /dev/null
@@ -0,0 +1,60 @@
+<div class="members index">
+<h2><?php __('Members');?></h2>
+<p>
+<?php
+echo $paginator->counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?></p>
+<table cellpadding="0" cellspacing="0">
+<tr>
+       <th><?php echo $paginator->sort('id');?></th>
+       <th><?php echo $paginator->sort('username');?></th>
+       <th><?php echo $paginator->sort('password');?></th>
+       <th><?php echo $paginator->sort('uid');?></th>
+       <th><?php echo $paginator->sort('created_at');?></th>
+       <th class="actions"><?php __('Actions');?></th>
+</tr>
+<?php
+$i = 0;
+foreach ($members as $member):
+       $class = null;
+       if ($i++ % 2 == 0) {
+               $class = ' class="altrow"';
+       }
+?>
+       <tr<?php echo $class;?>>
+               <td>
+                       <?php echo $member['Member']['id']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['username']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['password']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['uid']; ?>
+               </td>
+               <td>
+                       <?php echo $member['Member']['created_at']; ?>
+               </td>
+               <td class="actions">
+                       <?php echo $html->link(__('View', true), array('action' => 'view', $member['Member']['id'])); ?>
+                       <?php echo $html->link(__('Edit', true), array('action' => 'edit', $member['Member']['id'])); ?>
+                       <?php echo $html->link(__('Delete', true), array('action' => 'delete', $member['Member']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $member['Member']['id'])); ?>
+               </td>
+       </tr>
+<?php endforeach; ?>
+</table>
+</div>
+<div class="paging">
+       <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ |     <?php echo $paginator->numbers();?>
+       <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('New Member', true), array('action' => 'add')); ?></li>
+       </ul>
+</div>
diff --git a/app/views/members/view.ctp b/app/views/members/view.ctp
new file mode 100644 (file)
index 0000000..699246d
--- /dev/null
@@ -0,0 +1,38 @@
+<div class="members view">
+<h2><?php  __('Member');?></h2>
+       <dl><?php $i = 0; $class = ' class="altrow"';?>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['id']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Username'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['username']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Password'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['password']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Uid'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['uid']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created At'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $member['Member']['created_at']; ?>
+                       &nbsp;
+               </dd>
+       </dl>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Edit Member', true), array('action' => 'edit', $member['Member']['id'])); ?> </li>
+               <li><?php echo $html->link(__('Delete Member', true), array('action' => 'delete', $member['Member']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $member['Member']['id'])); ?> </li>
+               <li><?php echo $html->link(__('List Members', true), array('action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/add.ctp b/app/views/notes/add.ctp
new file mode 100644 (file)
index 0000000..c14039e
--- /dev/null
@@ -0,0 +1,22 @@
+<div class="notes form">
+<?php echo $form->create('Note');?>
+       <fieldset>
+               <legend><?php __('Add Note');?></legend>
+       <?php
+               echo $form->input('member_id');
+               echo $form->input('lat');
+               echo $form->input('lon');
+               echo $form->input('title');
+               echo $form->input('body');
+               echo $form->input('public_flag');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('List Notes', true), array('action' => 'index'));?></li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/admin_add.ctp b/app/views/notes/admin_add.ctp
new file mode 100644 (file)
index 0000000..c14039e
--- /dev/null
@@ -0,0 +1,22 @@
+<div class="notes form">
+<?php echo $form->create('Note');?>
+       <fieldset>
+               <legend><?php __('Add Note');?></legend>
+       <?php
+               echo $form->input('member_id');
+               echo $form->input('lat');
+               echo $form->input('lon');
+               echo $form->input('title');
+               echo $form->input('body');
+               echo $form->input('public_flag');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('List Notes', true), array('action' => 'index'));?></li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/admin_edit.ctp b/app/views/notes/admin_edit.ctp
new file mode 100644 (file)
index 0000000..0532562
--- /dev/null
@@ -0,0 +1,24 @@
+<div class="notes form">
+<?php echo $form->create('Note');?>
+       <fieldset>
+               <legend><?php __('Edit Note');?></legend>
+       <?php
+               echo $form->input('id');
+               echo $form->input('member_id');
+               echo $form->input('lat');
+               echo $form->input('lon');
+               echo $form->input('title');
+               echo $form->input('body');
+               echo $form->input('public_flag');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Note.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Note.id'))); ?></li>
+               <li><?php echo $html->link(__('List Notes', true), array('action' => 'index'));?></li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/admin_index.ctp b/app/views/notes/admin_index.ctp
new file mode 100644 (file)
index 0000000..ccc6ec9
--- /dev/null
@@ -0,0 +1,78 @@
+<div class="notes index">
+<h2><?php __('Notes');?></h2>
+<p>
+<?php
+echo $paginator->counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?></p>
+<table cellpadding="0" cellspacing="0">
+<tr>
+       <th><?php echo $paginator->sort('id');?></th>
+       <th><?php echo $paginator->sort('member_id');?></th>
+       <th><?php echo $paginator->sort('lat');?></th>
+       <th><?php echo $paginator->sort('lon');?></th>
+       <th><?php echo $paginator->sort('title');?></th>
+       <th><?php echo $paginator->sort('body');?></th>
+       <th><?php echo $paginator->sort('public_flag');?></th>
+       <th><?php echo $paginator->sort('created');?></th>
+       <th><?php echo $paginator->sort('modified');?></th>
+       <th class="actions"><?php __('Actions');?></th>
+</tr>
+<?php
+$i = 0;
+foreach ($notes as $note):
+       $class = null;
+       if ($i++ % 2 == 0) {
+               $class = ' class="altrow"';
+       }
+?>
+       <tr<?php echo $class;?>>
+               <td>
+                       <?php echo $note['Note']['id']; ?>
+               </td>
+               <td>
+                       <?php echo $html->link($note['Member']['id'], array('controller' => 'members', 'action' => 'view', $note['Member']['id'])); ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['lat']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['lon']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['title']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['body']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['public_flag']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['created']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['modified']; ?>
+               </td>
+               <td class="actions">
+                       <?php echo $html->link(__('View', true), array('action' => 'view', $note['Note']['id'])); ?>
+                       <?php echo $html->link(__('Edit', true), array('action' => 'edit', $note['Note']['id'])); ?>
+                       <?php echo $html->link(__('Delete', true), array('action' => 'delete', $note['Note']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $note['Note']['id'])); ?>
+               </td>
+       </tr>
+<?php endforeach; ?>
+</table>
+</div>
+<div class="paging">
+       <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ |     <?php echo $paginator->numbers();?>
+       <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('New Note', true), array('action' => 'add')); ?></li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/admin_view.ctp b/app/views/notes/admin_view.ctp
new file mode 100644 (file)
index 0000000..90e32c1
--- /dev/null
@@ -0,0 +1,60 @@
+<div class="notes view">
+<h2><?php  __('Note');?></h2>
+       <dl><?php $i = 0; $class = ' class="altrow"';?>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['id']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Member'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $html->link($note['Member']['id'], array('controller' => 'members', 'action' => 'view', $note['Member']['id'])); ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Lat'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['lat']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Lon'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['lon']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['title']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Body'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['body']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public Flag'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['public_flag']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['created']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['modified']; ?>
+                       &nbsp;
+               </dd>
+       </dl>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Edit Note', true), array('action' => 'edit', $note['Note']['id'])); ?> </li>
+               <li><?php echo $html->link(__('Delete Note', true), array('action' => 'delete', $note['Note']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $note['Note']['id'])); ?> </li>
+               <li><?php echo $html->link(__('List Notes', true), array('action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Note', true), array('action' => 'add')); ?> </li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/edit.ctp b/app/views/notes/edit.ctp
new file mode 100644 (file)
index 0000000..0532562
--- /dev/null
@@ -0,0 +1,24 @@
+<div class="notes form">
+<?php echo $form->create('Note');?>
+       <fieldset>
+               <legend><?php __('Edit Note');?></legend>
+       <?php
+               echo $form->input('id');
+               echo $form->input('member_id');
+               echo $form->input('lat');
+               echo $form->input('lon');
+               echo $form->input('title');
+               echo $form->input('body');
+               echo $form->input('public_flag');
+       ?>
+       </fieldset>
+<?php echo $form->end('Submit');?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Note.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Note.id'))); ?></li>
+               <li><?php echo $html->link(__('List Notes', true), array('action' => 'index'));?></li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/index.ctp b/app/views/notes/index.ctp
new file mode 100644 (file)
index 0000000..ccc6ec9
--- /dev/null
@@ -0,0 +1,78 @@
+<div class="notes index">
+<h2><?php __('Notes');?></h2>
+<p>
+<?php
+echo $paginator->counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?></p>
+<table cellpadding="0" cellspacing="0">
+<tr>
+       <th><?php echo $paginator->sort('id');?></th>
+       <th><?php echo $paginator->sort('member_id');?></th>
+       <th><?php echo $paginator->sort('lat');?></th>
+       <th><?php echo $paginator->sort('lon');?></th>
+       <th><?php echo $paginator->sort('title');?></th>
+       <th><?php echo $paginator->sort('body');?></th>
+       <th><?php echo $paginator->sort('public_flag');?></th>
+       <th><?php echo $paginator->sort('created');?></th>
+       <th><?php echo $paginator->sort('modified');?></th>
+       <th class="actions"><?php __('Actions');?></th>
+</tr>
+<?php
+$i = 0;
+foreach ($notes as $note):
+       $class = null;
+       if ($i++ % 2 == 0) {
+               $class = ' class="altrow"';
+       }
+?>
+       <tr<?php echo $class;?>>
+               <td>
+                       <?php echo $note['Note']['id']; ?>
+               </td>
+               <td>
+                       <?php echo $html->link($note['Member']['id'], array('controller' => 'members', 'action' => 'view', $note['Member']['id'])); ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['lat']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['lon']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['title']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['body']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['public_flag']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['created']; ?>
+               </td>
+               <td>
+                       <?php echo $note['Note']['modified']; ?>
+               </td>
+               <td class="actions">
+                       <?php echo $html->link(__('View', true), array('action' => 'view', $note['Note']['id'])); ?>
+                       <?php echo $html->link(__('Edit', true), array('action' => 'edit', $note['Note']['id'])); ?>
+                       <?php echo $html->link(__('Delete', true), array('action' => 'delete', $note['Note']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $note['Note']['id'])); ?>
+               </td>
+       </tr>
+<?php endforeach; ?>
+</table>
+</div>
+<div class="paging">
+       <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ |     <?php echo $paginator->numbers();?>
+       <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('New Note', true), array('action' => 'add')); ?></li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>
diff --git a/app/views/notes/view.ctp b/app/views/notes/view.ctp
new file mode 100644 (file)
index 0000000..90e32c1
--- /dev/null
@@ -0,0 +1,60 @@
+<div class="notes view">
+<h2><?php  __('Note');?></h2>
+       <dl><?php $i = 0; $class = ' class="altrow"';?>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['id']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Member'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $html->link($note['Member']['id'], array('controller' => 'members', 'action' => 'view', $note['Member']['id'])); ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Lat'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['lat']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Lon'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['lon']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['title']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Body'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['body']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public Flag'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['public_flag']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['created']; ?>
+                       &nbsp;
+               </dd>
+               <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
+               <dd<?php if ($i++ % 2 == 0) echo $class;?>>
+                       <?php echo $note['Note']['modified']; ?>
+                       &nbsp;
+               </dd>
+       </dl>
+</div>
+<div class="actions">
+       <ul>
+               <li><?php echo $html->link(__('Edit Note', true), array('action' => 'edit', $note['Note']['id'])); ?> </li>
+               <li><?php echo $html->link(__('Delete Note', true), array('action' => 'delete', $note['Note']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $note['Note']['id'])); ?> </li>
+               <li><?php echo $html->link(__('List Notes', true), array('action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Note', true), array('action' => 'add')); ?> </li>
+               <li><?php echo $html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
+               <li><?php echo $html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
+       </ul>
+</div>