Browse Source

Merge branch 'master' of https://bitbucket.org/lebouquetin/protov1

root 10 years ago
parent
commit
c12714aae8
100 changed files with 1745 additions and 1336 deletions
  1. 0 3
      .gitignore
  2. 215 0
      README.md
  3. 1 1
      bin/run.sh
  4. 1 1
      bin/setup.sh
  5. 6 6
      doc/apache.wsgi.example.txt
  6. 5 6
      doc/database/pod-create-database-and-user.sh
  7. 0 10
      doc/database/pod-init-data-2013.11.15-15.54.45.sql
  8. 571 0
      doc/database/pod-init-database.sql
  9. 0 274
      doc/database/pod-schema-2013.11.15-15.54.45.sql
  10. 0 9
      doc/database/pod-upgrade-0.1.0_to_0.2.0.sql
  11. 0 37
      doc/database/pod-upgrade-0.2.0_to_0.3.0.sql
  12. 0 34
      doc/database/pod-upgrade-0.3.0_to_0.4.0.sql
  13. 0 11
      doc/database/pod-upgrade-0.4.0_to_0.5.0.sql
  14. 39 0
      install/requirements.txt
  15. 0 4
      pboard/MANIFEST.in
  16. 0 2
      pboard/pboard/__init__.py
  17. 0 2
      pboard/pboard/controllers/__init__.py
  18. 0 573
      pboard/pboard/templates/document-widgets-tabs.mak
  19. 0 210
      pboard/pboard/templates/document.mak
  20. 4 0
      pod/MANIFEST.in
  21. 3 3
      pod/README.txt
  22. 1 1
      pod/app.wsgi
  23. 10 16
      pod/development.ini.base
  24. 1 1
      pod/migration/env.py
  25. 0 0
      pod/migration/script.py.mako
  26. 0 0
      pod/migration/versions/empty.txt
  27. 2 0
      pod/pod/__init__.py
  28. 0 0
      pod/pod/config/__init__.py
  29. 7 7
      pod/pod/config/app_cfg.py
  30. 6 6
      pod/pod/config/deployment.ini_tmpl
  31. 2 2
      pod/pod/config/environment.py
  32. 7 7
      pod/pod/config/middleware.py
  33. 2 0
      pod/pod/controllers/__init__.py
  34. 3 3
      pod/pod/controllers/admingroup.py
  35. 3 3
      pod/pod/controllers/adminuser.py
  36. 14 9
      pod/pod/controllers/api.py
  37. 4 4
      pod/pod/controllers/apimenu.py
  38. 5 5
      pod/pod/controllers/apipublic.py
  39. 3 3
      pod/pod/controllers/controller.template
  40. 13 13
      pod/pod/controllers/debug.py
  41. 1 1
      pod/pod/controllers/error.py
  42. 21 21
      pod/pod/controllers/root.py
  43. 3 3
      pod/pod/controllers/secure.py
  44. 2 2
      pod/pod/controllers/template.py
  45. BIN
      pod/pod/i18n/fr_FR/LC_MESSAGES/pboard.mo
  46. 751 0
      pod/pod/i18n/fr_FR/LC_MESSAGES/pboard.po
  47. 0 0
      pod/pod/i18n/ru/LC_MESSAGES/pboard.po
  48. 0 0
      pod/pod/lib/__init__.py
  49. 0 0
      pod/pod/lib/app_globals.py
  50. 2 2
      pod/pod/lib/auth.py
  51. 0 0
      pod/pod/lib/base.py
  52. 3 3
      pod/pod/lib/dbapi.py
  53. 1 1
      pod/pod/lib/helpers.py
  54. 2 2
      pod/pod/model/__init__.py
  55. 2 2
      pod/pod/model/auth.py
  56. 3 3
      pod/pod/model/data.py
  57. 1 1
      pod/pod/model/model.template
  58. 23 27
      pod/pod/model/serializers.py
  59. 0 0
      pod/pod/public/css/bootstrap-datetimepicker.min.css
  60. 0 0
      pod/pod/public/css/bootstrap-responsive.min.css
  61. 0 0
      pod/pod/public/css/bootstrap.css
  62. 0 0
      pod/pod/public/css/bootstrap.min.css
  63. 1 1
      pod/pod/public/css/external/font-awesome-4.1.0/css/font-awesome.min.css
  64. 0 0
      pod/pod/public/css/external/font-awesome-4.1.0/fonts/FontAwesome.otf
  65. 0 0
      pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.eot
  66. 0 0
      pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.svg
  67. 0 0
      pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf
  68. 0 0
      pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.woff
  69. 0 0
      pod/pod/public/css/external/google-code-prettify/prettify.css
  70. 0 0
      pod/pod/public/css/glyphicons.css
  71. 0 0
      pod/pod/public/css/style.css
  72. 0 0
      pod/pod/public/favicon.ico
  73. 0 0
      pod/pod/public/img/glyphicons-grey.png
  74. 0 0
      pod/pod/public/img/glyphicons-halflings-white.original.png
  75. 0 0
      pod/pod/public/img/glyphicons-halflings-white.png
  76. 0 0
      pod/pod/public/img/glyphicons-halflings.original.png
  77. 0 0
      pod/pod/public/img/glyphicons-halflings.png
  78. 0 0
      pod/pod/public/img/glyphicons-white.png
  79. 0 0
      pod/pod/public/img/glyphicons.png
  80. 0 0
      pod/pod/public/javascript/external/bootstrap-datetimepicker.min.js
  81. 0 0
      pod/pod/public/javascript/external/bootstrap-wysiwyg.js
  82. 0 0
      pod/pod/public/javascript/external/bootstrap.js
  83. 0 0
      pod/pod/public/javascript/external/bootstrap.min.js
  84. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-apollo.js
  85. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-basic.js
  86. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-clj.js
  87. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-css.js
  88. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-dart.js
  89. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-erlang.js
  90. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-go.js
  91. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-hs.js
  92. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-lisp.js
  93. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-llvm.js
  94. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-lua.js
  95. 1 1
      pod/pod/public/javascript/external/google-code-prettify/lang-matlab.js
  96. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-ml.js
  97. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-mumps.js
  98. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-n.js
  99. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-pascal.js
  100. 0 0
      pod/pod/public/javascript/external/google-code-prettify/lang-proto.js

+ 0 - 3
.gitignore View File

@@ -32,9 +32,6 @@ htmlcov/
32 32
 nosetests.xml
33 33
 coverage.xml
34 34
 
35
-# Translations
36
-*.mo
37
-
38 35
 # Mr Developer
39 36
 .mr.developer.cfg
40 37
 .project

+ 215 - 0
README.md View File

@@ -0,0 +1,215 @@
1
+# Introduction to POD #
2
+
3
+Pod is collaborative software designed to allow people to work on and share various data and document types. 
4
+
5
+It is [AGPL licenced](http://fr.wikipedia.org/wiki/GNU_Affero_General_Public_License) software.
6
+
7
+Pod is licensed under the terms of the 
8
+[GNU Affero General Public License](http://www.gnu.org/licenses/agpl.txt)
9
+as published by the [Free Software Foundation](http://www.fsf.org/).
10
+
11
+It is currently unstable, it is recommended to use it for test purpose only.
12
+
13
+It's a python 3 web application based on [TurboGears](http://www.turbogears.org/); it uses [PostgreSQL](http://www.postgresql.org/) as storage engine.
14
+
15
+## Features ##
16
+
17
+* Data and document sharing: text documents, files, contact, calendar, comments
18
+* Data and document status
19
+* Full traceability
20
+* Access control management, document granularity.
21
+
22
+It allows to keep private and shared data in the same place.
23
+The ACL is based on share with groups or individual users.
24
+
25
+## Give it a try ##
26
+
27
+### Online demo ###
28
+The fastest way to test it is to test the demo:
29
+
30
+* http://demo.archipeldata.com
31
+* login: demo@archipeldata.com
32
+* password: demo
33
+
34
+### Install your own instance ###
35
+
36
+The other way to test it is to install it on your computer. See documentation below.
37
+
38
+## Installation ##
39
+
40
+### Dependencies###
41
+
42
+Note: the following information is for Debian. For other OS, adapt the package names.
43
+
44
+You'll need to install the following packages:
45
+
46
+    apt-get install realpath python3 python-virtualenv python3-dev python-pip build-essential postgresql-server-dev-all
47
+
48
+If you work on a local database, then you also need to install PostgreSQL:
49
+
50
+    apt-get install postgresql postgresql-client
51
+
52
+### Get the source ###
53
+
54
+Get the sources from Bitbucket:
55
+
56
+    git clone https://bitbucket.org/lebouquetin/pod.git
57
+
58
+**Note: Now everything is documented to be executed from the pod directory newly created.**
59
+
60
+### Setup a database ###
61
+
62
+#### Allowing local connections on PostgreSQL ####
63
+
64
+Check the pg_hba.conf file, it should allow connection for user/pass through loopback IP address.
65
+The file should include the following configuration:
66
+
67
+    # IPv4 local connections:
68
+    host    all             all             127.0.0.1/32            md5
69
+
70
+Note: on Debian, the pg\_hba file is found at /etc/postgresql/9.1/main/pg_hba.conf
71
+
72
+If you changed the file, reload PostgreSQL:
73
+
74
+    service postgresql reload
75
+
76
+#### Create a new database and user on PostgreSQL ####
77
+
78
+We suppose you will create a user named _poduser_ with passowrd _podpassword_
79
+and a database _poddb_
80
+
81
+First login as root, then su as postgre and run a PostgreSQL client:
82
+
83
+    root@hostname:~# su postgres
84
+    postgres@hostname:/root$ psql
85
+    psql (9.1.13)
86
+    Type "help" for help.
87
+    
88
+    postgres=# 
89
+    
90
+    
91
+Now, type the following commands:
92
+
93
+    CREATE ROLE poduser WITH LOGIN PASSWORD 'podpassword';
94
+    CREATE DATABASE poddb OWNER poduser;
95
+    GRANT ALL PRIVILEGES ON DATABASE poddb TO poduser;
96
+
97
+At the end, you can quit the psql client by running the \q quit command:
98
+
99
+    postgres=# \q
100
+    postgres@mozart:/root$
101
+
102
+#### Test the database access ####
103
+
104
+You can test your newly created user by running the following command:
105
+
106
+    psql -h 127.0.0.1 -W -U poduser poddb -c 'SELECT NOW();'
107
+
108
+The result should be similar to:
109
+
110
+    user@hostname:~$ psql -h 127.0.0.1 -W -U poduser poddb -c 'SELECT NOW();'
111
+    Password for user poduser: 
112
+                  now              
113
+    -------------------------------
114
+     2014-06-16 11:35:48.590838+02
115
+    (1 row)
116
+
117
+#### Setup the database schema and initial data ####
118
+
119
+Your database is now ready. Fill it with the required schema and data by importing SQL:
120
+
121
+    psql -h 127.0.0.1 -W -U poduser poddb < doc/database/pod-init-database.sql
122
+
123
+You can test it through the following command:
124
+
125
+    user@hostname:~$ psql -h 127.0.0.1 -W -U poduser poddb -c 'SELECT * from pod_user;'
126
+
127
+You should find the admin@localhost user entry.
128
+
129
+### Setup python virtualenv ###
130
+
131
+Pod uses virtualenv as deployment environment. This ensure that there will be no 
132
+conflict between system-wide python modules and pod required ones.
133
+
134
+    virtualenv -p /usr/bin/python3 tg2env
135
+    source tg2env/bin/activate
136
+    cd pod && python setup.py develop && cd -
137
+    pip install -r install/requirements.txt
138
+    
139
+Notes:
140
+
141
+* Debian: you may get errors with stevedore/pbr which is not supported by python 3.2
142
+(debian version of python 3). This is not a real problem
143
+* Ubuntu (at least 14.04): you should remove _distribute_ and _wsgiref _
144
+  from the requirements.txt file
145
+
146
+### Create configuration ###
147
+
148
+    cp pod/development.ini.base pod/development.ini
149
+
150
+Configure database in the development.ini file. This is defined as sqlalchemy.url
151
+and the default value is below:
152
+
153
+    sqlalchemy.url = postgresql://pod_user:pod_user_password@127.0.0.1:5432/pod
154
+
155
+
156
+    
157
+### Running Pod as standalone ###
158
+
159
+Now you can run the standalone server:
160
+
161
+    ./bin/run.sh
162
+    
163
+Which should result in something like this:
164
+
165
+    13:53:49,982 INFO  [gearbox] Starting subprocess with file monitor
166
+    13:53:50,646 WARNI [py.warnings] /tmp/pod/protov1/tg2env/lib/python3.2/site-packages/tw2/core/validation.py:12: ImportWarning: Not importing directory '/tmp/pod/protov1/tg2env/lib/python3.2/site-packages/tw2/core/i18n': missing __init__.py
167
+      from .i18n import _
168
+    
169
+    13:53:50,862 INFO  [gearbox] Starting server in PID 11174.
170
+    Starting HTTP server on http://0.0.0.0:8080
171
+    
172
+You can now enter the application at [http://localhost:8080](http://localhost:8080) and login:
173
+
174
+* user : admin@localhost
175
+* password : admin
176
+    
177
+Enjoy :)
178
+
179
+
180
+### Running Pod through Apache WSGI ###
181
+
182
+#### Dependencies ####
183
+
184
+Install dependencies:
185
+
186
+    apt-get install apache2 libapache2-mod-wsgi-py3
187
+
188
+#### WSGI configuration ####
189
+
190
+Example of Apache WSGI configuration. This configuration refers to productionapp.wsgi which is a copy of the file *app.wsgi* available in the repo. (this file has to be updated to match with your environment and installation)
191
+
192
+    <VirtualHost *:80>
193
+        ServerAdmin webmaster@archipeldata.com
194
+        ServerName demo.archipeldata.com
195
+
196
+        WSGIProcessGroup pod
197
+        WSGIDaemonProcess pod user=www-data group=adm threads=4 python-path=/opt/podinstall/tg2env/lib/python3.2/site-packages
198
+        WSGIScriptAlias / /opt/podinstall/pod/productionapp.wsgi
199
+
200
+        #Serve static files directly without TurboGears
201
+        Alias /img     /opt/podinstall/pod/pod/public/img/
202
+        Alias /favicon.ico /opt/podinstall/pod/pod/public/favicon.ico
203
+        Alias /css        /opt/podinstall/pod/pod/public/css
204
+        Alias /javascript /opt/podinstall/pod/pod/public/javascript
205
+
206
+        CustomLog /var/log/apache2/demopod-access.log combined
207
+        ErrorLog /var/log/apache2/demopod-error.log
208
+        LogLevel debug
209
+    </VirtualHost>
210
+
211
+### Help required ###
212
+
213
+If you need help, contact us. If you want to help, contact us. So... contact us ;)
214
+
215
+Damien Accorsi - damien.accorsi@free.fr

+ 1 - 1
bin/run.sh View File

@@ -10,7 +10,7 @@ ROOT_FOLDER=${POD_INSTALL_FULL_PATH}
10 10
 
11 11
 cd ${ROOT_FOLDER}
12 12
 source tg2env/bin/activate
13
-cd ${ROOT_FOLDER}/pboard/
13
+cd ${ROOT_FOLDER}/pod/
14 14
 gearbox serve -c development.ini --reload --debug
15 15
 cd ${OLD_PATH}
16 16
 

+ 1 - 1
bin/setup.sh View File

@@ -65,7 +65,7 @@ echo
65 65
 echo "-------------------------"
66 66
 echo "- setup project"
67 67
 echo "-------------------------"
68
-cd pboard/
68
+cd pod/
69 69
 python setup.py develop
70 70
 echo
71 71
 echo

+ 6 - 6
doc/apache.wsgi.example.txt View File

@@ -2,14 +2,14 @@
2 2
     ServerName pod
3 3
 
4 4
     WSGIProcessGroup pod
5
-    WSGIDaemonProcess pod user=www-data group=www-data threads=4 python-path=/home/daccorsi/sources/protos/pboard/tg2env/lib/python3.2/site-packages
6
-    WSGIScriptAlias / /home/daccorsi/sources/protos/pboard/pboard/app.wsgi
5
+    WSGIDaemonProcess pod user=www-data group=www-data threads=4 python-path=/home/daccorsi/sources/protos/pod/tg2env/lib/python3.2/site-packages
6
+    WSGIScriptAlias / /home/daccorsi/sources/protos/pod/pod/app.wsgi
7 7
 
8 8
     #Serve static files directly without TurboGears
9
-    Alias /images     /home/daccorsi/sources/protos/pboard/pboard/pboard/public/images
10
-    Alias /favicon.ico     /home/daccorsi/sources/protos/pboard/pboard/pboard/public/favicon.ico
11
-    Alias /css        /home/daccorsi/sources/protos/pboard/pboard/pboard/public/css
12
-    Alias /javascript /home/daccorsi/sources/protos/pboard/pboard/pboard/public/javascript
9
+    Alias /images     /home/daccorsi/sources/protos/pod/pod/pod/public/images
10
+    Alias /favicon.ico     /home/daccorsi/sources/protos/pod/pod/pod/public/favicon.ico
11
+    Alias /css        /home/daccorsi/sources/protos/pod/pod/pod/public/css
12
+    Alias /javascript /home/daccorsi/sources/protos/pod/pod/pod/public/javascript
13 13
 
14 14
     CustomLog /var/log/apache2/pod-access.log combined
15 15
     ErrorLog /var/log/apache2/pod-error.log

+ 5 - 6
doc/database/pod-create-database-and-user.sh View File

@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2
-POD_DB_USER='pod_protov1_dev'
3
-POD_DB_USER_PASSWORD='pod_protov1_dev_password'
4
-POD_DB_NAME='pod_protov1_dev'
2
+POD_DB_USER='pod_user'
3
+POD_DB_USER_PASSWORD='pod_user_password'
4
+POD_DB_NAME='pod'
5 5
 
6 6
 # DB_HOST='127.0.0.1'
7 7
 # DB_PORT='5432'
@@ -45,9 +45,8 @@ echo ${BUILD_DB_SQL} | psql
45 45
 # psql -c "DROP USER pod_master;"
46 46
 
47 47
 echo
48
-echo "You can now init schema and data by running the following commands:"
48
+echo "You can now init schema and data by running the following command:"
49 49
 echo
50
-echo "psql -h 127.0.0.1 -U ${POD_DB_USER} -W ${POD_DB_NAME} < pod-schema-2013.11.15-15.54.45.sql"
51
-echo "psql -h 127.0.0.1 -U ${POD_DB_USER} -W ${POD_DB_NAME} < pod-init-data-2013.11.15-15.54.45.sql"
50
+echo "psql -h 127.0.0.1 -U ${POD_DB_USER} -W ${POD_DB_NAME} < pod-init-database.sql"
52 51
 echo 
53 52
 echo "note that you'll be asked for the password"

+ 0 - 10
doc/database/pod-init-data-2013.11.15-15.54.45.sql View File

@@ -1,11 +0,0 @@
1
---
2
---
3
-
4
-SET statement_timeout = 0;
5
-SET client_encoding = 'UTF8';
6
-SET standard_conforming_strings = on;
7
-SET check_function_bodies = false;
8
-SET client_min_messages = warning;
9
-
10
-INSERT INTO pod_group(group_id, group_name, display_name, created) VALUES ('1', 'user', 'Users', NOW());

+ 571 - 0
doc/database/pod-init-database.sql View File

@@ -0,0 +1,571 @@
1
+--
2
+-- PostgreSQL database dump
3
+--
4
+
5
+SET statement_timeout = 0;
6
+SET client_encoding = 'UTF8';
7
+SET standard_conforming_strings = on;
8
+SET check_function_bodies = false;
9
+SET client_min_messages = warning;
10
+
11
+--
12
+-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
13
+--
14
+
15
+CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
16
+
17
+
18
+--
19
+-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
20
+--
21
+
22
+COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
23
+
24
+
25
+SET search_path = public, pg_catalog;
26
+
27
+--
28
+-- Name: pod_update_node(); Type: FUNCTION; Schema: public; Owner: pod_intranet
29
+--
30
+
31
+CREATE FUNCTION pod_update_node() RETURNS trigger
32
+    LANGUAGE plpgsql
33
+    AS $$
34
+BEGIN
35
+INSERT INTO pod_nodes_history (node_id, parent_id, node_order, node_type, created_at, updated_at, 
36
+       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
37
+       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
38
+       node_depth, owner_id, version_id, is_shared, is_public, public_url_key) VALUES (NEW.node_id, NEW.parent_id, NEW.node_order, NEW.node_type, NEW.created_at, NEW.updated_at, NEW.data_label, NEW.data_content, NEW.data_datetime, NEW.node_status, NEW.data_reminder_datetime, NEW.data_file_name, NEW.data_file_content, NEW.data_file_mime_type, NEW.parent_tree_path, NEW.node_depth, NEW.owner_id, nextval('pod_nodes_version_id_sequence'), NEW.is_shared, NEW.is_public, NEW.public_url_key);
39
+return new;
40
+END;
41
+$$;
42
+
43
+
44
+--
45
+-- Name: set_created_at(); Type: FUNCTION; Schema: public; Owner: pod_intranet
46
+--
47
+
48
+CREATE FUNCTION set_created_at() RETURNS trigger
49
+    LANGUAGE plpgsql
50
+    AS $$
51
+BEGIN
52
+    NEW.created_at = CURRENT_TIMESTAMP;
53
+    NEW.updated_at = CURRENT_TIMESTAMP;
54
+    RETURN NEW;
55
+END;
56
+$$;
57
+
58
+
59
+--
60
+-- Name: set_updated_at(); Type: FUNCTION; Schema: public; Owner: pod_intranet
61
+--
62
+
63
+CREATE FUNCTION set_updated_at() RETURNS trigger
64
+    LANGUAGE plpgsql
65
+    AS $$
66
+BEGIN
67
+    NEW.updated_at = CURRENT_TIMESTAMP;
68
+    RETURN NEW;
69
+END;
70
+$$;
71
+
72
+
73
+SET default_tablespace = '';
74
+
75
+SET default_with_oids = false;
76
+
77
+--
78
+-- Name: migrate_version; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
79
+--
80
+
81
+CREATE TABLE migrate_version (
82
+    version_num character varying(32) NOT NULL
83
+);
84
+
85
+
86
+--
87
+-- Name: pod_group; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
88
+--
89
+
90
+CREATE TABLE pod_group (
91
+    group_id integer NOT NULL,
92
+    group_name character varying(16) NOT NULL,
93
+    display_name character varying(255),
94
+    created timestamp without time zone,
95
+    personnal_group boolean
96
+);
97
+
98
+
99
+--
100
+-- Name: pod_group_group_id_seq; Type: SEQUENCE; Schema: public; Owner: pod_intranet
101
+--
102
+
103
+CREATE SEQUENCE pod_group_group_id_seq
104
+    START WITH 1
105
+    INCREMENT BY 1
106
+    NO MINVALUE
107
+    NO MAXVALUE
108
+    CACHE 1;
109
+
110
+
111
+--
112
+-- Name: pod_group_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pod_intranet
113
+--
114
+
115
+ALTER SEQUENCE pod_group_group_id_seq OWNED BY pod_group.group_id;
116
+
117
+
118
+--
119
+-- Name: pod_group_node; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
120
+--
121
+
122
+CREATE TABLE pod_group_node (
123
+    group_id integer NOT NULL,
124
+    node_id integer NOT NULL,
125
+    rights integer
126
+);
127
+
128
+
129
+--
130
+-- Name: pod_group_permission; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
131
+--
132
+
133
+CREATE TABLE pod_group_permission (
134
+    group_id integer NOT NULL,
135
+    permission_id integer NOT NULL
136
+);
137
+
138
+
139
+
140
+--
141
+-- Name: pod_nodes_version_id_sequence; Type: SEQUENCE; Schema: public; Owner: pod_intranet
142
+--
143
+
144
+CREATE SEQUENCE pod_nodes_version_id_sequence
145
+    START WITH 1
146
+    INCREMENT BY 1
147
+    NO MINVALUE
148
+    NO MAXVALUE
149
+    CACHE 1;
150
+
151
+
152
+--
153
+-- Name: pod_nodes_history; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
154
+--
155
+
156
+CREATE TABLE pod_nodes_history (
157
+    node_id integer NOT NULL,
158
+    parent_id integer,
159
+    node_order integer DEFAULT 1,
160
+    node_type character varying(16) DEFAULT 'data'::character varying NOT NULL,
161
+    created_at timestamp without time zone,
162
+    updated_at timestamp without time zone,
163
+    data_label character varying(1024),
164
+    data_content text DEFAULT ''::text NOT NULL,
165
+    data_datetime timestamp without time zone,
166
+    node_status character varying(16) DEFAULT 'new'::character varying,
167
+    data_reminder_datetime timestamp without time zone,
168
+    data_file_name character varying(255),
169
+    data_file_content bytea,
170
+    data_file_mime_type character varying(255),
171
+    parent_tree_path character varying(255),
172
+    node_depth integer DEFAULT 0 NOT NULL,
173
+    owner_id integer,
174
+    version_id integer DEFAULT nextval('pod_nodes_version_id_sequence'::regclass) NOT NULL,
175
+    is_shared boolean DEFAULT false NOT NULL,
176
+    is_public boolean DEFAULT false NOT NULL,
177
+    public_url_key character varying(1024)
178
+);
179
+
180
+
181
+--
182
+-- Name: pod_nodes; Type: VIEW; Schema: public; Owner: pod_intranet
183
+--
184
+
185
+CREATE VIEW pod_nodes AS
186
+    SELECT DISTINCT ON (pod_nodes_history.node_id) pod_nodes_history.node_id, pod_nodes_history.parent_id, pod_nodes_history.node_order, pod_nodes_history.node_type, pod_nodes_history.created_at, pod_nodes_history.updated_at, pod_nodes_history.data_label, pod_nodes_history.data_content, pod_nodes_history.data_datetime, pod_nodes_history.node_status, pod_nodes_history.data_reminder_datetime, pod_nodes_history.data_file_name, pod_nodes_history.data_file_content, pod_nodes_history.data_file_mime_type, pod_nodes_history.parent_tree_path, pod_nodes_history.node_depth, pod_nodes_history.owner_id, pod_nodes_history.is_shared, pod_nodes_history.is_public, pod_nodes_history.public_url_key FROM pod_nodes_history ORDER BY pod_nodes_history.node_id, pod_nodes_history.updated_at DESC;
187
+
188
+
189
+--
190
+-- Name: pod_nodes__node_id__sequence; Type: SEQUENCE; Schema: public; Owner: pod_intranet
191
+--
192
+
193
+CREATE SEQUENCE pod_nodes__node_id__sequence
194
+    START WITH 1
195
+    INCREMENT BY 1
196
+    NO MINVALUE
197
+    NO MAXVALUE
198
+    CACHE 1;
199
+
200
+
201
+--
202
+-- Name: pod_nodes__node_id__sequence; Type: SEQUENCE OWNED BY; Schema: public; Owner: pod_intranet
203
+--
204
+
205
+ALTER SEQUENCE pod_nodes__node_id__sequence OWNED BY pod_nodes_history.node_id;
206
+
207
+
208
+--
209
+-- Name: pod_permission; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
210
+--
211
+
212
+CREATE TABLE pod_permission (
213
+    permission_id integer NOT NULL,
214
+    permission_name character varying(63) NOT NULL,
215
+    description character varying(255)
216
+);
217
+
218
+
219
+--
220
+-- Name: pod_permission_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: pod_intranet
221
+--
222
+
223
+CREATE SEQUENCE pod_permission_permission_id_seq
224
+    START WITH 1
225
+    INCREMENT BY 1
226
+    NO MINVALUE
227
+    NO MAXVALUE
228
+    CACHE 1;
229
+
230
+
231
+--
232
+-- Name: pod_permission_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pod_intranet
233
+--
234
+
235
+ALTER SEQUENCE pod_permission_permission_id_seq OWNED BY pod_permission.permission_id;
236
+
237
+
238
+--
239
+-- Name: pod_user; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
240
+--
241
+
242
+CREATE TABLE pod_user (
243
+    user_id integer NOT NULL,
244
+    email_address character varying(255) NOT NULL,
245
+    display_name character varying(255),
246
+    password character varying(128),
247
+    created timestamp without time zone
248
+);
249
+
250
+
251
+--
252
+-- Name: pod_user_group; Type: TABLE; Schema: public; Owner: pod_intranet; Tablespace: 
253
+--
254
+
255
+CREATE TABLE pod_user_group (
256
+    user_id integer NOT NULL,
257
+    group_id integer NOT NULL
258
+);
259
+
260
+
261
+--
262
+-- Name: pod_user_user_id_seq; Type: SEQUENCE; Schema: public; Owner: pod_intranet
263
+--
264
+
265
+CREATE SEQUENCE pod_user_user_id_seq
266
+    START WITH 1
267
+    INCREMENT BY 1
268
+    NO MINVALUE
269
+    NO MAXVALUE
270
+    CACHE 1;
271
+
272
+
273
+--
274
+-- Name: pod_user_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pod_intranet
275
+--
276
+
277
+ALTER SEQUENCE pod_user_user_id_seq OWNED BY pod_user.user_id;
278
+
279
+
280
+--
281
+-- Name: group_id; Type: DEFAULT; Schema: public; Owner: pod_intranet
282
+--
283
+
284
+ALTER TABLE ONLY pod_group ALTER COLUMN group_id SET DEFAULT nextval('pod_group_group_id_seq'::regclass);
285
+
286
+
287
+--
288
+-- Name: node_id; Type: DEFAULT; Schema: public; Owner: pod_intranet
289
+--
290
+
291
+ALTER TABLE ONLY pod_nodes_history ALTER COLUMN node_id SET DEFAULT nextval('pod_nodes__node_id__sequence'::regclass);
292
+
293
+
294
+--
295
+-- Name: permission_id; Type: DEFAULT; Schema: public; Owner: pod_intranet
296
+--
297
+
298
+ALTER TABLE ONLY pod_permission ALTER COLUMN permission_id SET DEFAULT nextval('pod_permission_permission_id_seq'::regclass);
299
+
300
+
301
+--
302
+-- Name: user_id; Type: DEFAULT; Schema: public; Owner: pod_intranet
303
+--
304
+
305
+ALTER TABLE ONLY pod_user ALTER COLUMN user_id SET DEFAULT nextval('pod_user_user_id_seq'::regclass);
306
+
307
+
308
+--
309
+-- Data for Name: migrate_version; Type: TABLE DATA; Schema: public; Owner: pod_intranet
310
+--
311
+
312
+COPY migrate_version (version_num) FROM stdin;
313
+\.
314
+
315
+
316
+--
317
+-- Data for Name: pod_group; Type: TABLE DATA; Schema: public; Owner: pod_intranet
318
+--
319
+
320
+COPY pod_group (group_id, group_name, display_name, created, personnal_group) FROM stdin;
321
+1	managers	Managers	\N	f
322
+3	admin	Admin	\N	f
323
+-1	user_1	\N	2014-06-11 10:55:36.163634	t
324
+2	user	All Users	\N	f
325
+\.
326
+
327
+
328
+--
329
+-- Name: pod_group_group_id_seq; Type: SEQUENCE SET; Schema: public; Owner: pod_intranet
330
+--
331
+
332
+SELECT pg_catalog.setval('pod_group_group_id_seq', 1, false);
333
+
334
+
335
+--
336
+-- Data for Name: pod_group_permission; Type: TABLE DATA; Schema: public; Owner: pod_intranet
337
+--
338
+
339
+COPY pod_group_permission (group_id, permission_id) FROM stdin;
340
+\.
341
+
342
+--
343
+-- Name: pod_nodes__node_id__sequence; Type: SEQUENCE SET; Schema: public; Owner: pod_intranet
344
+--
345
+
346
+SELECT pg_catalog.setval('pod_nodes__node_id__sequence', 25, true);
347
+
348
+--
349
+-- Name: pod_nodes_version_id_sequence; Type: SEQUENCE SET; Schema: public; Owner: pod_intranet
350
+--
351
+
352
+SELECT pg_catalog.setval('pod_nodes_version_id_sequence', 41, true);
353
+
354
+
355
+--
356
+-- Data for Name: pod_permission; Type: TABLE DATA; Schema: public; Owner: pod_intranet
357
+--
358
+
359
+COPY pod_permission (permission_id, permission_name, description) FROM stdin;
360
+\.
361
+
362
+
363
+--
364
+-- Name: pod_permission_permission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: pod_intranet
365
+--
366
+
367
+SELECT pg_catalog.setval('pod_permission_permission_id_seq', 1, false);
368
+
369
+
370
+--
371
+-- Data for Name: pod_user; Type: TABLE DATA; Schema: public; Owner: pod_intranet
372
+--
373
+
374
+COPY pod_user (user_id, email_address, display_name, password, created) FROM stdin;
375
+1	admin@localhost	Admin	b0c2243d8052ebc30e446d557b3249ed143e0ba6922ec49d9c53f3c1a533ae25b5dc4ec00d6cc3dd9fc9c74107e9914b3ace56ba8ded846bda9c140c0d6f721e	2014-06-11 10:55:36.15707
376
+\.
377
+
378
+
379
+--
380
+-- Data for Name: pod_user_group; Type: TABLE DATA; Schema: public; Owner: pod_intranet
381
+--
382
+
383
+COPY pod_user_group (user_id, group_id) FROM stdin;
384
+1	2
385
+1	-1
386
+\.
387
+
388
+
389
+--
390
+-- Name: pod_user_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: pod_intranet
391
+--
392
+
393
+SELECT pg_catalog.setval('pod_user_user_id_seq', 1, true);
394
+
395
+
396
+--
397
+-- Name: pod_group_group_name_key; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
398
+--
399
+
400
+ALTER TABLE ONLY pod_group
401
+    ADD CONSTRAINT pod_group_group_name_key UNIQUE (group_name);
402
+
403
+
404
+--
405
+-- Name: pod_group_node_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
406
+--
407
+
408
+ALTER TABLE ONLY pod_group_node
409
+    ADD CONSTRAINT pod_group_node_pkey PRIMARY KEY (group_id, node_id);
410
+
411
+
412
+--
413
+-- Name: pod_group_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
414
+--
415
+
416
+ALTER TABLE ONLY pod_group_permission
417
+    ADD CONSTRAINT pod_group_permission_pkey PRIMARY KEY (group_id, permission_id);
418
+
419
+
420
+--
421
+-- Name: pod_group_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
422
+--
423
+
424
+ALTER TABLE ONLY pod_group
425
+    ADD CONSTRAINT pod_group_pkey PRIMARY KEY (group_id);
426
+
427
+
428
+--
429
+-- Name: pod_nodes_history_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
430
+--
431
+
432
+ALTER TABLE ONLY pod_nodes_history
433
+    ADD CONSTRAINT pod_nodes_history_pkey PRIMARY KEY (version_id);
434
+
435
+
436
+--
437
+-- Name: pod_permission_permission_name_key; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
438
+--
439
+
440
+ALTER TABLE ONLY pod_permission
441
+    ADD CONSTRAINT pod_permission_permission_name_key UNIQUE (permission_name);
442
+
443
+
444
+--
445
+-- Name: pod_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
446
+--
447
+
448
+ALTER TABLE ONLY pod_permission
449
+    ADD CONSTRAINT pod_permission_pkey PRIMARY KEY (permission_id);
450
+
451
+
452
+--
453
+-- Name: pod_user_email_address_key; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
454
+--
455
+
456
+ALTER TABLE ONLY pod_user
457
+    ADD CONSTRAINT pod_user_email_address_key UNIQUE (email_address);
458
+
459
+
460
+--
461
+-- Name: pod_user_group_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
462
+--
463
+
464
+ALTER TABLE ONLY pod_user_group
465
+    ADD CONSTRAINT pod_user_group_pkey PRIMARY KEY (user_id, group_id);
466
+
467
+
468
+--
469
+-- Name: pod_user_pkey; Type: CONSTRAINT; Schema: public; Owner: pod_intranet; Tablespace: 
470
+--
471
+
472
+ALTER TABLE ONLY pod_user
473
+    ADD CONSTRAINT pod_user_pkey PRIMARY KEY (user_id);
474
+
475
+
476
+--
477
+-- Name: fki_pod_nodes__owner_id_fk; Type: INDEX; Schema: public; Owner: pod_intranet; Tablespace: 
478
+--
479
+
480
+CREATE INDEX fki_pod_nodes__owner_id_fk ON pod_nodes_history USING btree (owner_id);
481
+
482
+
483
+--
484
+-- Name: fki_pod_nodes__parent_id_fk; Type: INDEX; Schema: public; Owner: pod_intranet; Tablespace: 
485
+--
486
+
487
+CREATE INDEX fki_pod_nodes__parent_id_fk ON pod_nodes_history USING btree (parent_id);
488
+
489
+
490
+--
491
+-- Name: idx_pod_nodes__parent_tree_path; Type: INDEX; Schema: public; Owner: pod_intranet; Tablespace: 
492
+--
493
+
494
+CREATE INDEX idx_pod_nodes__parent_tree_path ON pod_nodes_history USING btree (parent_tree_path);
495
+
496
+
497
+--
498
+-- Name: pod_insert_new_node; Type: RULE; Schema: public; Owner: pod_intranet
499
+--
500
+
501
+CREATE RULE pod_insert_new_node AS ON INSERT TO pod_nodes DO INSTEAD INSERT INTO pod_nodes_history (node_id, parent_id, node_order, node_type, created_at, updated_at, data_label, data_content, data_datetime, node_status, data_reminder_datetime, data_file_name, data_file_content, data_file_mime_type, parent_tree_path, node_depth, owner_id, version_id, is_shared, is_public, public_url_key) VALUES (nextval('pod_nodes__node_id__sequence'::regclass), new.parent_id, new.node_order, new.node_type, new.created_at, new.updated_at, new.data_label, new.data_content, new.data_datetime, new.node_status, new.data_reminder_datetime, new.data_file_name, new.data_file_content, new.data_file_mime_type, new.parent_tree_path, new.node_depth, new.owner_id, nextval('pod_nodes_version_id_sequence'::regclass), new.is_shared, new.is_public, new.public_url_key) RETURNING pod_nodes_history.node_id, pod_nodes_history.parent_id, pod_nodes_history.node_order, pod_nodes_history.node_type, pod_nodes_history.created_at, pod_nodes_history.updated_at, pod_nodes_history.data_label, pod_nodes_history.data_content, pod_nodes_history.data_datetime, pod_nodes_history.node_status, pod_nodes_history.data_reminder_datetime, pod_nodes_history.data_file_name, pod_nodes_history.data_file_content, pod_nodes_history.data_file_mime_type, pod_nodes_history.parent_tree_path, pod_nodes_history.node_depth, pod_nodes_history.owner_id, pod_nodes_history.is_shared, pod_nodes_history.is_public, pod_nodes_history.public_url_key;
502
+
503
+
504
+--
505
+-- Name: pod_nodes__on_insert_set_created_at; Type: TRIGGER; Schema: public; Owner: pod_intranet
506
+--
507
+
508
+CREATE TRIGGER pod_nodes__on_insert_set_created_at BEFORE INSERT ON pod_nodes_history FOR EACH ROW EXECUTE PROCEDURE set_created_at();
509
+
510
+
511
+--
512
+-- Name: pod_nodes__on_update_set_updated_at; Type: TRIGGER; Schema: public; Owner: pod_intranet
513
+--
514
+
515
+CREATE TRIGGER pod_nodes__on_update_set_updated_at BEFORE UPDATE ON pod_nodes_history FOR EACH ROW EXECUTE PROCEDURE set_updated_at();
516
+
517
+
518
+--
519
+-- Name: pod_update_node_tg; Type: TRIGGER; Schema: public; Owner: pod_intranet
520
+--
521
+
522
+CREATE TRIGGER pod_update_node_tg INSTEAD OF UPDATE ON pod_nodes FOR EACH ROW EXECUTE PROCEDURE pod_update_node();
523
+
524
+
525
+--
526
+-- Name: pod_group_node_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pod_intranet
527
+--
528
+
529
+ALTER TABLE ONLY pod_group_node
530
+    ADD CONSTRAINT pod_group_node_group_id_fkey FOREIGN KEY (group_id) REFERENCES pod_group(group_id) ON UPDATE CASCADE ON DELETE CASCADE;
531
+
532
+
533
+--
534
+-- Name: pod_group_permission_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pod_intranet
535
+--
536
+
537
+ALTER TABLE ONLY pod_group_permission
538
+    ADD CONSTRAINT pod_group_permission_group_id_fkey FOREIGN KEY (group_id) REFERENCES pod_group(group_id) ON UPDATE CASCADE ON DELETE CASCADE;
539
+
540
+
541
+--
542
+-- Name: pod_group_permission_permission_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pod_intranet
543
+--
544
+
545
+ALTER TABLE ONLY pod_group_permission
546
+    ADD CONSTRAINT pod_group_permission_permission_id_fkey FOREIGN KEY (permission_id) REFERENCES pod_permission(permission_id) ON UPDATE CASCADE ON DELETE CASCADE;
547
+
548
+
549
+--
550
+-- Name: pod_nodes__owner_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: pod_intranet
551
+--
552
+
553
+ALTER TABLE ONLY pod_nodes_history
554
+    ADD CONSTRAINT pod_nodes__owner_id_fk FOREIGN KEY (owner_id) REFERENCES pod_user(user_id);
555
+
556
+
557
+--
558
+-- Name: pod_user_group_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pod_intranet
559
+--
560
+
561
+ALTER TABLE ONLY pod_user_group
562
+    ADD CONSTRAINT pod_user_group_group_id_fkey FOREIGN KEY (group_id) REFERENCES pod_group(group_id) ON UPDATE CASCADE ON DELETE CASCADE;
563
+
564
+
565
+--
566
+-- Name: pod_user_group_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: pod_intranet
567
+--
568
+
569
+ALTER TABLE ONLY pod_user_group
570
+    ADD CONSTRAINT pod_user_group_user_id_fkey FOREIGN KEY (user_id) REFERENCES pod_user(user_id) ON UPDATE CASCADE ON DELETE CASCADE;
571
+

+ 0 - 274
doc/database/pod-schema-2013.11.15-15.54.45.sql View File

@@ -1,275 +0,0 @@
1
---
2
---
3
-
4
-SET statement_timeout = 0;
5
-SET client_encoding = 'UTF8';
6
-SET standard_conforming_strings = on;
7
-SET check_function_bodies = false;
8
-SET client_min_messages = warning;
9
-
10
-CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
11
-COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
12
-
13
-
14
-SET search_path = public, pg_catalog;
15
-
16
-CREATE FUNCTION set_created_at() RETURNS trigger
17
-    LANGUAGE plpgsql
18
-    AS $$
19
-BEGIN
20
-    NEW.created_at = CURRENT_TIMESTAMP;
21
-    NEW.updated_at = CURRENT_TIMESTAMP;
22
-    RETURN NEW;
23
-END;
24
-$$;
25
-
26
-
27
-ALTER FUNCTION public.set_created_at() OWNER TO pod_master;
28
-
29
-CREATE FUNCTION set_updated_at() RETURNS trigger
30
-    LANGUAGE plpgsql
31
-    AS $$
32
-BEGIN
33
-    NEW.updated_at = CURRENT_TIMESTAMP;
34
-    RETURN NEW;
35
-END;
36
-$$;
37
-
38
-
39
-ALTER FUNCTION public.set_updated_at() OWNER TO pod_master;
40
-
41
-SET default_tablespace = '';
42
-
43
-SET default_with_oids = false;
44
-
45
-CREATE TABLE migrate_version (
46
-    version_num character varying(32) NOT NULL
47
-);
48
-
49
-ALTER TABLE public.migrate_version OWNER TO pod_master;
50
-
51
-CREATE TABLE pod_node_status (
52
-    status_type character varying(16) NOT NULL,
53
-    status_id character varying(16) NOT NULL,
54
-    status_label character varying(256),
55
-    hexa_color_foreground character(7),
56
-    hexa_color_background character(7)
57
-);
58
-
59
-ALTER TABLE public.pod_node_status OWNER TO pod_master;
60
-
61
-CREATE TABLE pod_nodes (
62
-    node_id integer NOT NULL,
63
-    parent_id integer,
64
-    node_order integer DEFAULT 1,
65
-    node_type character varying(16) DEFAULT 'data'::character varying NOT NULL,
66
-    created_at timestamp without time zone,
67
-    updated_at timestamp without time zone,
68
-    data_label character varying(1024),
69
-    data_content text DEFAULT ''::text NOT NULL,
70
-    data_datetime timestamp without time zone,
71
-    node_status character varying(16) DEFAULT 'new'::character varying,
72
-    data_reminder_datetime timestamp without time zone,
73
-    data_file_name character varying(255),
74
-    data_file_content bytea,
75
-    data_file_mime_type character varying(255),
76
-    parent_tree_path character varying(255),
77
-    node_depth integer DEFAULT 0 NOT NULL,
78
-    owner_id integer
79
-);
80
-
81
-
82
-ALTER TABLE public.pod_nodes OWNER TO pod_master;
83
-
84
-CREATE SEQUENCE pod_nodes__node_id__sequence
85
-    START WITH 1
86
-    INCREMENT BY 1
87
-    NO MINVALUE
88
-    NO MAXVALUE
89
-    CACHE 1;
90
-
91
-
92
-ALTER TABLE public.pod_nodes__node_id__sequence OWNER TO pod_master;
93
-
94
-ALTER SEQUENCE pod_nodes__node_id__sequence OWNED BY pod_nodes.node_id;
95
-
96
-
97
-CREATE TABLE pod_group (
98
-    group_id integer NOT NULL,
99
-    group_name character varying(16) NOT NULL,
100
-    display_name character varying(255),
101
-    created timestamp without time zone
102
-);
103
-
104
-
105
-ALTER TABLE public.pod_group OWNER TO pod_master;
106
-
107
-CREATE SEQUENCE pod_group_group_id_seq
108
-    START WITH 1
109
-    INCREMENT BY 1
110
-    NO MINVALUE
111
-    NO MAXVALUE
112
-    CACHE 1;
113
-
114
-
115
-ALTER TABLE public.pod_group_group_id_seq OWNER TO pod_master;
116
-
117
-ALTER SEQUENCE pod_group_group_id_seq OWNED BY pod_group.group_id;
118
-
119
-
120
-CREATE TABLE pod_group_permission (
121
-    group_id integer NOT NULL,
122
-    permission_id integer NOT NULL
123
-);
124
-
125
-
126
-ALTER TABLE public.pod_group_permission OWNER TO pod_master;
127
-
128
-CREATE TABLE pod_permission (
129
-    permission_id integer NOT NULL,
130
-    permission_name character varying(63) NOT NULL,
131
-    description character varying(255)
132
-);
133
-
134
-
135
-ALTER TABLE public.pod_permission OWNER TO pod_master;
136
-
137
-CREATE SEQUENCE pod_permission_permission_id_seq
138
-    START WITH 1
139
-    INCREMENT BY 1
140
-    NO MINVALUE
141
-    NO MAXVALUE
142
-    CACHE 1;
143
-
144
-
145
-ALTER TABLE public.pod_permission_permission_id_seq OWNER TO pod_master;
146
-
147
-ALTER SEQUENCE pod_permission_permission_id_seq OWNED BY pod_permission.permission_id;
148
-
149
-
150
-CREATE TABLE pod_user (
151
-    user_id integer NOT NULL,
152
-    email_address character varying(255) NOT NULL,
153
-    display_name character varying(255),
154
-    password character varying(128),
155
-    created timestamp without time zone
156
-);
157
-
158
-
159
-ALTER TABLE public.pod_user OWNER TO pod_master;
160
-
161
-CREATE TABLE pod_user_group (
162
-    user_id integer NOT NULL,
163
-    group_id integer NOT NULL
164
-);
165
-
166
-
167
-ALTER TABLE public.pod_user_group OWNER TO pod_master;
168
-
169
-CREATE SEQUENCE pod_user_user_id_seq
170
-    START WITH 1
171
-    INCREMENT BY 1
172
-    NO MINVALUE
173
-    NO MAXVALUE
174
-    CACHE 1;
175
-
176
-
177
-ALTER TABLE public.pod_user_user_id_seq OWNER TO pod_master;
178
-
179
-ALTER SEQUENCE pod_user_user_id_seq OWNED BY pod_user.user_id;
180
-
181
-
182
-ALTER TABLE ONLY pod_nodes ALTER COLUMN node_id SET DEFAULT nextval('pod_nodes__node_id__sequence'::regclass);
183
-
184
-ALTER TABLE ONLY pod_group ALTER COLUMN group_id SET DEFAULT nextval('pod_group_group_id_seq'::regclass);
185
-
186
-
187
-ALTER TABLE ONLY pod_permission ALTER COLUMN permission_id SET DEFAULT nextval('pod_permission_permission_id_seq'::regclass);
188
-
189
-
190
-ALTER TABLE ONLY pod_user ALTER COLUMN user_id SET DEFAULT nextval('pod_user_user_id_seq'::regclass);
191
-
192
-ALTER TABLE ONLY pod_node_status
193
-    ADD CONSTRAINT pod_node_status__pk PRIMARY KEY (status_id);
194
-
195
-ALTER TABLE ONLY pod_nodes
196
-    ADD CONSTRAINT pod_nodes_pk PRIMARY KEY (node_id);
197
-
198
-
199
-ALTER TABLE ONLY pod_group
200
-    ADD CONSTRAINT pod_group_group_name_key UNIQUE (group_name);
201
-
202
-
203
-ALTER TABLE ONLY pod_group_permission
204
-    ADD CONSTRAINT pod_group_permission_pkey PRIMARY KEY (group_id, permission_id);
205
-
206
-
207
-ALTER TABLE ONLY pod_group
208
-    ADD CONSTRAINT pod_group_pkey PRIMARY KEY (group_id);
209
-
210
-
211
-ALTER TABLE ONLY pod_permission
212
-    ADD CONSTRAINT pod_permission_permission_name_key UNIQUE (permission_name);
213
-
214
-
215
-ALTER TABLE ONLY pod_permission
216
-    ADD CONSTRAINT pod_permission_pkey PRIMARY KEY (permission_id);
217
-
218
-
219
-ALTER TABLE ONLY pod_user
220
-    ADD CONSTRAINT pod_user_email_address_key UNIQUE (email_address);
221
-
222
-
223
-ALTER TABLE ONLY pod_user_group
224
-    ADD CONSTRAINT pod_user_group_pkey PRIMARY KEY (user_id, group_id);
225
-
226
-
227
-ALTER TABLE ONLY pod_user
228
-    ADD CONSTRAINT pod_user_pkey PRIMARY KEY (user_id);
229
-
230
-
231
-CREATE INDEX fki_pod_nodes__owner_id_fk ON pod_nodes USING btree (owner_id);
232
-
233
-
234
-CREATE INDEX fki_pod_nodes__parent_id_fk ON pod_nodes USING btree (parent_id);
235
-
236
-
237
-CREATE INDEX idx_pod_nodes__parent_tree_path ON pod_nodes USING btree (parent_tree_path);
238
-
239
-
240
-CREATE TRIGGER pod_nodes__on_insert_set_created_at BEFORE INSERT ON pod_nodes FOR EACH ROW EXECUTE PROCEDURE set_created_at();
241
-
242
-
243
-CREATE TRIGGER pod_nodes__on_update_set_updated_at BEFORE UPDATE ON pod_nodes FOR EACH ROW EXECUTE PROCEDURE set_updated_at();
244
-
245
-
246
-ALTER TABLE ONLY pod_nodes
247
-    ADD CONSTRAINT pod_nodes__owner_id_fk FOREIGN KEY (owner_id) REFERENCES pod_user(user_id);
248
-
249
-
250
-ALTER TABLE ONLY pod_nodes
251
-    ADD CONSTRAINT pod_nodes__parent_id_fk FOREIGN KEY (parent_id) REFERENCES pod_nodes(node_id);
252
-
253
-
254
-ALTER TABLE ONLY pod_group_permission
255
-    ADD CONSTRAINT pod_group_permission_group_id_fkey FOREIGN KEY (group_id) REFERENCES pod_group(group_id) ON UPDATE CASCADE ON DELETE CASCADE;
256
-
257
-
258
-ALTER TABLE ONLY pod_group_permission
259
-    ADD CONSTRAINT pod_group_permission_permission_id_fkey FOREIGN KEY (permission_id) REFERENCES pod_permission(permission_id) ON UPDATE CASCADE ON DELETE CASCADE;
260
-
261
-
262
-ALTER TABLE ONLY pod_user_group
263
-    ADD CONSTRAINT pod_user_group_group_id_fkey FOREIGN KEY (group_id) REFERENCES pod_group(group_id) ON UPDATE CASCADE ON DELETE CASCADE;
264
-
265
-
266
-ALTER TABLE ONLY pod_user_group
267
-    ADD CONSTRAINT pod_user_group_user_id_fkey FOREIGN KEY (user_id) REFERENCES pod_user(user_id) ON UPDATE CASCADE ON DELETE CASCADE;
268
-
269
-
270
-REVOKE ALL ON SCHEMA public FROM PUBLIC;
271
-REVOKE ALL ON SCHEMA public FROM postgres;
272
-GRANT ALL ON SCHEMA public TO postgres;
273
-GRANT ALL ON SCHEMA public TO PUBLIC;
274
-

+ 0 - 9
doc/database/pod-upgrade-0.1.0_to_0.2.0.sql View File

@@ -1,10 +0,0 @@
1
-
2
---
3
---
4
-UPDATE pod_nodes SET node_status='information' WHERE node_status='immortal';
5
-UPDATE pod_nodes SET node_status='inprogress' WHERE node_status='actiontodo';
6
-UPDATE pod_nodes SET node_status='inprogress' WHERE node_status='hot';
7
-UPDATE pod_nodes SET node_status='actiontodo' WHERE node_status='actiontodo';
8
-UPDATE pod_nodes SET node_status='closed' WHERE node_status='archived';
9
-

+ 0 - 37
doc/database/pod-upgrade-0.2.0_to_0.3.0.sql View File

@@ -1,42 +0,0 @@
1
-ALTER TABLE pod_nodes RENAME TO pod_nodes_history;
2
-
3
-CREATE SEQUENCE pod_nodes_version_id_sequence;
4
-ALTER TABLE pod_nodes_history
5
-    DROP CONSTRAINT pod_nodes_pk CASCADE,
6
-    ADD COLUMN version_id INTEGER PRIMARY KEY DEFAULT nextval('pod_nodes_version_id_sequence');
7
-
8
-CREATE OR REPLACE VIEW pod_nodes AS
9
-    SELECT DISTINCT ON (node_id) node_id, parent_id, node_order, node_type, created_at, updated_at, 
10
-        data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
11
-        data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
12
-        node_depth, owner_id
13
-    FROM pod_nodes_history
14
-    ORDER BY node_id, updated_at DESC;
15
-
16
-CREATE OR REPLACE RULE pod_insert_new_node AS ON INSERT
17
-TO pod_nodes
18
-DO INSTEAD INSERT INTO pod_nodes_history (node_id, parent_id, node_order, node_type, created_at, updated_at, 
19
-       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
20
-       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
21
-       node_depth, owner_id, version_id) VALUES (nextval('pod_nodes__node_id__sequence'), NEW.parent_id, NEW.node_order, NEW.node_type, NEW.created_at, NEW.updated_at, NEW.data_label, NEW.data_content, NEW.data_datetime, NEW.node_status, NEW.data_reminder_datetime, NEW.data_file_name, NEW.data_file_content, NEW.data_file_mime_type, NEW.parent_tree_path, NEW.node_depth, NEW.owner_id, nextval('pod_nodes_version_id_sequence'))
22
-RETURNING node_id, parent_id, node_order, node_type, created_at, updated_at, 
23
-       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
24
-       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
25
-       node_depth, owner_id;
26
-
27
-CREATE OR REPLACE FUNCTION pod_update_node() RETURNS trigger AS $$
28
-BEGIN
29
-INSERT INTO pod_nodes_history (node_id, parent_id, node_order, node_type, created_at, updated_at, 
30
-       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
31
-       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
32
-       node_depth, owner_id, version_id) VALUES (NEW.node_id, NEW.parent_id, NEW.node_order, NEW.node_type, NEW.created_at, NEW.updated_at, NEW.data_label, NEW.data_content, NEW.data_datetime, NEW.node_status, NEW.data_reminder_datetime, NEW.data_file_name, NEW.data_file_content, NEW.data_file_mime_type, NEW.parent_tree_path, NEW.node_depth, NEW.owner_id, nextval('pod_nodes_version_id_sequence'));
33
-return new;
34
-END;
35
-$$ LANGUAGE plpgsql;
36
-
37
-CREATE TRIGGER pod_update_node_tg INSTEAD OF UPDATE ON pod_nodes FOR EACH ROW EXECUTE PROCEDURE pod_update_node();

+ 0 - 34
doc/database/pod-upgrade-0.3.0_to_0.4.0.sql View File

@@ -1,35 +0,0 @@
1
-ALTER TABLE pod_nodes_history ADD COLUMN is_shared boolean NOT NULL DEFAULT False;
2
-ALTER TABLE pod_nodes_history ADD COLUMN is_public boolean NOT NULL DEFAULT False;
3
-ALTER TABLE pod_nodes_history ADD COLUMN public_url_key character varying(1024);
4
-
5
-CREATE OR REPLACE VIEW pod_nodes AS
6
-    SELECT DISTINCT ON (node_id) node_id, parent_id, node_order, node_type, created_at, updated_at, 
7
-        data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
8
-        data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
9
-        node_depth, owner_id, is_shared, is_public, public_url_key
10
-    FROM pod_nodes_history
11
-    ORDER BY node_id, updated_at DESC;
12
-
13
-CREATE OR REPLACE RULE pod_insert_new_node AS ON INSERT
14
-TO pod_nodes
15
-DO INSTEAD INSERT INTO pod_nodes_history (node_id, parent_id, node_order, node_type, created_at, updated_at, 
16
-       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
17
-       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
18
-       node_depth, owner_id, version_id, is_shared, is_public, public_url_key) VALUES (nextval('pod_nodes__node_id__sequence'), NEW.parent_id, NEW.node_order, NEW.node_type, NEW.created_at, NEW.updated_at, NEW.data_label, NEW.data_content, NEW.data_datetime, NEW.node_status, NEW.data_reminder_datetime, NEW.data_file_name, NEW.data_file_content, NEW.data_file_mime_type, NEW.parent_tree_path, NEW.node_depth, NEW.owner_id, nextval('pod_nodes_version_id_sequence'), NEW.is_shared, NEW.is_public, NEW.public_url_key)
19
-RETURNING node_id, parent_id, node_order, node_type, created_at, updated_at, 
20
-       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
21
-       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
22
-       node_depth, owner_id, is_shared, is_public, public_url_key;
23
-
24
-CREATE OR REPLACE FUNCTION pod_update_node() RETURNS trigger AS $$
25
-BEGIN
26
-INSERT INTO pod_nodes_history (node_id, parent_id, node_order, node_type, created_at, updated_at, 
27
-       data_label, data_content, data_datetime, node_status, data_reminder_datetime, 
28
-       data_file_name, data_file_content, data_file_mime_type, parent_tree_path, 
29
-       node_depth, owner_id, version_id, is_shared, is_public, public_url_key) VALUES (NEW.node_id, NEW.parent_id, NEW.node_order, NEW.node_type, NEW.created_at, NEW.updated_at, NEW.data_label, NEW.data_content, NEW.data_datetime, NEW.node_status, NEW.data_reminder_datetime, NEW.data_file_name, NEW.data_file_content, NEW.data_file_mime_type, NEW.parent_tree_path, NEW.node_depth, NEW.owner_id, nextval('pod_nodes_version_id_sequence'), NEW.is_shared, NEW.is_public, NEW.public_url_key);
30
-return new;
31
-END;
32
-$$ LANGUAGE plpgsql;
33
-
34
-CREATE TRIGGER pod_update_node_tg INSTEAD OF UPDATE ON pod_nodes FOR EACH ROW EXECUTE PROCEDURE pod_update_node();

+ 0 - 11
doc/database/pod-upgrade-0.4.0_to_0.5.0.sql View File

@@ -1,11 +0,0 @@
1
-ALTER TABLE pod_group ADD COLUMN personnal_group BOOLEAN;
2
-
3
-CREATE TABLE pod_group_node (
4
-    group_id INTEGER NOT NULL,
5
-    node_id INTEGER NOT NULL,
6
-    rights INTEGER,
7
-    CONSTRAINT pod_group_node_pkey PRIMARY KEY (group_id, node_id),
8
-    CONSTRAINT pod_group_node_group_id_fkey FOREIGN KEY (group_id)
9
-    REFERENCES pod_group (group_id) MATCH SIMPLE
10
-    ON UPDATE CASCADE ON DELETE CASCADE
11
-);

+ 39 - 0
install/requirements.txt View File

@@ -0,0 +1,39 @@
1
+Beaker==1.6.4
2
+FormEncode==1.3.0a1
3
+Genshi==0.7
4
+Mako==1.0.0
5
+MarkupSafe==0.15
6
+PasteDeploy==1.5.2
7
+Pillow==2.4.0
8
+SQLAlchemy==0.9.4
9
+Tempita==0.5.3dev
10
+TurboGears2==2.3.2
11
+WebOb==1.4
12
+WebTest==1.4.3
13
+alembic==0.6.5
14
+backlash==0.0.5
15
+beautifulsoup4==4.3.2
16
+cliff==1.6.1
17
+cmd2==0.6.7
18
+crank==0.7.1
19
+decorator==3.4.0
20
+distribute==0.6.24
21
+gearbox==0.0.6
22
+prettytable==0.7.2
23
+psycopg2==2.5.3
24
+pyparsing==2.0.2
25
+repoze.lru==0.6
26
+repoze.who==2.2
27
+six==1.7.2
28
+speaklater==1.3
29
+sprox==0.9.3
30
+stevedore==0.15
31
+tg.devtools==2.3.2
32
+tgext.admin==0.6.4
33
+tgext.crud==0.7.2
34
+transaction==1.4.3
35
+tw2.core==2.2.1.1
36
+tw2.forms==2.2.0.3
37
+wsgiref==0.1.2
38
+zope.interface==4.1.1
39
+zope.sqlalchemy==0.7.4

+ 0 - 4
pboard/MANIFEST.in View File

@@ -1,4 +0,0 @@
1
-recursive-include pboard/public *
2
-include pboard/public/favicon.ico
3
-recursive-include pboard/i18n *
4
-recursive-include pboard/templates *

+ 0 - 2
pboard/pboard/__init__.py View File

@@ -1,2 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-"""The pboard package"""

+ 0 - 2
pboard/pboard/controllers/__init__.py View File

@@ -1,2 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-"""Controllers for the pboard application."""

+ 0 - 573
pboard/pboard/templates/document-widgets-tabs.mak View File

@@ -1,573 +0,0 @@
1
-<%inherit file="local:templates.master"/>
2
-<%namespace name="POD" file="pboard.templates.pod"/>
3
-<%namespace name="DOC" file="pboard.templates.document-widgets"/>
4
-
5
-<%def name="HistoryTabContent(poNode)">
6
-  <h4>${_('Revisions')}</h4>
7
-  <ul>
8
-  % for version in poNode.getHistory():
9
-  	<li><a href="${tg.url('/document/%i/%i#tab-history'%(version.node_id, version.version_id))}">${version.created_at.strftime("%a %x %X")}</a></li>
10
-  % endfor
11
-  </ul>
12
-</%def>
13
-
14
-<%def name="AccessManagementTab(poNode, user_rights, user)">
15
-  ######
16
-  ##
17
-  ## THIS WIDGET IS INTENDED TO BE USED ONE TIME ONLY IN A PAGE
18
-  ##
19
-  <h4>${_('Share options')}</h4> 
20
-  <p>
21
-    % if poNode.is_shared==False:
22
-      <span class="pod-grey">${_('This document is not shared')}</span>
23
-    % else:
24
-      <span class="">${_('This document is shared.')}</span>
25
-    % endif
26
-  </p>
27
-  <p>
28
-    % if poNode.is_shared==True:
29
-    <table class="table table-striped table-hover table-condensed">
30
-      <thead>
31
-        <tr>
32
-          <th><i class="fa fa-group"></i> ${_('Groups')}</th>
33
-          <th></th>
34
-        </tr>
35
-      </thead>
36
-      % for loGroupRightsOnNode in real_group_rights:
37
-        % if loGroupRightsOnNode.hasSomeAccess():
38
-          <tr>
39
-            <td>${loGroupRightsOnNode.display_name}</td>
40
-            <td>
41
-              % if loGroupRightsOnNode.hasReadAccess():
42
-                <span class="label label-success">R</span>
43
-              % endif
44
-              % if loGroupRightsOnNode.hasWriteAccess():
45
-                <span class="label label-warning">W</span>
46
-              % endif
47
-            </td>
48
-          </tr>
49
-        % endif
50
-      % endfor
51
-      <thead>
52
-        <tr>
53
-          <th><i class="fa fa-user"></i> ${_('Individual users')}</th>
54
-          <th></th>
55
-        </tr>
56
-      </thead>
57
-      % for loGroupRightsOnNode in user_specific_group_rights:
58
-        % if loGroupRightsOnNode.hasSomeAccess():
59
-          <tr>
60
-            <td>${loGroupRightsOnNode.display_name}</td>
61
-            <td>
62
-              % if loGroupRightsOnNode.hasReadAccess():
63
-                <span class="label label-success">R</span>
64
-              % endif
65
-              % if loGroupRightsOnNode.hasWriteAccess():
66
-                <span class="label label-warning">W</span>
67
-              % endif
68
-            </td>
69
-          </tr>
70
-        % endif
71
-      % endfor
72
-    </table>
73
-    
74
-    % endif
75
-  <p>
76
-
77
-######
78
-##
79
-## 2014-05-06 - D.A. We do not share documents on internet yet.
80
-##
81
-##  <p>
82
-##    % if poNode.is_public==False:
83
-##      ${_('This document is not shared on internet')|n}
84
-##    % else:
85
-##      ${_('This document is <span class="label label-warning"><i class="fa fa-globe"></i><span>shared</span></span> on internet')|n}.
86
-##      ${_('The associated url is:')} <a href="FIXME">${poNode.public_url_key}</a>
87
-##    % endif
88
-##  </p>
89
-  <!-- Button to trigger modal -->
90
-% if user.user_id==poNode.owner_id or (user_rights and user_rights.hasWriteAccess()):
91
-  <a href="#edit-document-share-properties" role="button" class="btn btn-success" data-toggle="modal">
92
-    <i class="fa fa-edit"></i>
93
-    ${_('Edit share options')}
94
-  </a>
95
-% endif
96
-
97
-  <!-- Modal -->
98
-  <div
99
-    id="edit-document-share-properties"
100
-    class="modal hide"
101
-    tabindex="-1"
102
-    role="dialog"
103
-    aria-labelledby="myModalLabel"
104
-    aria-hidden="true">
105
-    
106
-    <div class="modal-header">
107
-      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
108
-      <h3 id="myModalLabel">Document sharing options</h3>
109
-    </div>
110
-    <div class="modal-body">
111
-
112
-      <form id='document-share-form' method="GET" action="${tg.url('/api/set_access_management')}">
113
-        <input type="hidden" name="node_id" value="${poNode.node_id}" />
114
-        <input type="hidden" name="read" value="0" />
115
-        <input type="hidden" name="write" value="0" />
116
-        <fieldset>
117
-          <label class="checkbox">
118
-            <input name="is_shared" type="checkbox" id="document-share-selector" ${('', 'checked')[poNode.is_shared]}/>
119
-            ${_('Share document with collaborators.')}
120
-          </label>
121
-          <div id="document-share-people-selector">
122
-            <p>${_('Select read and write access for each group or people...')}</p>
123
-            <script>
124
-            function updateRights(psUserId, piNewValue) {
125
-              if (typeof piNewValue === 'undefined') { piNewValue = -1; }
126
-              var ACCESS_UNDEFINED = -1;
127
-              var ACCESS_NONE = 0;
128
-              var ACCESS_READ = 1;
129
-              var ACCESS_WRITE = 2;
130
-              
131
-              var nodeIdForSelectedUser = 'user-'+psUserId+'-value';
132
-              var widgetRead = $('#'+nodeIdForSelectedUser+'-read');
133
-              var widgetWrite = $('#'+nodeIdForSelectedUser+'-write');
134
-              var oldReadValue = widgetRead.val()
135
-              var oldWriteValue = widgetWrite.val();
136
-              
137
-              if(oldReadValue=='' && oldWriteValue=='' && piNewValue==ACCESS_UNDEFINED || piNewValue==ACCESS_READ) {
138
-## SET READ ACCESS
139
-                widgetRead.val(psUserId)
140
-                widgetWrite.val('')
141
-                newHtml = '<span class="label label-success" title="${'Allow to read the item'}">R</span>';
142
-              } else if(oldReadValue==psUserId && oldWriteValue=='' && piNewValue==ACCESS_UNDEFINED || piNewValue==ACCESS_READ+ACCESS_WRITE) {
143
-## SET READ + WRITE ACCESS
144
-                widgetRead.val(psUserId)
145
-                widgetWrite.val(psUserId)
146
-                newHtml = '<span class="label label-success" title="${'Allow to read the item'}">R</span> <span class="label label-warning" title="${'Allow to modify the item'}">W</span>';
147
-              } else if (oldReadValue==psUserId && oldWriteValue==psUserId && piNewValue==ACCESS_UNDEFINED || piNewValue==ACCESS_NONE) {
148
-## SET NO ACCESS
149
-                widgetRead.val('')
150
-                widgetWrite.val('')
151
-                newHtml = '';
152
-              } else {
153
-## SET READ ACCESS (default)
154
-                widgetRead.val(psUserId)
155
-                widgetWrite.val('')
156
-                newHtml = '<span class="label label-success" title="${'Allow to read the item'}">R</span>';
157
-              }
158
-              
159
-              visibleid = 'user-'+psUserId+'-rights';
160
-              $("#"+visibleid).html(newHtml);
161
-            }
162
-            </script>
163
-            
164
-            <table class="table table-striped table-hover table-condensed">
165
-    ######
166
-    ##
167
-    ## REAL GROUPS LISTING HERE
168
-    ##
169
-              <thead>
170
-                <tr>
171
-                  <th><i class="fa fa-group"></i></th>
172
-                  <th>${_('Group')}</th>
173
-                  <th>${_('Access')}</th>
174
-                </tr>
175
-              </thead>
176
-              % for loGroupRightsOnNode in real_group_rights:
177
-
178
-              <tr id='user-${loGroupRightsOnNode.group_id}-rights-row'>
179
-                <td>
180
-                  <a
181
-                    class="btn btn-mini"
182
-                    onclick="updateRights(${loGroupRightsOnNode.group_id})"
183
-                  >
184
-                    <i class="fa fa-key"></i>
185
-                  </a>
186
-                </td>
187
-                <td class='pod-highlightable-access-management-cell'>
188
-                  ${loGroupRightsOnNode.display_name}
189
-                  <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-read" name="read" value="" />
190
-                  <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-write" name="write" value="" />
191
-                </td>
192
-                <td id="user-${loGroupRightsOnNode.group_id}-rights" class="pod-right-cell"></td>
193
-              </tr>
194
-              % endfor
195
-              
196
-    ######
197
-    ##
198
-    ## INDIVIDUAL USERS LISTING HERE
199
-    ##
200
-              <thead>
201
-                <tr>
202
-                  <th><i class="fa fa-user"></i></th>
203
-                  <th>${_('Individual Users')}</th>
204
-                  <th>${_('Access')}</th>
205
-                </tr>
206
-              </thead>
207
-              % for loGroupRightsOnNode in user_specific_group_rights:
208
-              
209
-              <tr id='user-${loGroupRightsOnNode.group_id}-rights-row'>
210
-                <td>
211
-                  <a
212
-                    class="btn btn-mini"
213
-                    onclick="updateRights(${loGroupRightsOnNode.group_id})"
214
-                  >
215
-                    <i class="fa fa-key"></i>
216
-                  </a>
217
-                </td>
218
-                <td class='pod-highlightable-access-management-cell'>
219
-                  ${loGroupRightsOnNode.display_name}
220
-                  <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-read" name="read" value="" />
221
-                  <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-write" name="write" value="" />
222
-                </td>
223
-                <td id="user-${loGroupRightsOnNode.group_id}-rights" class="pod-right-cell"></td>
224
-              </tr>
225
-              % endfor
226
-            </table>
227
-          </div>
228
-        </fieldset>
229
-######
230
-##
231
-## 2014-05-06 - D.A. The documents are not yet sharable through internet
232
-##
233
-##        <fieldset>
234
-##          <label class="checkbox">
235
-##            <input name="is_public" type="checkbox" id="document-public-selector" ${('', 'checked')[poNode.is_public]}/>
236
-##            ${_('Internet shared document')}
237
-##            <i class="fa fa-globe"></i>
238
-##          </label>
239
-##          <label id="document-public-key-selector">
240
-##            ${_('Key')}
241
-##            <div class="input-append">
242
-##              <input name="url_public_key" id="document-public-key" type="text">
243
-##              <span id="document-public-key-refresh-button" class="add-on btn" title="${_('Regenerate key')}">
244
-##                <i class="fa fa-refresh"></i>
245
-##              </span>
246
-##            </div>
247
-##            <p><a id='document-public-key-url' href="">http://share.pod.com/document/azefnzeioguneriugnreiugnre</a></p>
248
-##          </label>
249
-
250
-        </fieldset>
251
-####
252
-## Button replaced by modal dialog button
253
-##        <button type="submit" class="btn btn-success">
254
-##          <i class="fa fa-check"></i>
255
-##          ${_('Save')}
256
-##        </button>
257
-      </form>
258
-    </div>
259
-    <div class="modal-footer">
260
-    <button class="btn" data-dismiss="modal" aria-hidden="true">
261
-      <i class="fa fa-ban"></i> ${_('Cancel')}
262
-    </button>
263
-    <button class="btn btn-success" id="document-share-form-submit-button">
264
-      <i class="fa fa-check"></i> ${_('Save changes')}
265
-    </button>
266
-    </div>
267
-    <script>
268
-##
269
-## 2014-05-06 - D.A. - Documents are not yet sharable through internet
270
-##
271
-##        function refreshDocumentPublicKey(psNewPublicKey) {
272
-##          var lsNewUrl = 'http://share.pod.com/document/'+psNewPublicKey;
273
-##          $('#document-public-key').val(psNewPublicKey);
274
-##          $('#document-public-key-url').attr('href', lsNewUrl);
275
-##          $('#document-public-key-url').text(lsNewUrl);
276
-##        }
277
-      
278
-      function toggleDocumentSharePeopleSelector(pbShowIt) {
279
-        if (pbShowIt) {
280
-          $('#document-share-people-selector').show();
281
-          // $('#document-share-people-selector input').removeAttr("disabled");
282
-        } else {
283
-          $('#document-share-people-selector').hide();
284
-          // $('#document-share-people-selector input').prop('disabled', 'disabled');
285
-        }
286
-      }
287
-
288
-##
289
-## 2014-05-06 - D.A. - Documents are not yet sharable through internet
290
-##
291
-##        function toggleDocumentPublicKeyGenerator(pbShowIt) {
292
-##          if (pbShowIt) {
293
-##            $('#document-public-key-selector input').removeAttr("disabled");
294
-##            $('#document-public-key-refresh-button').removeProp('disabled');
295
-##            $('#document-public-key-refresh-button').removeClass('btn-disabled');
296
-##            $('#document-public-key-selector a').show();
297
-##            $('#document-public-key-refresh-button').on("click").click(function () {
298
-##              refreshDocumentPublicKey(generateStringId()); // New random 32-char id
299
-##            });
300
-##            if($('#document-public-key-selector input').val()=='') {
301
-##              refreshDocumentPublicKey(generateStringId());
302
-##            }
303
-##          } else {
304
-##            $('#document-public-key-refresh-button').prop('disabled', true);
305
-##            $('#document-public-key-refresh-button').addClass('btn-disabled');
306
-##            $('#document-public-key-selector input').prop('disabled', 'disabled');
307
-##            $('#document-public-key-refresh-button').off("click");
308
-##            $('#document-public-key-selector a').hide();
309
-##          }
310
-##        }
311
-##
312
-##
313
-##
314
-
315
-      // Callbacks setup
316
-      $('#document-share-selector').change(function () {
317
-        var checkedValue = $('#document-share-selector').prop("checked");
318
-        toggleDocumentSharePeopleSelector(checkedValue);
319
-      });
320
-
321
-##        $('#document-public-selector').change(function () {
322
-##          var checkedValue = $('#document-public-selector').prop("checked");
323
-##          toggleDocumentPublicKeyGenerator(checkedValue);
324
-##        });
325
-
326
-      // Submit access-management modal dialog form
327
-      $('#document-share-form-submit-button').click(function(){
328
-        $("input[name='read'][value='']").remove();
329
-        $("input[name='write'][value='']").remove();
330
-        $('#document-share-form')[0].submit();
331
-      });
332
-
333
-      // Initial setup
334
-      // Activate or disactivate users selector according
335
-      // to current state of the is_shared property
336
-      //
337
-      // FIXME - 2014-05-06 - This is not working (should be done at document.ready time)
338
-      // note: putting this in a document.ready callback does not work.
339
-      //
340
-##
341
-## The following code is something like dirty ;)
342
-## the goal of this piece of code is to setup view
343
-## according to hidden input values
344
-## for read/write access management
345
-##
346
-
347
-## FIXME      % for loGroupRightsOnNode in real_group_rights:
348
-##      % for loCurrentGroup in real_group_rights + user_specific_group_rights:
349
-      % for loGroupRightsOnNode in real_group_rights + user_specific_group_rights:
350
-        % if loGroupRightsOnNode.hasSomeAccess()==False:
351
-          updateRights(${loGroupRightsOnNode.group_id}, 0);
352
-        % else:
353
-##
354
-## The following line should build some javascript code similar to this:
355
-## updateRights(-5, 3);
356
-          updateRights(${loGroupRightsOnNode.group_id}, ${loGroupRightsOnNode.rights});
357
-        % endif
358
-      % endfor
359
-
360
-      toggleDocumentSharePeopleSelector($('#document-share-selector').prop("checked"));
361
-##        toggleDocumentPublicKeyGenerator($('#document-public-selector').prop("checked"));  
362
-##        
363
-##        refreshDocumentPublicKey($('#document-public-key').val()); // First init
364
-
365
-    </script>
366
-  </div>
367
-</%def>
368
-
369
-<%def name="FileTabContent(poNode)">
370
-  <h4>${_('Attachments')}</h4>
371
-  
372
-  % if len(poNode.getFiles())<=0:
373
-    <p class="pod-grey">${_("There is currently no attachment.")}<br/></p>
374
-    <p>${POD.OpenModalButton(h.ID.AddFileModalForm(poNode), _(' Attach first file'))}</p>
375
-  % else:
376
-    <p>${POD.OpenModalButton(h.ID.AddFileModalForm(poNode), _(' Attach a file'))}</p>
377
-  % endif
378
-
379
-  <div>
380
-    % if len(poNode.getFiles())>0:
381
-      % for loFile in poNode.getFiles():
382
-        <p style="list-style-type:none; margin-bottom: 0.5em;">
383
-          <i class="fa fa-paperclip"></i>
384
-          <a
385
-            href="${tg.url('/api/get_file_content/%s'%(loFile.node_id))}"
386
-            title="${_('Download the file')}"
387
-          >
388
-            ${loFile.getTruncatedLabel(50)}
389
-          </a>
390
-          ## FIXME SHOW IMAGE THUMBNAIL <img src="${tg.url('/api/get_file_content_thumbnail/%i'%loFile.node_id)}"/>
391
-          <a
392
-            class="pull-right"
393
-            href="${tg.url('/document/%i'%loFile.node_id)}"
394
-            title="${_('View the attachment')}: ${loFile.getTruncatedLabel(-1)}"
395
-          >
396
-            <i class="fa fa-edit"></i>
397
-          </a>
398
-        </p>
399
-      % endfor
400
-    % endif
401
-  </div>
402
-</%def>
403
-
404
-<%def name="SubdocumentContent(poNode)">
405
-  <h4>${_('Sub-documents')}</h4>
406
-  
407
-  % if len(poNode.getChildren())<=0:
408
-    <p class="pod-grey">${_("There is currently no child documents.")}</p>
409
-  % endif
410
-  <p>${POD.OpenModalButton(h.ID.AddDocumentModalForm(poNode), _('Add a document'))}</p>
411
-
412
-  % if len(poNode.getChildren())>0:
413
-    <div>
414
-      % for subnode in poNode.getChildren():
415
-        <p style="list-style-type:none;">
416
-          <i class="fa-fw ${subnode.getIconClass()}"></i>
417
-            <a href="${tg.url('/document/%i'%subnode.node_id)}">
418
-            ${subnode.data_label}
419
-            <span class="label ${subnode.getStatus().css} pull-right" title="${subnode.getStatus().label}">
420
-              <i class="${subnode.getStatus().icon}"></i>
421
-            </a>
422
-        </p>
423
-      % endfor
424
-    </div>
425
-  % endif
426
-</%def>
427
-
428
-<%def name="EventTabContent(current_user, poNode)">
429
-  <h4>${_('Calendar')}</h4>
430
-  
431
-  % if len(poNode.getEvents())<=0:
432
-    <p class="pod-grey">${_("The calendar is empty.")}<br/></p>
433
-    <p>${POD.OpenModalButton(h.ID.AddEventModalForm(poNode), _(' Add first event'))}</p>
434
-  % else:
435
-    <p>${POD.OpenModalButton(h.ID.AddEventModalForm(poNode), _(' Add an event'))}</p>
436
-  % endif
437
-
438
-  % if len(poNode.getEvents())>0:
439
-    <table class="table table-striped table-hover table-condensed">
440
-      <thead>
441
-        <tr>
442
-          <th>Date</th>
443
-          <th>Time</th>
444
-          <th>
445
-            Event
446
-          </th>
447
-          <th>
448
-            <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
449
-          </th>
450
-        </tr>
451
-      </thead>
452
-      % for event in poNode.getEvents():
453
-        % if event.is_shared or event.owner_id==current_user.user_id:
454
-##
455
-## TODO - D.A. - Sharing groups are not checked here : a shared event is share with everybody
456
-##
457
-          <tr class="item-with-data-popoverable" data-content="${event.data_content}" rel="popover" data-placement="left" data-trigger="hover">
458
-            <td>${event.getFormattedDate(event.data_datetime)}</td>
459
-            <td>${event.getFormattedTime(event.data_datetime)}</td>
460
-            <td>${event.data_label}</td>
461
-          </tr>
462
-        % endif
463
-      % endfor
464
-    </table>
465
-  % endif
466
-</%def>
467
-
468
-<%def name="ContactTabContent(poNode)">
469
-  <h4>${_('Address book')}</h4> 
470
-  % if len(poNode.getContacts())<=0:
471
-    <p class="pod-grey">${_("The address book is empty.")}<br/></p>
472
-    <p>${POD.OpenModalButton(h.ID.AddContactModalForm(poNode), _('Add first contact'))}</p>
473
-  % else:
474
-    <p>${POD.OpenModalButton(h.ID.AddContactModalForm(poNode), _('Add a contact'))}</p>
475
-  % endif
476
-
477
-  <!-- LIST OF CONTACT NODES -->
478
-  % for contact in poNode.getContacts():
479
-    <div class="well">
480
-      <legend class="text-info">
481
-        ${contact.data_label}
482
-        ## TODO - 2013-11-20 - Use the right form in order to update meta-data
483
-        <a class="pull-right" href="${tg.url('/document/%i'%contact.node_id)}"><i class="fa fa-edit"></i></a>
484
-      </legend>
485
-      
486
-      <div>
487
-        ## FIXME - D.A. - 2013-11-15 - Implement localisation stuff <a style='float: right;' href="" title='${_('Search on google maps')}'><i class='icon-g-google-maps'></i></a>
488
-        ${contact.data_content|n}
489
-      </div>
490
-    </div>
491
-  % endfor
492
-</%def>
493
-
494
-<%def name="CommentTabContent(current_user, poNode)">
495
-  <h4>${_('Comment thread')}</h4>
496
-  
497
-  % if len(poNode.getComments())<=0:
498
-    <p class="pod-grey">${_("The comment thread is empty.")}<br/></p>
499
-  % endif
500
-
501
-  % if len(poNode.getComments())>0:
502
-    % if len(poNode.getComments())>5:
503
-      ##
504
-      ## We show a "direct down" button in case the page is too long
505
-      ##
506
-      <p>${POD.OpenLinkButton(h.ID.AddCommentInlineForm(), _('Add a comment'))}</p>
507
-    % endif
508
-    <div>
509
-      % for comment in poNode.getComments():
510
-         % if comment.is_shared or comment.owner_id==current_user.user_id:
511
-##
512
-## FIXME - 2014-05-29
513
-## We do not check specific rights on comment but on document instead
514
-## In the future full-API architecture, it should be fixed
515
-##
516
-          <p style="margin-bottom: 1em;">
517
-            <i class="fa fa-comments-o"></i>
518
-            <strong class="pod-grey">${comment._oOwner.display_name}</strong>
519
-
520
-            <i class="pull-right">
521
-              <span class="pod-grey">${_('the')}</span>
522
-              ${comment.getFormattedDate(comment.updated_at)} 
523
-              <span class="pod-grey">${_('at')}</span>
524
-              ${comment.getFormattedTime(comment.updated_at)}
525
-            </i>
526
-            <br/>
527
-
528
-            % if comment.owner_id==current_user.user_id:
529
-              <a class="pull-right" href="${tg.url('/api/toggle_share_status', dict(node_id=comment.node_id))}">
530
-                % if comment.is_shared:
531
-                  <span class="label label-warning" title="${_('Shared comment. Click to make private.')}">${h.ICON.Shared|n}</span>
532
-                % else:
533
-                  <span class="label label-info" title="${_('Private comment. Click to share.')}">${h.ICON.Private|n}</span>
534
-                % endif
535
-              </a>
536
-            % endif
537
-
538
-            ${comment.data_content|n}
539
-          </p>
540
-        % endif
541
-      % endfor
542
-    </div>
543
-  % endif
544
-
545
-  <hr style="border-top: 1px dotted #ccc; margin: 0;"/>
546
-  <form class="form" id="${h.ID.AddCommentInlineForm()}" action="${tg.url('/api/create_comment')}" method="POST">
547
-    <input type="hidden" name='parent_id' value='${poNode.node_id}'/>
548
-    <input type="hidden" name='data_label' value=""/>
549
-    <input type="hidden" id="add_comment_data_content_textarea" name='data_content' />
550
-    <label>
551
-      ${_('Write your comment below:')}
552
-      ${POD.RichTextEditor('add_comment_data_content_textarea_wysiwyg', '', 'boldanditalic')}
553
-    </label>
554
-    <label>
555
-      <input type="checkbox" name='is_shared'/> ${_('Share this comment')}
556
-    </label>
557
-    <span class="pull-right">
558
-      % if len(poNode.getComments())<=0:
559
-        ${POD.SaveButton('current-document-add-comment-save-button', True, _('Add first comment'))}
560
-      % else:
561
-        ${POD.SaveButton('current-document-add-comment-save-button', True, _('Comment'))}
562
-      % endif
563
-    </span>
564
-  </form>
565
-  <script>
566
-      $('#current-document-add-comment-save-button').on('click', function(e){
567
-      e.preventDefault(); // We don't want this to act as a link so cancel the link action
568
-      $('#add_comment_data_content_textarea_wysiwyg').cleanHtml();
569
-      $('#add_comment_data_content_textarea').val($('#add_comment_data_content_textarea_wysiwyg').html());
570
-      $('#current-document-add-comment-form').submit();
571
-    });
572
-  </script>
573
-</%def>

+ 0 - 210
pboard/pboard/templates/document.mak View File

@@ -1,210 +0,0 @@
1
-<%inherit file="local:templates.master"/>
2
-<%namespace name="POD" file="pboard.templates.pod"/>
3
-<%namespace name="DOC" file="pboard.templates.document-widgets"/>
4
-<%namespace name="DOCTABS" file="pboard.templates.document-widgets-tabs"/>
5
-
6
-<%def name="title()">
7
-  % if current_node!=None:
8
-    pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id} / ${current_node.getStatus().label}]
9
-  % else:
10
-    pod :: document root
11
-  % endif
12
-</%def>
13
-
14
-<%def name="node_treeview(node_list, indentation=0)">
15
-  % if len(node_list)<=0 and indentation==0:
16
-    <p class="pod-grey">${_('You have no document yet.')}</p>
17
-  % endif
18
-
19
-  % if len(node_list)>0:
20
-    % for item in node_list:
21
-      <div id='pod-menu-item-${item.node.node_id}' class="pod-toolbar-parent ${'pod-status-active' if current_node!=None and item.node.node_id==current_node.node_id else ''}" style="padding-left: ${(indentation+2)*0.5}em; position: relative;">
22
-        <a class="toggle-child-menu-items"><i class='${item.node.getIconClass()}'></i></a>
23
-        <a href="${tg.url('/document/%s'%(item.node.node_id))}" title="${item.node.data_label}">
24
-          % if item.node.getStatus().status_family=='closed' or item.node.getStatus().status_family=='invisible':
25
-            <strike>
26
-          % endif
27
-              ${item.node.getTruncatedLabel(32-0.8*(indentation+1))}
28
-          % if item.node.getStatus().status_family=='closed' or item.node.getStatus().status_family=='invisible':
29
-            </strike>
30
-          % endif
31
-        </a>
32
-        <div class="pod-toolbar">
33
-          <a href="${tg.url('/api/move_node_upper?node_id=%i'%(item.node.node_id))}" title="${_('Move up')}"><i class="fa fa-arrow-up"></i></a>
34
-          <a href="${tg.url('/api/move_node_lower?node_id=%i'%(item.node.node_id))}" title="${_('Move down')}"><i class="fa fa-arrow-down"></i></a>
35
-        </div>
36
-        <div class="pod-status ${item.node.getStatus().css}" title='${item.node.getStatus().label}'>
37
-           <i class='${item.node.getStatus().icon}'></i>
38
-        </div>
39
-      </div>
40
-      % if len(item.children)>0:
41
-        <div id="pod-menu-item-${item.node.node_id}-children">${node_treeview(node_list=item.children, indentation=indentation+1)}</div>
42
-      % endif
43
-    % endfor
44
-  % endif
45
-</%def>
46
-
47
-<%def name="node_treeview_in_select_field(node_list, indentation, selected_id=0)">
48
-    % if len(node_list)>0:
49
-      % if indentation==0:
50
-        <option style="margin-left: ${0.5*indentation}em; color: #CCC;" value="0">no parent...</option>
51
-      % endif
52
-      % for node in node_list:
53
-        % if selected_id!=node.node_id:
54
-          <option style="margin-left: ${0.5*indentation}em;" value="${node.node_id}">${node.data_label}</option>
55
-        % else:
56
-          <option style="margin-left: ${0.5*indentation}em;" value="${node.node_id}" selected>${node.data_label}</option>
57
-        % endif
58
-        ${node_treeview_in_select_field(node.getChildren(), indentation+1, selected_id)}
59
-      % endfor
60
-    % endif
61
-</%def>
62
-
63
-<%def name='toggle_view_mode()'>
64
-            <li title=" ${_('Toggle view mode [narrow, medium, large]')}">
65
-              <a title="${_('Toggle view mode: narrow')}" id='view-size-toggle-button-small' class="pod-do-not-display"><i class='fa fa-eye'></i></a>
66
-              <a title="${_('Toggle view mode: medium')}" id='view-size-toggle-button-medium'><i class='fa fa-eye'></i></a>
67
-              <a title="${_('Toggle view mode: large')}"  id='view-size-toggle-button-large' class="pod-do-not-display"><i class='fa fa-eye'></i></a>
68
-            </li>
69
-</%def>
70
-
71
-#######
72
-##
73
-## HERE COMES THE BREADCRUMB
74
-##
75
-  <div class="row">
76
-    ${DOC.BreadCrumb(current_node, allowed_nodes)}
77
-  </div>
78
-
79
-  <div class="row">
80
-    <div id='application-left-panel' class="span3" >
81
-      <link rel="stylesheet" href="${tg.url('/jstree/dist/themes/default/style.min.css')}" />
82
-      <script src="${tg.url('/jstree/dist/jstree.js')}"></script>
83
-      <style>
84
-        #mypodtree {overflow:hidden;}
85
-        #mypodtree:hover {overflow:visible; }
86
-      </style>
87
-      <h5>${_('Content explorer')}</h5>
88
-      <div id="mypodtree"></div>
89
-      <script>
90
-        $(function () {
91
-          $('#mypodtree').jstree({
92
-            "plugins" : [ "wholerow"],
93
-            'core' : {
94
-
95
-              'error': function (error) {
96
-                console.log('Error ' + error.toString())
97
-              },
98
-              'data' : {
99
-                'dataType': 'json',
100
-                'contentType': 'application/json; charset=utf-8',
101
-                'url' : function (node) {
102
-                  if (node.id==='#') {
103
-                    return '${tg.url("/api/menu/initialize", dict(current_node_id=current_node.node_id if current_node else 0))}';
104
-                  } else {
105
-                    return '${tg.url("/api/menu/children")}';
106
-                  }
107
-                },
108
-                'data' : function(node) {
109
-                  console.log("NODE => "+JSON.stringify(node))
110
-                  return {
111
-                    'id' : node.id
112
-                  };
113
-                },
114
-                'success': function (new_data) {
115
-                  console.log('loaded new menu data' + new_data)
116
-                  console.log(new_data);
117
-                  return new_data;
118
-                },
119
-              },
120
-            }
121
-          });
122
-          
123
-          $('#mypodtree').on("select_node.jstree", function (e, data) {
124
-            url = "${tg.url('/document/')}"+data.selected[0];
125
-            console.log("Opening document: "+url);
126
-            location.href = url;
127
-          });
128
-          
129
-          $('#mypodtree').on("loaded.jstree", function () {
130
-            nodes = $('#mypodtree .jstree-node');
131
-            console.log("nodes = "+nodes.length);
132
-            if (nodes.length<=0) {
133
-              $("#mypodtree").append( "<p class='pod-grey'>${_('There is no content yet.')|n}" );
134
-              $("#mypodtree").append( "<p><a class=\"btn btn-success\" data-toggle=\"modal\" role=\"button\" href=\"#add-document-modal-form\"><i class=\"fa fa-plus\"></i> ${_('Create a topic')}</a></p>" );
135
-              
136
-              
137
-            }
138
-          });
139
-        });
140
-      </script>
141
-## INFO - D.A. - 2014-05-28 - Hide old school menu
142
-##      <div>
143
-##        ${node_treeview(menu_node_list)}
144
-##      </div>
145
-    </div>
146
-    <div id='application-main-panel' class="span9">
147
-
148
-      % if current_node==None:
149
-        <div class="row">
150
-          ${DOC.FirstTimeFakeDocument()}
151
-        </div>
152
-        
153
-      % else:
154
-      <div class="row">
155
-        <div id='application-document-panel' class="span5">
156
-          <div id='current-document-content' class="">
157
-            ######
158
-            ##
159
-            ## CURRENT DOCUMENT TOOLBAR - START
160
-            ##
161
-            ## The Toolbar is a div with a specific id
162
-            ##
163
-            ${DOC.Toolbar(current_node, node_status_list, root_node_list_for_select_field, 'current-document-toobar', current_user_rights, current_user)}
164
-            ${DOC.ShowTitle(current_node, keywords, 'current-document-title')}
165
-            ${DOC.ShowContent(current_node, keywords)}
166
-          </div>
167
-          ${DOC.EditForm(current_node)}
168
-        </div>
169
-        <div id='application-metadata-panel' class="span4">
170
-          ######
171
-          ##
172
-          ## HERE WE INCLUDE ALL MODAL DIALOG WHICH WILL BE ACCESSIBLE THROUGH TABS OR MENU
173
-          ##
174
-          ${DOC.DocumentEditModalDialog(current_node, None, tg.url('/api/create_document'), h.ID.AddDocumentModalForm(current_node), _('New Sub-document'))}
175
-          ${DOC.EventEditModalDialog(current_node, None, tg.url('/api/create_event'), h.ID.AddEventModalForm(current_node), _('Add an event'))}
176
-          ${DOC.ContactEditModalDialog(current_node, None, tg.url('/api/create_contact'), h.ID.AddContactModalForm(current_node), _('Add a new contact'))}
177
-          ${DOC.FileEditModalDialog(current_node, None, tg.url('/api/create_file'), h.ID.AddFileModalForm(current_node), _('Add a new file'))}
178
-          ${DOC.MoveDocumentModalDialog(current_node, tg.url('/api/set_parent_node'), h.ID.MoveDocumentModalForm(current_node), _('Move the document'))}
179
-
180
-          <div class="tabbable">
181
-            <ul class="nav nav-tabs" style="margin-bottom: 0em;">
182
-                <li>${DOC.MetadataTab('#subdocuments', 'tab', _('Subdocuments'), 'fa-file-text-o', current_node.getChildren())}</li>
183
-                <li>${DOC.MetadataTab('#events', 'tab', _('Calendar'), 'fa-calendar', current_node.getEvents())}</li>
184
-                <li>${DOC.MetadataTab('#contacts', 'tab', _('Address book'), 'fa-user', current_node.getContacts())}</li>
185
-                <li class="active">${DOC.MetadataTab('#comments', 'tab', _('Comment thread'), 'fa-comments-o', current_node.getComments())}</li>
186
-                <li>${DOC.MetadataTab('#files', 'tab', _('Attachments'), 'fa-paperclip', current_node.getFiles())}</li>
187
-                <li class="pull-right">${DOC.MetadataTab('#accessmanagement', 'tab', _('Access Management'), 'fa-key', current_node.getGroupsWithSomeAccess())}</li>
188
-                <li class="pull-right">${DOC.MetadataTab('#history', 'tab', _('History'), 'fa-history', current_node.getHistory())}</li>
189
-            </ul>
190
-            ################################
191
-            ##
192
-            ## PANEL SHOWING ASSOCIATED DATA AND METADATA
193
-            ##
194
-            ################################
195
-            <div class="tab-content">
196
-              <div class="tab-pane" id="subdocuments">${DOCTABS.SubdocumentContent(current_node)}</div>
197
-              <div class="tab-pane" id="events">${DOCTABS.EventTabContent(current_user, current_node)}</div>
198
-              <div class="tab-pane" id="contacts">${DOCTABS.ContactTabContent(current_node)}</div>
199
-              <div class="tab-pane active" id="comments">${DOCTABS.CommentTabContent(current_user, current_node)}</div>
200
-              <div class="tab-pane" id="files">${DOCTABS.FileTabContent(current_node)}</div>
201
-              <div class="tab-pane" id="history">${DOCTABS.HistoryTabContent(current_node)}</div>
202
-              <div class="tab-pane" id="accessmanagement">${DOCTABS.AccessManagementTab(current_node, current_user_rights, current_user)}</div>
203
-            </div>
204
-          </div>
205
-        </div>
206
-      </div>
207
-      % endif
208
-    </div>
209
-  </div>
210
-</div>

+ 4 - 0
pod/MANIFEST.in View File

@@ -0,0 +1,4 @@
1
+recursive-include pod/public *
2
+include pod/public/favicon.ico
3
+recursive-include pod/i18n *
4
+recursive-include pod/templates *

pboard/README.txt → pod/README.txt View File

@@ -1,12 +1,12 @@
1
-This file is for you to describe the pboard application. Typically
1
+This file is for you to describe the pod application. Typically
2 2
 you would include information such as the information below:
3 3
 
4 4
 Installation and Setup
5 5
 ======================
6 6
 
7
-Install ``pboard`` using the setup.py script::
7
+Install ``pod`` using the setup.py script::
8 8
 
9
-    $ cd pboard
9
+    $ cd pod
10 10
     $ python setup.py develop
11 11
 
12 12
 Create the project database for any model classes defined::

pboard/app.wsgi → pod/app.wsgi View File

@@ -1,4 +1,4 @@
1
-APP_CONFIG = "/home/daccorsi/sources/protos/pboard/pboard/development.ini"
1
+APP_CONFIG = "/home/daccorsi/sources/pod/pod/development.ini"
2 2
 
3 3
 #Setup logging
4 4
 import logging

pboard/development.ini.base → pod/development.ini.base View File

@@ -1,5 +1,5 @@
1 1
 #
2
-# pboard - TurboGears 2 development environment configuration
2
+# pod - TurboGears 2 development environment configuration
3 3
 #
4 4
 # The %(here)s variable will be replaced with the parent directory of this file
5 5
 #
@@ -23,11 +23,11 @@ port = 8080
23 23
 cookie_secret = 3283411b-1904-4554-b0e1-883863b53080
24 24
 
25 25
 [app:main]
26
-use = egg:pboard
26
+use = egg:pod
27 27
 full_stack = true
28
-#lang = ru
28
+#lang = fr_FR
29 29
 cache_dir = %(here)s/data
30
-beaker.session.key = pboard
30
+beaker.session.key = pod
31 31
 beaker.session.secret = 3283411b-1904-4554-b0e1-883863b53080
32 32
 
33 33
 #By default session is store in cookies to avoid the overhead
@@ -54,13 +54,8 @@ beaker.session.validate_key = 3283411b-1904-4554-b0e1-883863b53080
54 54
 # invalidate the URI when specifying a SQLite db via path name
55 55
 # sqlalchemy.url=postgresql://username:password@hostname:port/databasename
56 56
 # sqlalchemy.url=mysql://username:password@hostname:port/databasename
57
+sqlalchemy.url = postgresql://pod_user:pod_user_password@127.0.0.1:5432/pod
57 58
 
58
-
59
-# If you have sqlite, here's a simple default to get you started
60
-# in development
61
-
62
-#sqlalchemy.url = postgresql://pboard:pboard@127.0.0.1:5432/pboarddb
63
-sqlalchemy.url = postgresql://pod_protov1_dev:pod_protov1_dev_password@127.0.0.1:5432/pod_protov1_dev
64 59
 #echo shouldn't be used together with the logging module.
65 60
 sqlalchemy.echo = false
66 61
 sqlalchemy.echo_pool = false
@@ -96,12 +91,11 @@ templating.mako.compiled_templates_dir = %(here)s/data/templates
96 91
 #javascript files (if your library supports that)
97 92
 toscawidgets.framework.resource_variant=debug
98 93
 
99
-# if you have an analytics tracker, like google analytics or piwik,
100
-# put the path of the js file to include here (relative to .ini directory)
101
-js_tracker_path = analytics.js
94
+# if you want to setup analytics like piwik or google analytics, then put the js code in a file and set file path below
95
+#js_tracker_path = analytics.js
102 96
 
103 97
 [loggers]
104
-keys = root, pboard, sqlalchemy, auth
98
+keys = root, pod, sqlalchemy, auth
105 99
 
106 100
 [handlers]
107 101
 keys = console
@@ -114,10 +108,10 @@ keys = generic
114 108
 level = INFO
115 109
 handlers = console
116 110
 
117
-[logger_pboard]
111
+[logger_pod]
118 112
 level = DEBUG
119 113
 handlers =
120
-qualname = pboard
114
+qualname = pod
121 115
 
122 116
 [logger_sqlalchemy]
123 117
 level = INFO

pboard/migration/env.py → pod/migration/env.py View File

@@ -15,7 +15,7 @@ config = context.config
15 15
 # for 'autogenerate' support
16 16
 # from myapp import mymodel
17 17
 # target_metadata = mymodel.Base.metadata
18
-from pboard import model
18
+from pod import model
19 19
 target_metadata = model.metadata
20 20
 
21 21
 # other values from the config, defined by the needs of env.py,

pboard/migration/script.py.mako → pod/migration/script.py.mako View File


pboard/migration/versions/empty.txt → pod/migration/versions/empty.txt View File


+ 2 - 0
pod/pod/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+"""The pod package"""

pboard/pboard/config/__init__.py → pod/pod/config/__init__.py View File


pboard/pboard/config/app_cfg.py → pod/pod/config/app_cfg.py View File

@@ -1,6 +1,6 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 """
3
-Global configuration file for TG2-specific settings in pboard.
3
+Global configuration file for TG2-specific settings in pod.
4 4
 
5 5
 This file complements development/deployment.ini.
6 6
 
@@ -15,16 +15,16 @@ convert them into boolean, for example, you should use the
15 15
 
16 16
 from tg.configuration import AppConfig
17 17
 
18
-import pboard
19
-from pboard import model
20
-from pboard.lib import app_globals, helpers 
18
+import pod
19
+from pod import model
20
+from pod.lib import app_globals, helpers 
21 21
 
22 22
 base_config = AppConfig()
23 23
 base_config.renderers = []
24 24
 base_config.use_toscawidgets = False
25 25
 base_config.use_toscawidgets2 = True
26 26
 
27
-base_config.package = pboard
27
+base_config.package = pod
28 28
 
29 29
 #Enable json in expose
30 30
 base_config.renderers.append('json')
@@ -37,8 +37,8 @@ base_config.default_renderer = 'mako'
37 37
 base_config.renderers.append('mako')
38 38
 #Configure the base SQLALchemy Setup
39 39
 base_config.use_sqlalchemy = True
40
-base_config.model = pboard.model
41
-base_config.DBSession = pboard.model.DBSession
40
+base_config.model = pod.model
41
+base_config.DBSession = pod.model.DBSession
42 42
 # Configure the authentication backend
43 43
 
44 44
 # YOU MUST CHANGE THIS VALUE IN PRODUCTION TO SECURE YOUR APP 

pboard/pboard/config/deployment.ini_tmpl → pod/pod/config/deployment.ini_tmpl View File

@@ -1,5 +1,5 @@
1 1
 #
2
-# pboard - TurboGears 2 production environment configuration
2
+# pod - TurboGears 2 production environment configuration
3 3
 #
4 4
 # The %(here)s variable will be replaced with the parent directory of this file
5 5
 #
@@ -21,10 +21,10 @@ port = 8080
21 21
 cookie_secret = ${app_instance_secret}
22 22
 
23 23
 [app:main]
24
-use = egg:pboard
24
+use = egg:pod
25 25
 full_stack = true
26 26
 cache_dir = %(here)s/data
27
-beaker.session.key = pboard
27
+beaker.session.key = pod
28 28
 beaker.session.secret = ${app_instance_secret}
29 29
 app_instance_uuid = ${app_instance_uuid}
30 30
 
@@ -55,7 +55,7 @@ templating.genshi.method = xhtml
55 55
 # http://docs.python.org/lib/logging-config-fileformat.html
56 56
 
57 57
 [loggers]
58
-keys = root, pboard, sqlalchemy, auth
58
+keys = root, pod, sqlalchemy, auth
59 59
 
60 60
 [handlers]
61 61
 keys = console
@@ -68,10 +68,10 @@ keys = generic
68 68
 level = INFO
69 69
 handlers = console
70 70
 
71
-[logger_pboard]
71
+[logger_pod]
72 72
 level = INFO
73 73
 handlers =
74
-qualname = pboard
74
+qualname = pod
75 75
 
76 76
 [logger_sqlalchemy]
77 77
 level = WARN

pboard/pboard/config/environment.py → pod/pod/config/environment.py View File

@@ -1,7 +1,7 @@
1 1
 # -*- coding: utf-8 -*-
2
-"""WSGI environment setup for pboard."""
2
+"""WSGI environment setup for pod."""
3 3
 
4
-from pboard.config.app_cfg import base_config
4
+from pod.config.app_cfg import base_config
5 5
 
6 6
 __all__ = ['load_environment']
7 7
 

pboard/pboard/config/middleware.py → pod/pod/config/middleware.py View File

@@ -1,8 +1,8 @@
1 1
 # -*- coding: utf-8 -*-
2
-"""WSGI middleware initialization for the pboard application."""
2
+"""WSGI middleware initialization for the pod application."""
3 3
 
4
-from pboard.config.app_cfg import base_config
5
-from pboard.config.environment import load_environment
4
+from pod.config.app_cfg import base_config
5
+from pod.config.environment import load_environment
6 6
 
7 7
 
8 8
 __all__ = ['make_app']
@@ -14,18 +14,18 @@ make_base_app = base_config.setup_tg_wsgi_app(load_environment)
14 14
 
15 15
 def make_app(global_conf, full_stack=True, **app_conf):
16 16
     """
17
-    Set pboard up with the settings found in the PasteDeploy configuration
17
+    Set pod up with the settings found in the PasteDeploy configuration
18 18
     file used.
19 19
     
20
-    :param global_conf: The global settings for pboard (those
20
+    :param global_conf: The global settings for pod (those
21 21
         defined under the ``[DEFAULT]`` section).
22 22
     :type global_conf: dict
23 23
     :param full_stack: Should the whole TG2 stack be set up?
24 24
     :type full_stack: str or bool
25
-    :return: The pboard application with all the relevant middleware
25
+    :return: The pod application with all the relevant middleware
26 26
         loaded.
27 27
     
28
-    This is the PasteDeploy factory for the pboard application.
28
+    This is the PasteDeploy factory for the pod application.
29 29
     
30 30
     ``app_conf`` contains all the application-specific settings (those defined
31 31
     under ``[app:main]``.

+ 2 - 0
pod/pod/controllers/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+"""Controllers for the pod application."""

pboard/pboard/controllers/admingroup.py → pod/pod/controllers/admingroup.py View File

@@ -1,12 +1,12 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
-from pboard import model  as pm
3
+from pod import model  as pm
4 4
 
5 5
 from tgext.crud import CrudRestController
6 6
 from sprox.tablebase import TableBase
7 7
 from sprox.formbase import EditableForm, AddRecordForm
8 8
 from sprox.fillerbase import TableFiller, EditFormFiller
9
-from pboard.model import auth as pma
9
+from pod.model import auth as pma
10 10
 from tw2 import forms as tw2f
11 11
 import tg
12 12
 
@@ -15,7 +15,7 @@ from sprox._compat import unicode_text
15 15
 from formencode import Schema
16 16
 from formencode.validators import FieldsMatch
17 17
 
18
-from pboard.lib import dbapi as pld
18
+from pod.lib import dbapi as pld
19 19
 
20 20
 class AdminGroupController(CrudRestController):
21 21
     model = pma.Group

pboard/pboard/controllers/adminuser.py → pod/pod/controllers/adminuser.py View File

@@ -1,12 +1,12 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
-from pboard import model  as pm
3
+from pod import model  as pm
4 4
 
5 5
 from tgext.crud import CrudRestController
6 6
 from sprox.tablebase import TableBase
7 7
 from sprox.formbase import EditableForm, AddRecordForm
8 8
 from sprox.fillerbase import TableFiller, EditFormFiller
9
-from pboard.model import auth as pma
9
+from pod.model import auth as pma
10 10
 from tw2 import forms as tw2f
11 11
 import tg
12 12
 
@@ -15,7 +15,7 @@ from sprox._compat import unicode_text
15 15
 from formencode import Schema
16 16
 from formencode.validators import FieldsMatch
17 17
 
18
-from pboard.lib import dbapi as pld
18
+from pod.lib import dbapi as pld
19 19
 
20 20
 class GroupField(PropertyMultipleSelectField):
21 21
     """ Shows a limited list of groups """

pboard/pboard/controllers/api.py → pod/pod/controllers/api.py View File

@@ -20,15 +20,15 @@ from tg import predicates as tgp
20 20
 
21 21
 from tg.i18n import ugettext as _, lazy_ugettext as l_
22 22
 
23
-from pboard.lib.base import BaseController
24
-from pboard.lib   import dbapi as pld
25
-from pboard.model import data as pmd
26
-from pboard.model import auth as pma
27
-from pboard.model import serializers as pms
28
-from pboard import model as pm
29
-from pboard.lib.auth import can_read, can_write
23
+from pod.lib.base import BaseController
24
+from pod.lib   import dbapi as pld
25
+from pod.model import data as pmd
26
+from pod.model import auth as pma
27
+from pod.model import serializers as pms
28
+from pod import model as pm
29
+from pod.lib.auth import can_read, can_write
30 30
 
31
-from pboard.controllers import apimenu as pcam
31
+from pod.controllers import apimenu as pcam
32 32
 
33 33
 
34 34
 FIXME_ERROR_CODE=-1
@@ -197,7 +197,7 @@ class PODApiController(BaseController):
197 197
       redirect(lurl('/document/%s'%(node_id)))
198 198
 
199 199
     @expose()
200
-    def create_document(self, parent_id=None, data_label='', data_content='', inherit_rights='off'):
200
+    def create_document(self, parent_id=None, data_label='', data_content='', inherit_rights='off', node_status=''):
201 201
       loCurrentUser   = pld.PODStaticController.getCurrentUser()
202 202
       loApiController = pld.PODUserFilteredApiController(loCurrentUser.user_id)
203 203
 
@@ -218,6 +218,11 @@ class PODApiController(BaseController):
218 218
       if int(parent_id)!=0:
219 219
         loNewNode.parent_id = parent_id
220 220
 
221
+      if node_status!='':
222
+          status_item = pmd.PBNodeStatus.getStatusItem(node_status)
223
+          if status_item in pmd.PBNodeStatus.getChoosableList():
224
+              loNewNode.node_status = status_item.status_id
225
+
221 226
       pm.DBSession.flush()
222 227
       redirect(lurl('/document/%i'%(loNewNode.node_id)))
223 228
 

pboard/pboard/controllers/apimenu.py → pod/pod/controllers/apimenu.py View File

@@ -2,10 +2,10 @@
2 2
 
3 3
 import tg
4 4
 
5
-from pboard.lib import base as plb
6
-from pboard.lib import dbapi as pld
7
-from pboard.model import data as pmd
8
-from pboard.model import serializers as pms
5
+from pod.lib import base as plb
6
+from pod.lib import dbapi as pld
7
+from pod.model import data as pmd
8
+from pod.model import serializers as pms
9 9
 
10 10
 class PODApiMenuController(plb.BaseController):
11 11
 

pboard/pboard/controllers/apipublic.py → pod/pod/controllers/apipublic.py View File

@@ -4,11 +4,11 @@ import tg
4 4
 import repoze.who.api
5 5
 
6 6
 from tg import _compat
7
-from pboard.lib import base as plb
8
-from pboard.lib import dbapi as pld
9
-from pboard import model as pm
10
-from pboard.model import data as pmd
11
-from pboard.model import serializers as pms
7
+from pod.lib import base as plb
8
+from pod.lib import dbapi as pld
9
+from pod import model as pm
10
+from pod.model import data as pmd
11
+from pod.model import serializers as pms
12 12
 
13 13
 from tg.i18n import ugettext as _
14 14
 

pboard/pboard/controllers/controller.template → pod/pod/controllers/controller.template View File

@@ -9,14 +9,14 @@ from tg import expose
9 9
 #from tg import predicates
10 10
 
11 11
 # project specific imports
12
-from pboard.lib.base import BaseController
13
-#from pboard.model import DBSession, metadata
12
+from pod.lib.base import BaseController
13
+#from pod.model import DBSession, metadata
14 14
 
15 15
 
16 16
 class SampleController(BaseController):
17 17
     #Uncomment this line if your controller requires an authenticated user
18 18
     #allow_only = predicates.not_anonymous()
19 19
     
20
-    @expose('pboard.templates.index')
20
+    @expose('pod.templates.index')
21 21
     def index(self):
22 22
         return dict(page='index')

pboard/pboard/controllers/debug.py → pod/pod/controllers/debug.py View File

@@ -4,19 +4,19 @@
4 4
 from tg import expose, flash, require, url, lurl, request, redirect, tmpl_context
5 5
 from tg.i18n import ugettext as _, lazy_ugettext as l_
6 6
 from tg import predicates
7
-from pboard import model
8
-from pboard.controllers.secure import SecureController
9
-from pboard.model import DBSession, metadata
7
+from pod import model
8
+from pod.controllers.secure import SecureController
9
+from pod.model import DBSession, metadata
10 10
 
11
-from pboard.lib.base import BaseController
12
-from pboard.controllers.error import ErrorController
11
+from pod.lib.base import BaseController
12
+from pod.controllers.error import ErrorController
13 13
 
14
-import pboard.model as pbm
15
-import pboard.controllers as pbc
16
-from pboard.lib import dbapi as pld
17
-from pboard.controllers import api as pbca
14
+import pod.model as pbm
15
+import pod.controllers as pbc
16
+from pod.lib import dbapi as pld
17
+from pod.controllers import api as pbca
18 18
 
19
-import pboard.model.data as pbmd
19
+import pod.model.data as pbmd
20 20
 
21 21
 __all__ = ['DebugController']
22 22
 
@@ -26,19 +26,19 @@ class DebugController(BaseController):
26 26
   # allow_only = predicates.in_group('admin',
27 27
   #                            msg=l_('You\'re not allowed to access this page'))
28 28
 
29
-  @expose('pboard.templates.debug.iconset')
29
+  @expose('pod.templates.debug.iconset')
30 30
   def iconset(self, **kw):
31 31
     """This method showcases how you can use the same controller for a data page and a display page"""
32 32
     return dict()
33 33
 
34 34
 
35
-  @expose('pboard.templates.debug.environ')
35
+  @expose('pod.templates.debug.environ')
36 36
   def environ(self, **kw):
37 37
     """This method showcases TG's access to the wsgi environment."""
38 38
     return dict(environment=request.environ)
39 39
 
40 40
 
41
-  @expose('pboard.templates.debug.identity')
41
+  @expose('pod.templates.debug.identity')
42 42
   def identity(self, **kw):
43 43
     """This method showcases TG's access to the wsgi environment."""
44 44
     return dict(identity=request.identity)

pboard/pboard/controllers/error.py → pod/pod/controllers/error.py View File

@@ -18,7 +18,7 @@ class ErrorController(object):
18 18
     
19 19
     """
20 20
 
21
-    @expose('pboard.templates.error')
21
+    @expose('pod.templates.error')
22 22
     def document(self, *args, **kwargs):
23 23
         """Render the error document"""
24 24
         resp = request.environ.get('pylons.original_response')

pboard/pboard/controllers/root.py → pod/pod/controllers/root.py View File

@@ -1,26 +1,26 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 """Main Controller"""
3
-import pboard
3
+import pod
4 4
 
5 5
 import tg
6 6
 from tg import expose, flash, require, url, lurl, request, redirect, tmpl_context
7 7
 from tg.i18n import ugettext as _, lazy_ugettext as l_
8 8
 from tg import predicates
9
-from pboard.lib.auth import can_read
9
+from pod.lib.auth import can_read
10 10
 
11
-from pboard.lib.base import BaseController
12
-from pboard.controllers.error import ErrorController
11
+from pod.lib.base import BaseController
12
+from pod.controllers.error import ErrorController
13 13
 
14
-from pboard.lib import dbapi as pld
15
-from pboard.controllers import api as pca
16
-from pboard.controllers import apipublic as pcap
17
-from pboard.controllers import debug as pbcd
18
-from pboard.controllers import adminuser as pbcu
19
-from pboard.controllers import admingroup as pbcg
14
+from pod.lib import dbapi as pld
15
+from pod.controllers import api as pca
16
+from pod.controllers import apipublic as pcap
17
+from pod.controllers import debug as pbcd
18
+from pod.controllers import adminuser as pbcu
19
+from pod.controllers import admingroup as pbcg
20 20
 
21
-from pboard import model as pm
21
+from pod import model as pm
22 22
 
23
-import pboard.model.data as pbmd
23
+import pod.model.data as pbmd
24 24
 
25 25
 __all__ = ['RootController']
26 26
 
@@ -32,7 +32,7 @@ class AdminController(BaseController):
32 32
 
33 33
 class RootController(BaseController):
34 34
     """
35
-    The root controller for the pboard application.
35
+    The root controller for the pod application.
36 36
 
37 37
     All the other controllers and WSGI applications should be mounted on this
38 38
     controller. For example::
@@ -54,21 +54,21 @@ class RootController(BaseController):
54 54
     public_api = pcap.PODPublicApiController()
55 55
 
56 56
     def _before(self, *args, **kw):
57
-        tmpl_context.project_name = "pboard"
57
+        tmpl_context.project_name = "pod"
58 58
 
59
-    @expose('pboard.templates.index')
59
+    @expose('pod.templates.index')
60 60
     def index(self):
61 61
         """Handle the front-page."""
62 62
         return dict()
63 63
 
64 64
 
65
-    @expose('pboard.templates.about')
65
+    @expose('pod.templates.about')
66 66
     def about(self):
67 67
         """Handle the about-page."""
68 68
         return dict()
69 69
 
70 70
 
71
-    @expose('pboard.templates.login')
71
+    @expose('pod.templates.login')
72 72
     def login(self, came_from=lurl('/')):
73 73
         """Start the user login."""
74 74
         login_counter = request.environ.get('repoze.who.logins', 0)
@@ -102,7 +102,7 @@ class RootController(BaseController):
102 102
         flash(_('We hope to see you soon!'))
103 103
         redirect(came_from)
104 104
         
105
-    @expose('pboard.templates.dashboard')
105
+    @expose('pod.templates.dashboard')
106 106
     @require(predicates.in_group('user', msg=l_('Please login to access this page')))
107 107
     def dashboard(self):
108 108
         loCurrentUser   = pld.PODStaticController.getCurrentUser()
@@ -114,7 +114,7 @@ class RootController(BaseController):
114 114
         return dict(last_modified_nodes=loLastModifiedNodes, whats_hot_nodes=loWhatsHotNodes, action_to_do_nodes = loActionToDoNodes)
115 115
 
116 116
 
117
-    @expose('pboard.templates.document')
117
+    @expose('pod.templates.document')
118 118
     #@require(predicates.in_group('user', msg=l_('Please login to access this page')))
119 119
     @require(can_read())
120 120
     def document(self, node_id=0, version=0, came_from=lurl('/'), highlight=''):
@@ -161,7 +161,7 @@ class RootController(BaseController):
161 161
             current_user_rights = current_user_rights
162 162
         )
163 163
 
164
-    @expose('pboard.templates.search')
164
+    @expose('pod.templates.search')
165 165
     @require(predicates.in_group('user', msg=l_('Please login to access this page')))
166 166
     def search(self, keywords=''):
167 167
         loCurrentUser   = pld.PODStaticController.getCurrentUser()
@@ -171,7 +171,7 @@ class RootController(BaseController):
171 171
 
172 172
         return dict(search_string=keywords, found_nodes=loFoundNodes)
173 173
 
174
-    @expose('pboard.templates.create_account')
174
+    @expose('pod.templates.create_account')
175 175
     def create_account(self):
176 176
         return dict()
177 177
 

pboard/pboard/controllers/secure.py → pod/pod/controllers/secure.py View File

@@ -4,7 +4,7 @@ from tg import expose, flash
4 4
 from tg.i18n import ugettext as _, lazy_ugettext as l_
5 5
 from tg.predicates import has_permission
6 6
 
7
-from pboard.lib.base import BaseController
7
+from pod.lib.base import BaseController
8 8
 
9 9
 __all__ = ['SecureController']
10 10
 
@@ -15,13 +15,13 @@ class SecureController(BaseController):
15 15
     allow_only = has_permission('manage',
16 16
                                 msg=l_('Only for people with the "manage" permission'))
17 17
     
18
-    @expose('pboard.templates.index')
18
+    @expose('pod.templates.index')
19 19
     def index(self):
20 20
         """Let the user know that's visiting a protected controller."""
21 21
         flash(_("Secure Controller here"))
22 22
         return dict(page='index')
23 23
     
24
-    @expose('pboard.templates.index')
24
+    @expose('pod.templates.index')
25 25
     def some_where(self):
26 26
         """Let the user know that this action is protected too."""
27 27
         return dict(page='some_where')

pboard/pboard/controllers/template.py → pod/pod/controllers/template.py View File

@@ -1,7 +1,7 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 """Fallback controller."""
3 3
 
4
-from pboard.lib.base import BaseController
4
+from pod.lib.base import BaseController
5 5
 from tg import abort
6 6
 
7 7
 __all__ = ['TemplateController']
@@ -9,7 +9,7 @@ __all__ = ['TemplateController']
9 9
 
10 10
 class TemplateController(BaseController):
11 11
     """
12
-    The fallback controller for pboard.
12
+    The fallback controller for pod.
13 13
     
14 14
     By default, the final controller tried to fulfill the request
15 15
     when no other routes match. It may be used to display a template

BIN
pod/pod/i18n/fr_FR/LC_MESSAGES/pboard.mo View File


+ 751 - 0
pod/pod/i18n/fr_FR/LC_MESSAGES/pboard.po View File

@@ -0,0 +1,751 @@
1
+# French (France) translations for pod.
2
+# Copyright (C) 2014 ORGANIZATION
3
+# This file is distributed under the same license as the pod project.
4
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5
+#
6
+msgid ""
7
+msgstr ""
8
+"Project-Id-Version: pod 0.1\n"
9
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
+"POT-Creation-Date: 2014-06-16 00:55+0200\n"
11
+"PO-Revision-Date: 2014-06-16 00:55+0100\n"
12
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+"Language-Team: fr_FR <LL@li.org>\n"
14
+"MIME-Version: 1.0\n"
15
+"Content-Type: text/plain; charset=utf-8\n"
16
+"Content-Transfer-Encoding: 8bit\n"
17
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
+"Generated-By: Babel 1.3\n"
19
+"X-Generator: Poedit 1.5.4\n"
20
+
21
+#: pod/controllers/api.py:40
22
+msgid "You need to login in order to access this ressource"
23
+msgstr "Vous devez vous identifier pour accéder à cette page"
24
+
25
+#: pod/controllers/api.py:185
26
+#, python-format
27
+msgid "Document #%s can't move upper."
28
+msgstr "Le document #%s ne peut pas être remonté"
29
+
30
+#: pod/controllers/api.py:196
31
+#, python-format
32
+msgid "Document #%s can't move lower."
33
+msgstr "Le document #%s ne peut pas être descendu"
34
+
35
+#: pod/controllers/api.py:259
36
+#, python-format
37
+msgid "Document #%s has been deleted"
38
+msgstr "Le document #%s a été supprimé"
39
+
40
+#: pod/controllers/api.py:261
41
+#, python-format
42
+msgid "Document #%s can't be deleted because it is not empty."
43
+msgstr ""
44
+"Le document #%s ne peut pas être supprimé car il possède des sous documents"
45
+
46
+#: pod/controllers/api.py:335
47
+msgid "You can't share a document that doesn't belong to you."
48
+msgstr "Vous ne pouvez pas partager un document qui ne vous appartient pas"
49
+
50
+#: pod/controllers/apipublic.py:20
51
+msgid "Account creation error: please fill all the fields"
52
+msgstr "Erreur à la création du compte : merci de remplir tous les champs"
53
+
54
+#: pod/controllers/apipublic.py:23
55
+msgid "Account creation error: passwords do not match"
56
+msgstr "Erreur à la création du compte : les mots de passe ne concordent pas"
57
+
58
+#: pod/controllers/apipublic.py:28
59
+#, python-format
60
+msgid "Account creation error: account already exist: %s"
61
+msgstr "Erreur à la création du compte : le compte %s existe déjà"
62
+
63
+#: pod/controllers/apipublic.py:33
64
+#, python-format
65
+msgid "Account successfully created: %s"
66
+msgstr "Compte créé avec succès : %s"
67
+
68
+#: pod/controllers/root.py:76
69
+msgid "Wrong credentials"
70
+msgstr "Mauvais identifiant et/ou mot de passe"
71
+
72
+#: pod/controllers/root.py:92
73
+#, python-format
74
+msgid "Welcome back, %s!"
75
+msgstr "Bienvenue %s!"
76
+
77
+#: pod/controllers/root.py:102
78
+msgid "We hope to see you soon!"
79
+msgstr "Nous espérons vous revoir bientôt!"
80
+
81
+#: pod/controllers/root.py:106 pod/controllers/root.py:165
82
+msgid "Please login to access this page"
83
+msgstr "Merci de vous identifier pour accéder à cette page"
84
+
85
+#: pod/controllers/root.py:142
86
+msgid "Document not found"
87
+msgstr "Le document n'a pas été trouvé"
88
+
89
+#: pod/controllers/secure.py:16
90
+msgid "Only for people with the \"manage\" permission"
91
+msgstr "Seulement pour les personnes ayant la permission \"manage\""
92
+
93
+#: pod/controllers/secure.py:21
94
+msgid "Secure Controller here"
95
+msgstr "Contrôleur sécurisé"
96
+
97
+#: pod/lib/helpers.py:25
98
+msgid "This is the current status."
99
+msgstr "C'est le statut actuel"
100
+
101
+#: pod/lib/helpers.py:28
102
+msgid "The item is a normal document, like a howto or a text document."
103
+msgstr "L'élément est un document normal, comme un howto ou un document texte"
104
+
105
+#: pod/lib/helpers.py:30
106
+msgid ""
107
+"The item will be automatically computed as \"in progress\" or \"done\" "
108
+"according to its children status."
109
+msgstr ""
110
+"L'élément sera automatiquement mis en \"En cours\" ou \"Fait\" suivant le "
111
+"statut de ses enfants."
112
+
113
+#: pod/lib/helpers.py:32
114
+msgid "No action done on the item."
115
+msgstr "Aucun changement sur l'élément"
116
+
117
+#: pod/lib/helpers.py:34
118
+msgid "The item is being worked on."
119
+msgstr "L'élément est en cours d'utilisation."
120
+
121
+#: pod/lib/helpers.py:36
122
+msgid "Waiting for some external actions."
123
+msgstr "En attente d'actions externes."
124
+
125
+#: pod/lib/helpers.py:38
126
+msgid "The work associated with the item is finished."
127
+msgstr "L'action associée à l'élément n'est pas terminée."
128
+
129
+#: pod/lib/helpers.py:40
130
+msgid ""
131
+"Close the item if you want not to see it anymore. The data won't be deleted"
132
+msgstr ""
133
+"Fermez l'élément si vous ne voulez plus le voir. Les données ne seront pas "
134
+"supprimées"
135
+
136
+#: pod/lib/helpers.py:42
137
+msgid "This status tells that the item has been deleted."
138
+msgstr "Ce status indique que l'élément a été supprimé."
139
+
140
+#: pod/model/data.py:372
141
+msgid "Titleless Document"
142
+msgstr "Document sans titre"
143
+
144
+#: pod/templates/about.mak:15
145
+msgid "Simple tool, flexible data."
146
+msgstr "Simple tool, flexible data."
147
+
148
+#: pod/templates/about.mak:53
149
+msgid "Improving pod"
150
+msgstr "Améliorer pod"
151
+
152
+#: pod/templates/about.mak:55
153
+msgid " is a piece of software developed with <u>user needs</u> in mind."
154
+msgstr ""
155
+"est un logiciel dévelopé avec <u>les besoin de l'utilisateur</u> à l'esprit."
156
+
157
+#: pod/templates/about.mak:56
158
+msgid "It means that we need:"
159
+msgstr "Cela signifie que nous avons besoin de :"
160
+
161
+#: pod/templates/about.mak:58
162
+msgid "your feedback,"
163
+msgstr "vos retours,"
164
+
165
+#: pod/templates/about.mak:59
166
+msgid "you to ask questions,"
167
+msgstr "vos questions,"
168
+
169
+#: pod/templates/about.mak:60
170
+msgid "your feature requests,"
171
+msgstr "savoir quelles fonctionnalités vous voudriez,"
172
+
173
+#: pod/templates/about.mak:61
174
+msgid "you to tell us what's cool and what's wrong."
175
+msgstr "que vous nous disiez ce qui est bien ou pas."
176
+
177
+#: pod/templates/about.mak:72
178
+msgid "The author"
179
+msgstr "The author"
180
+
181
+#: pod/templates/about.mak:79
182
+msgid "I'm 35 years old,"
183
+msgstr "I'm 35 years old,"
184
+
185
+#: pod/templates/about.mak:80
186
+msgid "I'm a skilled software engineer,"
187
+msgstr "I'm a skilled software engineer,"
188
+
189
+#: pod/templates/about.mak:81
190
+msgid "I live in France, near Grenoble."
191
+msgstr "I live in France, near Grenoble."
192
+
193
+#: pod/templates/about.mak:99
194
+msgid "email us"
195
+msgstr "email us"
196
+
197
+#: pod/templates/about.mak:100
198
+msgid "and we will reply to you."
199
+msgstr "and we will reply to you."
200
+
201
+#: pod/templates/about.mak:101
202
+msgid "Thank you."
203
+msgstr "Thank you."
204
+
205
+#: pod/templates/create_account.mak:5
206
+msgid "Create account"
207
+msgstr "Créer un compte"
208
+
209
+#: pod/templates/dashboard.mak:15
210
+msgid "What's hot!"
211
+msgstr "Quoi de neuf?"
212
+
213
+#: pod/templates/dashboard.mak:17
214
+msgid "No hot stuff for today."
215
+msgstr "Rien de neuf aujourd'hui."
216
+
217
+#: pod/templates/dashboard.mak:30 pod/templates/dashboard.mak:57
218
+msgid "last modification"
219
+msgstr "dernière modification"
220
+
221
+#: pod/templates/dashboard.mak:42
222
+msgid "Actions to do"
223
+msgstr "Actions à faire"
224
+
225
+#: pod/templates/dashboard.mak:44
226
+msgid "No document requiring action."
227
+msgstr "Aucun document ne requière d'action."
228
+
229
+#: pod/templates/dashboard.mak:72
230
+msgid "Latest operations"
231
+msgstr "Derniers changements"
232
+
233
+#: pod/templates/dashboard.mak:74
234
+msgid "No activity found"
235
+msgstr "Pas de changements trouvés"
236
+
237
+#: pod/templates/dashboard.mak:94
238
+msgid "created"
239
+msgstr "créé"
240
+
241
+#: pod/templates/dashboard.mak:96
242
+msgid "updated"
243
+msgstr "mis à jour"
244
+
245
+#: pod/templates/document-widgets-tabs.mak:5
246
+msgid "Revisions"
247
+msgstr "Révisions"
248
+
249
+#: pod/templates/document-widgets-tabs.mak:18
250
+msgid "Share options"
251
+msgstr "Options de partage"
252
+
253
+#: pod/templates/document-widgets-tabs.mak:21
254
+msgid "This document is not shared"
255
+msgstr "Ce document n'est pas partagé"
256
+
257
+#: pod/templates/document-widgets-tabs.mak:23
258
+msgid "This document is shared."
259
+msgstr "Ce document est partagé"
260
+
261
+#: pod/templates/document-widgets-tabs.mak:31
262
+#: pod/templates/master.mak:155
263
+msgid "Groups"
264
+msgstr "Groupes"
265
+
266
+#: pod/templates/document-widgets-tabs.mak:52
267
+msgid "Individual users"
268
+msgstr "Utilisateurs"
269
+
270
+#: pod/templates/document-widgets-tabs.mak:92
271
+msgid "Edit share options"
272
+msgstr "Éditer les options de partage"
273
+
274
+#: pod/templates/document-widgets-tabs.mak:118
275
+msgid "Share document with collaborators."
276
+msgstr "Partager le document avec des collaborateurs."
277
+
278
+#: pod/templates/document-widgets-tabs.mak:121
279
+msgid "Select read and write access for each group or people..."
280
+msgstr ""
281
+"Sélectionnez l'accès en \"lecture\" ou \"écriture\" pour chaque groupe ou "
282
+"personne ..."
283
+
284
+#: pod/templates/document-widgets-tabs.mak:171
285
+msgid "Group"
286
+msgstr "Groupe"
287
+
288
+#: pod/templates/document-widgets-tabs.mak:172
289
+#: pod/templates/document-widgets-tabs.mak:203
290
+msgid "Access"
291
+msgstr "Accès"
292
+
293
+#: pod/templates/document-widgets-tabs.mak:202
294
+msgid "Individual Users"
295
+msgstr "Utilisateurs individuels"
296
+
297
+#: pod/templates/document-widgets-tabs.mak:260
298
+#: pod/templates/document-widgets.mak:335
299
+#: pod/templates/document-widgets.mak:412
300
+#: pod/templates/document-widgets.mak:487
301
+#: pod/templates/document-widgets.mak:561
302
+#: pod/templates/document-widgets.mak:662 pod/templates/pod.mak:46
303
+msgid "Cancel"
304
+msgstr "Abandonner"
305
+
306
+#: pod/templates/document-widgets-tabs.mak:263
307
+#: pod/templates/document-widgets.mak:338
308
+#: pod/templates/document-widgets.mak:415
309
+#: pod/templates/document-widgets.mak:490
310
+#: pod/templates/document-widgets.mak:564
311
+#: pod/templates/document-widgets.mak:665
312
+msgid "Save changes"
313
+msgstr "Sauvergarder"
314
+
315
+#: pod/templates/document-widgets-tabs.mak:369
316
+#: pod/templates/document-widgets.mak:686
317
+msgid "Attachments"
318
+msgstr "Pièces jointes"
319
+
320
+#: pod/templates/document-widgets-tabs.mak:372
321
+msgid "There is currently no attachment."
322
+msgstr "Il n'y a pas de pièces jointes pour le moment."
323
+
324
+#: pod/templates/document-widgets-tabs.mak:373
325
+msgid " Attach first file"
326
+msgstr "Joindre le premier fichier"
327
+
328
+#: pod/templates/document-widgets-tabs.mak:375
329
+msgid " Attach a file"
330
+msgstr "Joindre un fichier"
331
+
332
+#: pod/templates/document-widgets-tabs.mak:385
333
+msgid "Download the file"
334
+msgstr "Télécharger le fichier"
335
+
336
+#: pod/templates/document-widgets-tabs.mak:393
337
+msgid "View the attachment"
338
+msgstr "Voir les pièces jointe"
339
+
340
+#: pod/templates/document-widgets-tabs.mak:404
341
+msgid "Sub-documents"
342
+msgstr "Sous documents"
343
+
344
+#: pod/templates/document-widgets-tabs.mak:407
345
+msgid "There is currently no child documents."
346
+msgstr "Il n'y a pas de sous documents pour le moment."
347
+
348
+#: pod/templates/document-widgets-tabs.mak:409
349
+msgid "Add a document"
350
+msgstr "Ajouter un document"
351
+
352
+#: pod/templates/document-widgets-tabs.mak:428
353
+#: pod/templates/document-widgets.mak:683
354
+msgid "Calendar"
355
+msgstr "Calendrier"
356
+
357
+#: pod/templates/document-widgets-tabs.mak:431
358
+msgid "The calendar is empty."
359
+msgstr "Le calendrier est vide."
360
+
361
+#: pod/templates/document-widgets-tabs.mak:432
362
+msgid " Add first event"
363
+msgstr "Ajouter le premier évènement"
364
+
365
+#: pod/templates/document-widgets-tabs.mak:434
366
+msgid " Add an event"
367
+msgstr "Ajouter un évènement"
368
+
369
+#: pod/templates/document-widgets-tabs.mak:468
370
+#: pod/templates/document-widgets.mak:684
371
+msgid "Address book"
372
+msgstr "Carnet d'adresses"
373
+
374
+#: pod/templates/document-widgets-tabs.mak:470
375
+msgid "The address book is empty."
376
+msgstr "Le carnet d'adresses est vide"
377
+
378
+#: pod/templates/document-widgets-tabs.mak:471
379
+msgid "Add first contact"
380
+msgstr "Ajouter le premier contact"
381
+
382
+#: pod/templates/document-widgets-tabs.mak:473
383
+msgid "Add a contact"
384
+msgstr "Ajouter un contact"
385
+
386
+#: pod/templates/document-widgets-tabs.mak:494
387
+#: pod/templates/document-widgets.mak:685
388
+msgid "Comment thread"
389
+msgstr "Fil de discussions"
390
+
391
+#: pod/templates/document-widgets-tabs.mak:497
392
+msgid "The comment thread is empty."
393
+msgstr "Le fil de discussion est vide"
394
+
395
+#: pod/templates/document-widgets-tabs.mak:505
396
+msgid "Add a comment"
397
+msgstr "Ajouter un commentaire"
398
+
399
+#: pod/templates/document-widgets-tabs.mak:520
400
+msgid "the"
401
+msgstr "le"
402
+
403
+#: pod/templates/document-widgets-tabs.mak:522
404
+msgid "at"
405
+msgstr "à"
406
+
407
+#: pod/templates/document-widgets-tabs.mak:530
408
+msgid "Shared comment. Click to make private."
409
+msgstr "Commentaire partagé. Cliquez pour rendre privé."
410
+
411
+#: pod/templates/document-widgets-tabs.mak:532
412
+msgid "Private comment. Click to share."
413
+msgstr "Commentaire privé. Cliquez pour partager."
414
+
415
+#: pod/templates/document-widgets-tabs.mak:550
416
+msgid "Write your comment below:"
417
+msgstr "Écrivez votre commentaire ici :"
418
+
419
+#: pod/templates/document-widgets-tabs.mak:554
420
+msgid "Share this comment"
421
+msgstr "Partager ce commentaire"
422
+
423
+#: pod/templates/document-widgets-tabs.mak:558
424
+msgid "Add first comment"
425
+msgstr "Ajouter le premier commentaire"
426
+
427
+#: pod/templates/document-widgets-tabs.mak:560
428
+#: pod/templates/document-widgets.mak:103
429
+msgid "Comment"
430
+msgstr "Commentaire"
431
+
432
+#: pod/templates/document-widgets.mak:9
433
+msgid "Home"
434
+msgstr "Accueil"
435
+
436
+#: pod/templates/document-widgets.mak:56
437
+msgid "Change status"
438
+msgstr "Changer le statut"
439
+
440
+#: pod/templates/document-widgets.mak:63
441
+msgid "Current status is..."
442
+msgstr "Le statut actuel est ..."
443
+
444
+#: pod/templates/document-widgets.mak:72
445
+msgid "Change to..."
446
+msgstr "Changer en ..."
447
+
448
+#: pod/templates/document-widgets.mak:73
449
+msgid "change the status to..."
450
+msgstr "changer le status en ..."
451
+
452
+#: pod/templates/document-widgets.mak:86
453
+msgid "Add"
454
+msgstr "Ajouter"
455
+
456
+#: pod/templates/document-widgets.mak:92
457
+msgid "Add New..."
458
+msgstr "Ajouter un nouveau ..."
459
+
460
+#: pod/templates/document-widgets.mak:93
461
+msgid "create a totally new item..."
462
+msgstr "créer un nouvel élément ..."
463
+
464
+#: pod/templates/document-widgets.mak:96
465
+msgid "Document"
466
+msgstr "Document"
467
+
468
+#: pod/templates/document-widgets.mak:97
469
+msgid "File"
470
+msgstr "Fichier"
471
+
472
+#: pod/templates/document-widgets.mak:98
473
+#: pod/templates/document-widgets.mak:453
474
+msgid "Event"
475
+msgstr "Évènement"
476
+
477
+#: pod/templates/document-widgets.mak:99
478
+msgid "Contact"
479
+msgstr "Contact"
480
+
481
+#: pod/templates/document-widgets.mak:117
482
+msgid "more ..."
483
+msgstr "plus ..."
484
+
485
+#: pod/templates/document-widgets.mak:121
486
+msgid "Advanced actions..."
487
+msgstr "Actions avancées"
488
+
489
+#: pod/templates/document-widgets.mak:122
490
+msgid "power user actions..."
491
+msgstr "Actions avancées ..."
492
+
493
+#: pod/templates/document-widgets.mak:127
494
+msgid "Move"
495
+msgstr "Déplacer"
496
+
497
+#: pod/templates/document-widgets.mak:128
498
+msgid "Delete"
499
+msgstr "Supprimer"
500
+
501
+#: pod/templates/document-widgets.mak:128
502
+msgid "Delete the current document"
503
+msgstr "Supprimer le document actuel"
504
+
505
+#: pod/templates/document-widgets.mak:178
506
+#: pod/templates/document-widgets.mak:379
507
+msgid "Title"
508
+msgstr "Titre"
509
+
510
+#: pod/templates/document-widgets.mak:184
511
+#: pod/templates/document-widgets.mak:314
512
+msgid "document title"
513
+msgstr "titre du document"
514
+
515
+#: pod/templates/document-widgets.mak:217
516
+msgid "This document is private"
517
+msgstr "Ce document est privé"
518
+
519
+#: pod/templates/document-widgets.mak:219
520
+msgid "private"
521
+msgstr "privé"
522
+
523
+#: pod/templates/document-widgets.mak:222
524
+msgid "This document is shared"
525
+msgstr "Ce document est partagé"
526
+
527
+#: pod/templates/document-widgets.mak:224
528
+msgid "shared"
529
+msgstr "partagé"
530
+
531
+#: pod/templates/document-widgets.mak:260
532
+msgid "<p>We suggest you to start...<br/><br/></p>"
533
+msgstr "<p>Nous vous suggérons de commencer ...<br /><br /></p>"
534
+
535
+#: pod/templates/document-widgets.mak:263
536
+msgid "by working on existing items"
537
+msgstr "en travaillant sur des éléments existants"
538
+
539
+#: pod/templates/document-widgets.mak:265
540
+msgid "or"
541
+msgstr "ou"
542
+
543
+#: pod/templates/document-widgets.mak:268
544
+msgid "by creating a new document"
545
+msgstr "en créant un nouveau document"
546
+
547
+#: pod/templates/document-widgets.mak:271
548
+msgid "Create"
549
+msgstr "Créer"
550
+
551
+#: pod/templates/document-widgets.mak:323
552
+#: pod/templates/document-widgets.mak:401
553
+#: pod/templates/document-widgets.mak:474
554
+#: pod/templates/document-widgets.mak:548
555
+msgid "Share:"
556
+msgstr "Partager :"
557
+
558
+#: pod/templates/document-widgets.mak:324
559
+#: pod/templates/document-widgets.mak:402
560
+#: pod/templates/document-widgets.mak:475
561
+#: pod/templates/document-widgets.mak:549
562
+msgid "if checked, then copy share properties from current item"
563
+msgstr "si coché, les options de partage seront copiées de l'élément actuel"
564
+
565
+#: pod/templates/document-widgets.mak:385
566
+msgid "this field is optionnal"
567
+msgstr "ce champ est optionnel"
568
+
569
+#: pod/templates/document-widgets.mak:389
570
+msgid "Choose a file..."
571
+msgstr "Choisir un fichier ..."
572
+
573
+#: pod/templates/document-widgets.mak:390
574
+msgid "choose a file..."
575
+msgstr "choisir un fichier ..."
576
+
577
+#: pod/templates/document-widgets.mak:395
578
+msgid "File description (optionnal)"
579
+msgstr "Description du fichier (optionnel)"
580
+
581
+#: pod/templates/document-widgets.mak:457
582
+msgid "Date and time"
583
+msgstr "Date et heure"
584
+
585
+#: pod/templates/document-widgets.mak:464
586
+msgid "Event description:"
587
+msgstr "Description de l'évènement :"
588
+
589
+#: pod/templates/document-widgets.mak:530
590
+msgid "Contact name and firstname"
591
+msgstr "Nom et prénom du contact"
592
+
593
+#: pod/templates/document-widgets.mak:536
594
+msgid "name, firstname, title..."
595
+msgstr "nom, prénom, titre ..."
596
+
597
+#: pod/templates/document-widgets.mak:541
598
+msgid "Address, phone, email, company..."
599
+msgstr "Adresse, téléphone, email, entreprise ..."
600
+
601
+#: pod/templates/document-widgets.mak:596
602
+msgid "Select the destination:"
603
+msgstr "Sélectionnez la destination :"
604
+
605
+#: pod/templates/document-widgets.mak:682
606
+msgid "Subdocuments"
607
+msgstr "Sous documents"
608
+
609
+#: pod/templates/document-widgets.mak:687
610
+msgid "Access Management"
611
+msgstr "Gestion des droits"
612
+
613
+#: pod/templates/document-widgets.mak:688
614
+msgid "History"
615
+msgstr "Historique"
616
+
617
+#: pod/templates/document-widgets.mak:715
618
+msgid "Content explorer"
619
+msgstr "Explorateur de contenu"
620
+
621
+#: pod/templates/document-widgets.mak:799
622
+msgid "There is no content yet."
623
+msgstr "Il n'y a pas de contenu pour le moment."
624
+
625
+#: pod/templates/document-widgets.mak:800
626
+msgid "Create a topic"
627
+msgstr "Créer un sujet"
628
+
629
+#: pod/templates/document.mak:15
630
+msgid "Toggle view mode [narrow, medium, large]"
631
+msgstr "Changer la vue [étroite, médium, large]"
632
+
633
+#: pod/templates/document.mak:16
634
+msgid "Toggle view mode: narrow"
635
+msgstr "Changer la vue : étroite"
636
+
637
+#: pod/templates/document.mak:17
638
+msgid "Toggle view mode: medium"
639
+msgstr "Changer la vue : médium"
640
+
641
+#: pod/templates/document.mak:18
642
+msgid "Toggle view mode: large"
643
+msgstr "Changer la vue : large"
644
+
645
+#: pod/templates/document.mak:61
646
+msgid "New Sub-document"
647
+msgstr "Nouveau sous document"
648
+
649
+#: pod/templates/document.mak:62
650
+msgid "Add an event"
651
+msgstr "Ajouter un évènement"
652
+
653
+#: pod/templates/document.mak:63
654
+msgid "Add a new contact"
655
+msgstr "Ajouter un nouveau contact"
656
+
657
+#: pod/templates/document.mak:64
658
+msgid "Add a new file"
659
+msgstr "Ajouter un nouveau fichier"
660
+
661
+#: pod/templates/document.mak:65
662
+msgid "Move the document"
663
+msgstr "Déplacer le document"
664
+
665
+#: pod/templates/index.mak:30
666
+msgid "Remember me"
667
+msgstr "Se souvenir de moi"
668
+
669
+#: pod/templates/index.mak:38
670
+msgid "Welcome, "
671
+msgstr "Bienvenue,"
672
+
673
+#: pod/templates/index.mak:39
674
+msgid ""
675
+"Click on <a href=\"{0}\">Document</a> in the top menu to access you data."
676
+msgstr ""
677
+"Cliquez sur <a href=\"{0}\">Document</a> dans le menu du haut pour accéder à "
678
+"vos données."
679
+
680
+#: pod/templates/index.mak:53
681
+msgid "Text documents"
682
+msgstr "Documents texte"
683
+
684
+#: pod/templates/index.mak:54
685
+msgid "Events"
686
+msgstr "Évènements"
687
+
688
+#: pod/templates/index.mak:55
689
+msgid "Contacts"
690
+msgstr "Contacts"
691
+
692
+#: pod/templates/index.mak:56
693
+msgid "Comments"
694
+msgstr "Commentaires"
695
+
696
+#: pod/templates/index.mak:57
697
+msgid "Files"
698
+msgstr "Fichiers"
699
+
700
+#: pod/templates/master.mak:60
701
+msgid "collaborative work  ♦  improved efficiency  ♦  full traceability"
702
+msgstr "collaborative work  ♦  improved efficiency  ♦  full traceability"
703
+
704
+#: pod/templates/master.mak:93
705
+msgid "Documents"
706
+msgstr "Documents"
707
+
708
+#: pod/templates/master.mak:154
709
+msgid "Users"
710
+msgstr "Utilisateurs"
711
+
712
+#: pod/templates/master.mak:180
713
+msgid "Search"
714
+msgstr "Recherche"
715
+
716
+#: pod/templates/master.mak:190
717
+msgid "Help / About"
718
+msgstr "Aide/A propos"
719
+
720
+#: pod/templates/pod.mak:43
721
+msgid "Edit"
722
+msgstr "Éditer"
723
+
724
+#: pod/templates/pod.mak:50 pod/templates/pod.mak:52
725
+msgid "New"
726
+msgstr "Nouveau"
727
+
728
+#: pod/templates/pod.mak:83
729
+msgid "Create an account"
730
+msgstr "Créer un compte"
731
+
732
+#: pod/templates/search.mak:13
733
+msgid "Search again"
734
+msgstr "Chercher de nouveau"
735
+
736
+#: pod/templates/search.mak:22
737
+msgid "Results"
738
+msgstr "Résultats"
739
+
740
+#: pod/templates/search.mak:83
741
+msgid "No data found for keywords:"
742
+msgstr "Aucune correspondance pour les mots clés :"
743
+
744
+#~ msgid "You have no document yet."
745
+#~ msgstr "Vous n'avez pas de document pour le moment."
746
+
747
+#~ msgid "Move up"
748
+#~ msgstr "Monter"
749
+
750
+#~ msgid "Move down"
751
+#~ msgstr "Descendre"

pboard/pboard/i18n/ru/LC_MESSAGES/pboard.po → pod/pod/i18n/ru/LC_MESSAGES/pboard.po View File


pboard/pboard/lib/__init__.py → pod/pod/lib/__init__.py View File


pboard/pboard/lib/app_globals.py → pod/pod/lib/app_globals.py View File


pboard/pboard/lib/auth.py → pod/pod/lib/auth.py View File

@@ -1,8 +1,8 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 """Predicates for authorizations"""
3 3
 from tg.predicates import Predicate
4
-from pboard.model import DBSession as session
5
-from pboard.model.auth import Permission, User
4
+from pod.model import DBSession as session
5
+from pod.model.auth import Permission, User
6 6
 import logging as l
7 7
 
8 8
 DIRTY_canReadOrCanWriteSqlQuery = """

pboard/pboard/lib/base.py → pod/pod/lib/base.py View File


pboard/pboard/lib/dbapi.py → pod/pod/lib/dbapi.py View File

@@ -12,9 +12,9 @@ from sqlalchemy.orm import joinedload_all
12 12
 import sqlalchemy.orm as sqlao
13 13
 import sqlalchemy as sqla
14 14
 
15
-from pboard.model import data as pbmd
16
-from pboard.model import auth as pbma
17
-import pboard.model as pbm
15
+from pod.model import data as pbmd
16
+from pod.model import auth as pbma
17
+import pod.model as pbm
18 18
 
19 19
 import tg
20 20
 

pboard/pboard/lib/helpers.py → pod/pod/lib/helpers.py View File

@@ -1,6 +1,6 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
-"""WebHelpers used in pboard."""
3
+"""WebHelpers used in pod."""
4 4
 
5 5
 #from webhelpers import date, feedgenerator, html, number, misc, text
6 6
 from markupsafe import Markup

pboard/pboard/model/__init__.py → pod/pod/model/__init__.py View File

@@ -59,5 +59,5 @@ def init_model(engine):
59 59
     #mapper(Reflected, t_reflected)
60 60
 
61 61
 # Import your model modules here.
62
-from pboard.model.auth import User, Group, Permission
63
-from pboard.model.data import PBNode
62
+from pod.model.auth import User, Group, Permission
63
+from pod.model.data import PBNode

pboard/pboard/model/auth.py → pod/pod/model/auth.py View File

@@ -4,7 +4,7 @@ Auth* related model.
4 4
 
5 5
 This is where the models used by the authentication stack are defined.
6 6
 
7
-It's perfectly fine to re-use this definition in the pboard application,
7
+It's perfectly fine to re-use this definition in the pod application,
8 8
 though.
9 9
 
10 10
 """
@@ -19,7 +19,7 @@ from sqlalchemy import Table, ForeignKey, Column
19 19
 from sqlalchemy.types import Unicode, Integer, DateTime, Boolean
20 20
 from sqlalchemy.orm import relation, relationship, synonym
21 21
 
22
-from pboard.model import DeclarativeBase, metadata, DBSession
22
+from pod.model import DeclarativeBase, metadata, DBSession
23 23
 
24 24
 # This is the association table for the many-to-many relationship between
25 25
 # groups and permissions.

pboard/pboard/model/data.py → pod/pod/model/data.py View File

@@ -21,9 +21,9 @@ from sqlalchemy import orm as sqlao
21 21
 from tg.i18n import ugettext as _, lazy_ugettext as l_
22 22
 
23 23
 import tg
24
-from pboard.model import DeclarativeBase, metadata, DBSession
25
-from pboard.model import auth as pma
26
-from pboard.lib.base import current_user
24
+from pod.model import DeclarativeBase, metadata, DBSession
25
+from pod.model import auth as pma
26
+from pod.lib.base import current_user
27 27
 
28 28
 
29 29
 class PBNodeStatusItem(object):

pboard/pboard/model/model.template → pod/pod/model/model.template View File

@@ -7,7 +7,7 @@ from sqlalchemy import Table, ForeignKey, Column
7 7
 from sqlalchemy.types import Integer, Unicode
8 8
 #from sqlalchemy.orm import relation, backref
9 9
 
10
-from pboard.model import DeclarativeBase, metadata, DBSession
10
+from pod.model import DeclarativeBase, metadata, DBSession
11 11
 
12 12
 
13 13
 class SampleModel(DeclarativeBase):

pboard/pboard/model/serializers.py → pod/pod/model/serializers.py View File

@@ -1,23 +1,30 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 import tg
3
-from pboard.model import data as pmd
3
+from pod.model import data as pmd
4
+
5
+def node_to_dict(node: pmd.PBNode, children_content, new_item_state):
6
+    """
7
+        children_content may be boolean or a list containing json values
8
+    """
9
+    url = tg.url('/document/', dict(node_id=node.node_id)) ## FIXME - 2014-05-27 - Make this more flexible
10
+
11
+    return dict(
12
+        id = node.node_id,
13
+        children = children_content,
14
+        text = node.data_label,
15
+        a_attr = { "href" : url },
16
+        li_attr = { "title": node.data_label },
17
+        type = node.node_type, # this property is understandable by jstree (through "types" plugin)
18
+        state = new_item_state,
19
+        node_status = node.getStatus().getId() # this is not jstree understandable data. This requires a JS 'success' callback
20
+    )
21
+
4 22
 
5 23
 def PBNodeForMenu(func):
6 24
 
7 25
     def process_item(item: pmd.PBNode):
8 26
         """ convert given item into a dictionnary """
9
-        url = tg.url('/document/', dict(node_id=item.node_id)) ## FIXME - 2014-05-27 - Make this more flexible
10
-        print("########## BEFORE ##########")
11
-        new_item = dict(
12
-            id = item.node_id,
13
-            children = item.getChildNb()>0,
14
-            text = item.data_label,
15
-            # parent = item._oParent.node_id if (item._oParent!=None) else '#',
16
-            a_attr = { "href" : url },
17
-            li_attr = { "title": item.data_label }
18
-        )
19
-        print("########## AFTER ##########")
20
-        return new_item
27
+        return node_to_dict(item, item.getChildNb()>0, None)
21 28
 
22 29
     def pre_serialize(*args, **kws):
23 30
         initial_result = func(*args, **kws)
@@ -43,11 +50,10 @@ def NodeTreeItemForMenu(func):
43 50
         """ convert given item into a dictionnary """
44 51
 
45 52
         item = structure_item.node
46
-        url = tg.url('/document/', dict(node_id=item.node_id)) ## FIXME - 2014-05-27 - Make this more flexible
47 53
         children = []
54
+
48 55
         for child_item in structure_item.children:
49 56
             children.append(process_item(child_item, current_node_id))
50
-        # print("########## BEFORE ##########")
51 57
 
52 58
         children_field_value = None
53 59
         if len(children)>0:
@@ -58,21 +64,11 @@ def NodeTreeItemForMenu(func):
58 64
             children_field_value = False
59 65
 
60 66
         new_item_state = dict(
61
-            opened = len(children)>0,
67
+            opened = item.getChildNb()<=0 or len(children)>0,
62 68
             selected = current_node_id!=None and item.node_id==current_node_id,
63 69
         )
64 70
 
65
-        new_item = dict(
66
-            id = item.node_id,
67
-            children = children_field_value,
68
-            text = item.data_label,
69
-            # parent = item._oParent.node_id if (item._oParent!=None) else '#',
70
-            state = new_item_state,
71
-            a_attr = { "href" : url },
72
-            li_attr = { "title": item.data_label }
73
-        )
74
-        # print("########## AFTER ##########")
75
-        return new_item
71
+        return node_to_dict(item, children_field_value, new_item_state)
76 72
 
77 73
     def pre_serialize(*args, **kws):
78 74
         initial_result = func(*args, **kws)

pboard/pboard/public/css/bootstrap-datetimepicker.min.css → pod/pod/public/css/bootstrap-datetimepicker.min.css View File


pboard/pboard/public/css/bootstrap-responsive.min.css → pod/pod/public/css/bootstrap-responsive.min.css View File


pboard/pboard/public/css/bootstrap.css → pod/pod/public/css/bootstrap.css View File


pboard/pboard/public/css/bootstrap.min.css → pod/pod/public/css/bootstrap.min.css View File


File diff suppressed because it is too large
pod/pod/public/css/external/font-awesome-4.1.0/css/font-awesome.min.css


pboard/pboard/public/css/external/font-awesome-4.1.0/fonts/FontAwesome.otf → pod/pod/public/css/external/font-awesome-4.1.0/fonts/FontAwesome.otf View File


pboard/pboard/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.eot → pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.eot View File


pboard/pboard/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.svg → pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.svg View File


pboard/pboard/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf → pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf View File


pboard/pboard/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.woff → pod/pod/public/css/external/font-awesome-4.1.0/fonts/fontawesome-webfont.woff View File


pboard/pboard/public/css/external/google-code-prettify/prettify.css → pod/pod/public/css/external/google-code-prettify/prettify.css View File


pboard/pboard/public/css/glyphicons.css → pod/pod/public/css/glyphicons.css View File


pboard/pboard/public/css/style.css → pod/pod/public/css/style.css View File


pboard/pboard/public/favicon.ico → pod/pod/public/favicon.ico View File


pboard/pboard/public/img/glyphicons-grey.png → pod/pod/public/img/glyphicons-grey.png View File


pboard/pboard/public/img/glyphicons-halflings-white.original.png → pod/pod/public/img/glyphicons-halflings-white.original.png View File


pboard/pboard/public/img/glyphicons-halflings-white.png → pod/pod/public/img/glyphicons-halflings-white.png View File


pboard/pboard/public/img/glyphicons-halflings.original.png → pod/pod/public/img/glyphicons-halflings.original.png View File


pboard/pboard/public/img/glyphicons-halflings.png → pod/pod/public/img/glyphicons-halflings.png View File


pboard/pboard/public/img/glyphicons-white.png → pod/pod/public/img/glyphicons-white.png View File


pboard/pboard/public/img/glyphicons.png → pod/pod/public/img/glyphicons.png View File


pboard/pboard/public/javascript/external/bootstrap-datetimepicker.min.js → pod/pod/public/javascript/external/bootstrap-datetimepicker.min.js View File


pboard/pboard/public/javascript/external/bootstrap-wysiwyg.js → pod/pod/public/javascript/external/bootstrap-wysiwyg.js View File


pboard/pboard/public/javascript/external/bootstrap.js → pod/pod/public/javascript/external/bootstrap.js View File


pboard/pboard/public/javascript/external/bootstrap.min.js → pod/pod/public/javascript/external/bootstrap.min.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-apollo.js → pod/pod/public/javascript/external/google-code-prettify/lang-apollo.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-basic.js → pod/pod/public/javascript/external/google-code-prettify/lang-basic.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-clj.js → pod/pod/public/javascript/external/google-code-prettify/lang-clj.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-css.js → pod/pod/public/javascript/external/google-code-prettify/lang-css.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-dart.js → pod/pod/public/javascript/external/google-code-prettify/lang-dart.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-erlang.js → pod/pod/public/javascript/external/google-code-prettify/lang-erlang.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-go.js → pod/pod/public/javascript/external/google-code-prettify/lang-go.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-hs.js → pod/pod/public/javascript/external/google-code-prettify/lang-hs.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-lisp.js → pod/pod/public/javascript/external/google-code-prettify/lang-lisp.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-llvm.js → pod/pod/public/javascript/external/google-code-prettify/lang-llvm.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-lua.js → pod/pod/public/javascript/external/google-code-prettify/lang-lua.js View File


File diff suppressed because it is too large
pod/pod/public/javascript/external/google-code-prettify/lang-matlab.js


pboard/pboard/public/javascript/external/google-code-prettify/lang-ml.js → pod/pod/public/javascript/external/google-code-prettify/lang-ml.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-mumps.js → pod/pod/public/javascript/external/google-code-prettify/lang-mumps.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-n.js → pod/pod/public/javascript/external/google-code-prettify/lang-n.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-pascal.js → pod/pod/public/javascript/external/google-code-prettify/lang-pascal.js View File


pboard/pboard/public/javascript/external/google-code-prettify/lang-proto.js → pod/pod/public/javascript/external/google-code-prettify/lang-proto.js View File


Some files were not shown because too many files changed in this diff