From 589d56a231f4e2c51fe937d3121dbd645e0e7f6d Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 13 May 2019 18:28:16 +0100 Subject: [PATCH] Notes User Interface updated --- application/controllers/Notes.php | 16 ++++---- application/views/notes/add.php | 60 ++++------------------------ application/views/notes/edit.php | 65 ++++++------------------------- application/views/notes/main.php | 43 +++++++++----------- application/views/notes/view.php | 27 ++++++------- assets/css/general.css | 4 ++ 6 files changed, 62 insertions(+), 153 deletions(-) diff --git a/application/controllers/Notes.php b/application/controllers/Notes.php index 6f6a5ada..f4356398 100644 --- a/application/controllers/Notes.php +++ b/application/controllers/Notes.php @@ -8,9 +8,9 @@ class Notes extends CI_Controller { $this->load->model('note'); $data['notes'] = $this->note->list_all(); $data['page_title'] = "Notes"; - $this->load->view('layout/header', $data); + $this->load->view('interface_assets/header', $data); $this->load->view('notes/main'); - $this->load->view('layout/footer'); + $this->load->view('interface_assets/footer'); } /* Provides function for adding notes to the system. */ @@ -27,9 +27,9 @@ class Notes extends CI_Controller { if ($this->form_validation->run() == FALSE) { $data['page_title'] = "Add Notes"; - $this->load->view('layout/header', $data); + $this->load->view('interface_assets/header', $data); $this->load->view('notes/add'); - $this->load->view('layout/footer'); + $this->load->view('interface_assets/footer'); } else { @@ -47,9 +47,9 @@ class Notes extends CI_Controller { // Display $data['page_title'] = "Note"; - $this->load->view('layout/header', $data); + $this->load->view('interface_assets/header', $data); $this->load->view('notes/view'); - $this->load->view('layout/footer'); + $this->load->view('interface_assets/footer'); } /* Edit Notes */ @@ -68,9 +68,9 @@ class Notes extends CI_Controller { if ($this->form_validation->run() == FALSE) { $data['page_title'] = "Edit Note"; - $this->load->view('layout/header', $data); + $this->load->view('interface_assets/header', $data); $this->load->view('notes/edit'); - $this->load->view('layout/footer'); + $this->load->view('interface_assets/footer'); } else { diff --git a/application/views/notes/add.php b/application/views/notes/add.php index 8c26e769..863638a9 100644 --- a/application/views/notes/add.php +++ b/application/views/notes/add.php @@ -1,11 +1,10 @@ -
+
-

Add Note

+
+
+

Create Note

-
-
-
@@ -25,58 +24,13 @@ - +
- - -
-
-
-
- +
- - - - - - - - \ No newline at end of file +
diff --git a/application/views/notes/edit.php b/application/views/notes/edit.php index 7eca9028..a023ddb8 100644 --- a/application/views/notes/edit.php +++ b/application/views/notes/edit.php @@ -1,11 +1,11 @@ -
+
result() as $row) { ?> -

Edit Note - title; ?>

+
+
+

Edit Note - title; ?>

+

Some quick example text to build on the card title and make up the bulk of the card's content.

+ -
-
- - @@ -25,62 +25,21 @@ - +
+
+
+ +
- +
- - - - - - - - - \ No newline at end of file diff --git a/application/views/notes/main.php b/application/views/notes/main.php index 3907a575..74f61d87 100644 --- a/application/views/notes/main.php +++ b/application/views/notes/main.php @@ -1,33 +1,28 @@ -
+
-

Note

+
+
+

Notes

+

Create a Note

-

-
- - num_rows() > 0) - { - echo "
    "; - foreach ($notes->result() as $row) + if ($notes->num_rows() > 0) { - echo "
  • "; - echo "id."\">".$row->title.""; - echo "
  • "; + echo "

    Your Notes

    "; + echo "
      "; + foreach ($notes->result() as $row) + { + echo "
    • "; + echo "id."\">".$row->title.""; + echo "
    • "; + } + echo "
    "; + } else { + echo "

    You don't currently have any notes, these are a fantastic way of storing data like ATU settings, beacons and general station notes and its better than paper as you can't lose them!

    "; } - echo "
"; - } else { - echo "

You don't currently have any notes, these are a fantastic way of storing data like ATU settings, beacons and general station notes and its better than paper as you can't lose them!

"; - } - ?> - - -
-
- Create Note + ?>
-
diff --git a/application/views/notes/view.php b/application/views/notes/view.php index 4b63b0b8..5f351dc8 100644 --- a/application/views/notes/view.php +++ b/application/views/notes/view.php @@ -1,19 +1,16 @@ -
-result() as $row) { ?> -

Note - title; ?>

+
-
-
- - note); ?> +
+
+ result() as $row) { ?> +

Note - title; ?>

+

note); ?>

+ Edit Note + + Delete Note + +
-
- -
-
\ No newline at end of file diff --git a/assets/css/general.css b/assets/css/general.css index f6a930ec..35846dff 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -20,4 +20,8 @@ .statistics_custom { padding-top: 15px; +} + +.notes { + padding-top: 15px; } \ No newline at end of file