author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 28 Jun 2011 17:59:31 +0200 | |
changeset 7570 | 648bf83945a5 |
parent 6837 | 7562418985ef |
permissions | -rw-r--r-- |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
1 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
2 |
.. _TutosBaseDiscoveringTheUI: |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
3 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
4 |
Discovering the web interface |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
5 |
----------------------------- |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
6 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
7 |
You can now access your web instance to create blogs and post messages |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
8 |
by visiting the URL http://localhost:8080/. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
9 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
10 |
By default, anonymous access is disabled, so a login form will appear. If you |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
11 |
asked to allow anonymous access when initializing the instance, click on the |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
12 |
'login' link in the top right hand corner. To login, you need then use the admin |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
13 |
account you specified at the time you initialized the database with |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
14 |
``cubicweb-ctl create``. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
15 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
16 |
.. image:: ../../images/tutos-base_login-form_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
17 |
:alt: the login form |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
18 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
19 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
20 |
Once authenticated, you can start playing with your instance. The default index |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
21 |
page looks like the following: |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
22 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
23 |
.. image:: ../../images/tutos-base_index_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
24 |
:alt: the index page |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
25 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
26 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
27 |
Minimal configuration |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
28 |
~~~~~~~~~~~~~~~~~~~~~ |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
29 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
30 |
Before creating entities, let's change that 'unset title' thing that appears |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
31 |
here and there. This comes from a |cubicweb| system properties. To set it, |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
32 |
click on the 'site configuration link' in the pop-up menu behind your login name |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
33 |
in the upper left-hand corner |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
34 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
35 |
.. image:: ../../images/tutos-base_user-menu_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
36 |
:alt: the user pop-up menu |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
37 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
38 |
The site title is in the 'Ui' section. Simply set it to the desired value and |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
39 |
click the 'validate' button. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
40 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
41 |
.. image:: ../../images/tutos-base_siteconfig_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
42 |
:alt: the site configuration form |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
43 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
44 |
You should see a 'changes applied' message. You can now go back to the |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
45 |
index page by clicking on the |cubicweb| logo in the upper left-hand corner. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
46 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
47 |
You will much likely still see 'unset title' at this point. This is because by |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
48 |
default the index page is cached. Force a refresh of the page (by typing Ctrl-R |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
49 |
in Firefox for instance) and you should now see the title you entered. |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
50 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
51 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
52 |
Adding entities |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
53 |
~~~~~~~~~~~~~~~ |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
54 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
55 |
The ``blog`` cube defines several entity types, among them ``Blog`` which is a |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
56 |
container for ``BlogEntry`` (i.e. posts) on a particular topic. We can get a |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
57 |
graphical view of the schema by clicking on the 'site schema' link in the user |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
58 |
pop-up menu we've already seen: |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
59 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
60 |
.. image:: ../../images/tutos-base_schema_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
61 |
:alt: graphical view of the schema (aka data-model) |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
62 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
63 |
Nice isn't it? Notice that this, as most other stuff we'll see in this tutorial, |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
64 |
is generated by the framework according to the model of the application. In our |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
65 |
case, the model defined by the ``blog`` cube. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
66 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
67 |
Now let us create a few of these entities. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
68 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
69 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
70 |
Add a blog |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
71 |
********** |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
72 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
73 |
Clicking on the `[+]` at the left of the 'Blog' link on the index page will lead |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
74 |
you to an HTML form to create a blog. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
75 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
76 |
.. image:: ../../images/tutos-base_blog-form_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
77 |
:alt: the blog creation form |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
78 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
79 |
For instance, call this new blog 'Tech-blog' and type in 'everything about |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
80 |
technology' as the description , then validate the form by clicking on |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
81 |
'Validate'. You will be redirected to the `primary` view of the newly created blog. |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
82 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
83 |
.. image:: ../../images/tutos-base_blog-primary_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
84 |
:alt: the blog primary view |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
85 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
86 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
87 |
Add a blog post |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
88 |
*************** |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
89 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
90 |
There are several ways to add a blog entry. The simplest is to click on the 'add |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
91 |
blog entry' link in the actions box on viewing the blog you have just created. |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
92 |
You will then see a form to create a post, with a 'blog entry of' field preset |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
93 |
to the blog we're coming from. Enter a title, some content, click the 'validate' |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
94 |
button and you're done. You will be redirected to the blog primary view, though you |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
95 |
now see that it contains the blog post you've just created. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
96 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
97 |
.. image:: ../../images/tutos-base_blog-primary-after-post-creation_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
98 |
:alt: the blog primary view after creation of a post |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
99 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
100 |
Notice there are some new boxes that appears in the left column. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
101 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
102 |
You can achieve the same thing by following the same path as we did for the blog |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
103 |
creation, e.g. by clicking on the `[+]` at the left of the 'Blog entry' link on |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
104 |
the index page. The diffidence being that since there is no context information, |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
105 |
the 'blog entry of' selector won't be preset to the blog. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
106 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
107 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
108 |
If you click on the 'modify' link of the action box, you are back to |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
109 |
the form to edit the entity you just created, except that the form now |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
110 |
has another section with a combo-box entitled 'add relation'. It |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
111 |
provisos a generic way to edit relations which don't appears in the |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
112 |
above form. Choose the relation you want to add and a second combo box |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
113 |
appears where you can pick existing entities. If there are too many |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
114 |
of them, you will be offered to navigate to the target entity, that is |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
115 |
go away from the form and go back to it later, once you've selected |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
116 |
the entity you want to link with. |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
117 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
118 |
.. image:: ../../images/tutos-base_form-generic-relations_en.png |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
119 |
:alt: the generic relations combo box |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
120 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
121 |
This combo box can't appear until the entity is actually created. That's why you |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
122 |
haven't seen it at creation time. You could also have hit 'Apply' instead of |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
123 |
'validate' and it would have showed up. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
124 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
125 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
126 |
About ui auto-adaptation |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
127 |
~~~~~~~~~~~~~~~~~~~~~~~~ |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
128 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
129 |
One of the things that make |cubicweb| different of other frameworks is |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
130 |
its automatic user interface that adapts itself according to the data being |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
131 |
displayed. Let's see an example. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
132 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
133 |
If you go back to the home page an click on the 'Blog' link, you will be redirected |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
134 |
to the primary view of the blog, the same we've seen earlier. Now, add another |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
135 |
blog, go back to the index page, and click again on this link. You will see |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
136 |
a very different view (namely the 'list' view). |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
137 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
138 |
.. image:: ../../images/tutos-base_blogs-list_en.png |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
139 |
:alt: the list view when there are more than one blog to display |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
140 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
141 |
This is because in the first case, the framework chose to use the 'primary' |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
142 |
view since there was only one entity in the data to be displayed. Now that there |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
143 |
are two entities, the 'list' view is more appropriate and hence is being used. |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
144 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
145 |
There are various other places where |cubicweb| adapts to display data in the best |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
146 |
way, the main being provided by the view *selection* mechanism that will be detailed |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
147 |
later. |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
148 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
149 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
150 |
Digging deeper |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
151 |
~~~~~~~~~~~~~~ |
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
152 |
|
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
153 |
By following principles explained below, you should now be able to |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
154 |
create new users for your application, to configure with a finer |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
155 |
grain, etc... You will notice that the index page lists a lot of types |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
156 |
you don't know about. Most are built-in types provided by the framework |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
157 |
to make the whole system work. You may ignore them in a first time and |
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
158 |
discover them as time goes. |
6835
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
159 |
|
87e2641d75f7
[doc] major rework of the simple blog tutorial
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
160 |
One thing that is worth playing with is the search box. It may be used in various |
6837
7562418985ef
tutorial proof reading
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
6835
diff
changeset
|
161 |
way, from simple full text search to advanced queries using the :ref:`RQL` . |