[13084] | 1 | .. _browsing_kofa: |
---|
| 2 | |
---|
[13090] | 3 | |
---|
[13084] | 4 | Browsing Kofa |
---|
| 5 | ************* |
---|
| 6 | |
---|
| 7 | The reader may ask: How do officers, applicants and students browse |
---|
| 8 | the portal? Where are the step-by-step operating instructions on how |
---|
| 9 | to use Kofa? We are always tempted to answer: The menu navigation |
---|
| 10 | should be self-explanatory and it's quite easy to follow the menu |
---|
| 11 | prompts or flash messages which appear above page titles in a green, |
---|
| 12 | yellow or red box. This answer seems a bit over the top. We must |
---|
| 13 | indeed describe some browser pages and what their clickable actions |
---|
| 14 | are doing with the data. The reason is, that a lot of Kofa's |
---|
| 15 | functionality is embedded in view and utility methods and not only |
---|
| 16 | provided by the functionality of content components. In the |
---|
| 17 | following, functionality of pages is described in subchapters called |
---|
| 18 | 'Browser Pages'. |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | .. _page_layout: |
---|
| 22 | |
---|
| 23 | Page Layout |
---|
| 24 | =========== |
---|
| 25 | |
---|
| 26 | Kofa makes use of two different `Bootstrap`_ layouts. Anonymous |
---|
| 27 | users, students and applicants do see a single-column theme with |
---|
| 28 | only a static top navigation bar. Students can navigate to the |
---|
| 29 | various display form pages of their record by pulling down the 'My |
---|
| 30 | Data' tab in the navigation bar. |
---|
| 31 | |
---|
[13098] | 32 | .. _navigation_bar: |
---|
| 33 | |
---|
| 34 | The navigation bar for an anonymous user: |
---|
| 35 | |
---|
[13108] | 36 | .. image:: images/navbar_anon.png |
---|
[13098] | 37 | |
---|
| 38 | The navigation bar for a student with drop-down menue: |
---|
| 39 | |
---|
[13108] | 40 | .. image:: images/navbar_student.png |
---|
[13098] | 41 | |
---|
| 42 | The navigation bar for an officer with lots of permissions: |
---|
| 43 | |
---|
[13108] | 44 | .. image:: images/navbar_officer.png |
---|
[13098] | 45 | |
---|
[13084] | 46 | Officers see a double-column theme after logging in. The left column |
---|
[13175] | 47 | contains a box (side box) which provides links to the user's |
---|
[13118] | 48 | preferences (My Preferences) and roles (My Roles). It also contains |
---|
[13175] | 49 | links to the various sections of Kofa, depending on the permissions |
---|
| 50 | the officer has obtained. Possible sections are: 'Portal |
---|
[13118] | 51 | Configuration', 'Officers', 'Data Center', 'Reports' and 'Access |
---|
[13175] | 52 | Codes'. The side box expands, when the officer accesses a student |
---|
| 53 | record. The box gives direct access to the pages of the student. |
---|
[13084] | 54 | |
---|
[13108] | 55 | .. image:: images/multicolumn.png |
---|
[13084] | 56 | |
---|
| 57 | |
---|
[13124] | 58 | .. _views_pages: |
---|
[13084] | 59 | |
---|
| 60 | Views, Pages and Form Pages |
---|
| 61 | =========================== |
---|
| 62 | |
---|
| 63 | Views are dealing with request and response objects. Usually a view |
---|
| 64 | renders (produces) HTML or PDF code to be displayed in a web browser |
---|
| 65 | or a pdf reader respectively. Very often a view only redirects to |
---|
| 66 | another view or page and does not render code by itself. |
---|
| 67 | Views, which render pdf code, are called pdf slips in Kofa. |
---|
| 68 | |
---|
| 69 | Kofa pages are 'layout-aware' browser views, which means they know |
---|
| 70 | about the global page layout and render content inside it. |
---|
| 71 | |
---|
| 72 | In Kofa most pages are form pages which means they are layout-aware |
---|
| 73 | views on data. These pages are either used to submit data (simple form |
---|
| 74 | page), or to display, edit or add persistant data. The latter three |
---|
| 75 | are called display, edit or add form pages respectively. Kofa is |
---|
| 76 | using the `Zope Formlib`_ package to auto-generate these forms. |
---|
| 77 | |
---|
| 78 | .. note:: |
---|
| 79 | |
---|
| 80 | Briefly, Zope Formlib is wedded to `Zope Schema`_, it provides |
---|
| 81 | display and input widgets (= views) for the fields defined in the |
---|
| 82 | Zope Schema package. Auto-generation is done with `grok.AutoFields` |
---|
[13175] | 83 | which takes the fields, declared in an |
---|
| 84 | :ref:`interface<kofa_interfaces>`, and renders display or input |
---|
| 85 | widgets, according to the schema declaration, for display or edit |
---|
| 86 | forms respectively. |
---|
[13084] | 87 | |
---|
| 88 | Whereas display and add form pages are usually shared by officers |
---|
| 89 | and students, edit form pages are not. Applicants and students are |
---|
| 90 | not allowed to edit all of their data all the time. Edit access is |
---|
| 91 | restricted by workflow states or other conditions. Officers' access |
---|
| 92 | is much less restricted, and we therefore speak of 'managing' |
---|
| 93 | instead of 'editing' data. In most cases, Kofa uses two different |
---|
| 94 | form pages which require different permissions: An `EditFormPage` |
---|
| 95 | requires the |
---|
| 96 | :py:class:`HandleApplication<waeup.kofa.applicants.permissions.HandleApplication>` |
---|
| 97 | / |
---|
| 98 | :py:class:`HandleStudent<waeup.kofa.students.permissions.HandleStudent>` |
---|
| 99 | permission and a `ManageFormPage` requires the |
---|
[13100] | 100 | :py:class:`ManageApplication<waeup.kofa.applicants.permissions.ManageApplication>` |
---|
| 101 | / |
---|
[13084] | 102 | :py:class:`ManageStudent<waeup.kofa.students.permissions.ManageStudent>` |
---|
| 103 | permission. |
---|
| 104 | |
---|
| 105 | |
---|
[13100] | 106 | .. _page_locking: |
---|
[13084] | 107 | |
---|
[13100] | 108 | Page Locking |
---|
| 109 | ============ |
---|
| 110 | |
---|
| 111 | As mentiond above, the right to use a form depends on the |
---|
| 112 | permissions the user gained. But this is not sufficient. Applicants |
---|
| 113 | and students always have the permission to handle their data |
---|
[13104] | 114 | although they are not allowed to edit the data all the time. |
---|
| 115 | Access to forms has to be further restricted. This is always done in |
---|
[13100] | 116 | the `update` method of a page. If an applicant or student doesn't |
---|
| 117 | meet the additional conditions defined in this method, s/he is |
---|
| 118 | immediately thrown out and redirected to another page. In most cases, |
---|
| 119 | the allowance to modify data depends on the workflow state of an |
---|
| 120 | applicant or student. |
---|
| 121 | |
---|
| 122 | |
---|
[13084] | 123 | .. _action_buttons: |
---|
| 124 | |
---|
| 125 | Action Buttons |
---|
| 126 | ============== |
---|
| 127 | |
---|
| 128 | There are two kinds of action buttons which appear on pages: |
---|
| 129 | |
---|
[13090] | 130 | **Link Buttons** appear on top of the page above the page |
---|
| 131 | title and are decorated with an icon. These |
---|
| 132 | :py:class:`action |
---|
| 133 | buttons<waeup.kofa.browser.viewlets.ActionButton>` have a |
---|
| 134 | link target which means they usually refer to another Kofa |
---|
| 135 | page and are sending GET requests to open the page. Example: |
---|
[13084] | 136 | |
---|
[13108] | 137 | .. image:: images/link_button.png |
---|
[13090] | 138 | :scale: 50 % |
---|
[13084] | 139 | |
---|
[13090] | 140 | **Form Buttons** are submit buttons which appear below a form. |
---|
| 141 | They are HTML form actions which submit data by sending a |
---|
| 142 | POST request back to the form page. A form page method is |
---|
| 143 | called and processes the data or simply redirects to |
---|
| 144 | another Kofa page. Example: |
---|
[13084] | 145 | |
---|
[13108] | 146 | .. image:: images/form_buttons.png |
---|
[13090] | 147 | :scale: 50 % |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | |
---|
[13084] | 151 | .. _bootstrap: http://getbootstrap.com/ |
---|
| 152 | |
---|
| 153 | .. _zope schema: http://docs.zope.org/zope.schema |
---|
| 154 | |
---|
| 155 | .. _zope formlib: http://bluebream.zope.org/doc/1.0/manual/schema.html#auto-generated-forms-using-the-forms-package |
---|