organize files to serve as a submodule of authentic1

This commit is contained in:
Benjamin Dauvergne 2013-11-06 14:02:24 +01:00
parent c9185caa87
commit 28626d887b
443 changed files with 0 additions and 33880 deletions

339
COPYING
View File

@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

46
INSTALL
View File

@ -1,46 +0,0 @@
w.c.s. - Installation Instructions
==================================
Prerequisites
-------------
- Python 2.5 <http://www.python.org/>
- Quixote 2.5 <http://www.mems-exchange.org/software/quixote/>
- Lasso 2.2 <http://lasso.entrouvert.org/> for Liberty/SAML support
Installation
------------
w.c.s. uses the standard distutils Python package; just run::
python setup.py install
and you're done.
Configuration
-------------
w.c.s. has been tested with Quixote configured through SCGI with Apache and 2
The recommended configuration is to use SCGI version 1.8 or later (as it has
the SCGIMount directive).
SCGI usage requires an additional server to run, 'wcsctl.py start', the Debian
package installs a init.d script automatically.
<VirtualHost *>
ServerAdmin webmaster@example.com
ServerName www.example.com
DocumentRoot /usr/share/wcs/web/
Alias /qo/ /usr/share/wcs/qommon/
SCGIMount / 127.0.0.1:3001
<LocationMatch "^/(css|images|js|qo)/.*">
SCGIHandler off
</LocationMatch>
CustomLog /var/log/apache2/wcs-access.log combined
ErrorLog /var/log/apache2/wcs-error.log
</VirtualHost>

View File

@ -1,10 +0,0 @@
include ChangeLog
include po/Makefile
include po/*.po
include po/*.pot
recursive-include extra/ *.py
recursive-include data/web/ *.html *.css *.png
recursive-include data/themes/default/ *.html *.css *.png *.gif *.jpg *.js *.ezt
recursive-include data/themes/alto/ *.html *.css *.png *.gif *.jpg *.js
recursive-include data/vendor/ *.dat
recursive-include wcs/qommon/static/ *.css *.png *.gif *.jpg *.js

17
NEWS
View File

@ -1,17 +0,0 @@
NEWS
====
1.5 -- October 28th 2009
------------------------
This release adds a user profile page, the possibility to digitally sign
submitted forms, a new field type for tabular data, an interface to upload
custom themes, as well as many improvements and bug fixes to the existing
features.
Many thanks to all contributors.
1.0 -- April 9th 2009
---------------------
First release.

145
README
View File

@ -1,145 +0,0 @@
w.c.s.
======
Description
-----------
w.c.s. is a web application which allows to design and set up online forms. It
gives a user the ability to create web forms easily without requiring any other
skill than familiarity with web surfing. It is released under the GNU GPL
Licence.
Documentation
-------------
* README, as you are doing now;
* INSTALL provides installation procedure, details about software
dependencies and configuration;
Copyright
---------
w.c.s. is copyrighted by Entr'ouvert and is licensed through the GNU General
Public Licence. Read the COPYING file for the complete license text. Read the
AUTHORS file for additional credits.
w.c.s. incorporates some other pieces of code, with their own authors and
copyright notices :
Email bounce detection code (wcs/ctl/Bounces/*) from Mailman:
# http://www.gnu.org/software/mailman/
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
Some artwork from GTK+:
# http://www.gtk.org/
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later
# version.
Some artwork from Dotclear:
# http://www.dotclear.net
#
# DotClear is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
Universal Feed Parser:
# __license__ = """Copyright (c) 2002-2007, Mark Pilgrim, All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE."""
Timeout Socket:
# Copyright 2000,2001 by Timothy O'Malley <timo@alum.mit.edu>
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software
# and its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and that both that copyright notice and this permission
# notice appear in supporting documentation, and that the name of
# Timothy O'Malley not be used in advertising or publicity
# pertaining to distribution of the software without specific, written
# prior permission.
#
# Timothy O'Malley DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL Timothy O'Malley BE LIABLE FOR
# ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
jQuery JavaScript Library:
# Copyright (c) 2009 John Resig
# Dual licensed under the MIT and GPL licenses.
# http://docs.jquery.com/License
jQuery kiketable.colsizable plugin:
# Copyright (c) 2007-2009 Enrique Meléndez Estrada
# Dual licensed under the MIT and GPL licenses:
Tabs - jQuery plugin for accessible, unobtrusive tabs:
# Copyright (c) 2006 Klaus Hartl (stilbuero.de)
# Dual licensed under the MIT and GPL licenses:
TableSorter 2.0 - Client-side table sorting with ease!:
# Copyright (c) 2007 Christian Bach
# Dual licensed under the MIT and GPL licenses:
SimpleModal @VERSION - jQuery Plugin:
# Copyright (c) 2007 Eric Martin - http://ericmmartin.com
#
# Dual licensed under the MIT (MIT-LICENSE.txt)
# and GPL (GPL-LICENSE.txt) licenses.
WYSIWYG - jQuery plugin 0.3
# Copyright (c) 2008 Juan M Martinez
# http://plugins.jquery.com/project/jWYSIWYG
#
# Dual licensed under the MIT and GPL licenses:
Treeview 1.4 - jQuery plugin to hide and show branches of a tree
# Copyright (c) 2007 Jörn Zaefferer
#
# Dual licensed under the MIT and GPL licenses:
jQuery Date Picker:
# Copyright (c) 2007 Kelvin Luck (http://www.kelvinluck.com/)
# Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
# and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
bgiframe:
# Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
# Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
# and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.

View File

@ -1 +0,0 @@
../wcs/qommon/static/

View File

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<theme name="alto" version="1.0">
<label>Alto</label>
<desc>Alto theme</desc>
<author>Frederic Peters (original Dotclear theme (alto studio) by David Jubert)</author>
</theme>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,20 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>[page_title]</title>
<link rel="stylesheet" type="text/css" href="[css]"/>
[script]
</head>
<body[if-any onload] onload="[onload]"[end]>
<div id="page">
<div id="top"> <h1>[if-any title][title][else][site_name][end]</h1> </div>
<div id="main-content">
[prelude]
[if-any breadcrumb]<p id="breadcrumb">Vous &ecirc;tes ici : [breadcrumb]</p>[end]
[body]
</div>
<div id="footer"></div>
</div>
</body>
</html>

View File

@ -1,234 +0,0 @@
/* adapted from alto dotclear theme */
@import url(/qo/css/qommon.css);
html, body {
background: #CCCCCC;
font-family: sans-serif;
color: #333333;
margin: 0;
padding: 0;
text-align: center;
height: 100%;
margin-bottom: 1px;
}
fieldset {
border: none;
}
label {
cursor: pointer;
cursor: hand;
}
img {
border: 0;
}
input,textarea {
border: 1px solid #999;
}
textarea {
width: 99%;
}
a {
color: #000;
text-decoration : none;
}
a:hover {
color: #0273B9;
text-decoration : underline;
}
a:visited {
color: #0273B9;
text-decoration : none;
}
#page {
background: #fff url(img/page.jpg) repeat-y center top;
color: inherit;
width: 886px;
margin: 0 auto;
text-align: left;
padding: 0px;
}
#top {
margin: 0;
padding: 0;
background: #CCCCCC url(img/top.jpg) no-repeat left top;
margin-bottom: 2em;
}
#top h1 {
width: 706px;
margin: 0 auto;
padding-top: 70px;
}
#steps {
float: right;
width: 204px;
padding: 0;
margin: 0 -20px 0 20px;
background: white;
border: 1px solid #bfbfbf;
color: #333333;
background: #e6e6e6;
-moz-border-radius: 6px;
text-align: left;
}
#footer {
width: 886px;
height: 123px;
background: #CCCCCC url(img/bottom.jpg) no-repeat left top;
margin: 0;
margin-top: 1em;
color: #666;
clear: both;
}
#footer p {
width: 706px;
margin: 0 auto;
padding-top: 24px;
text-align: right;
font-size: 80%;
}
#main-content {
width: 735px;
padding-left: 65px;
text-align: justify;
}
div#steps ol {
list-style: none;
margin: 0;
padding: 0.5em;
}
div#steps li {
display: block;
border: 1px solid #ddd;
margin: 0.5em 0;
background: #eee;
color: #aaa;
}
#steps span.marker {
padding: 0 1ex 0 1ex;
font-weight: bold;
color: white;
text-align: center;
background: #ddd;
}
#steps li.current span.marker {
background: #0273b9;
}
#steps li.current {
font-weight: bold;
border: 1px solid #333333;
}
#steps li.current span.label {
color: #333333;
}
#steps ol ul {
margin-right: 1em;
font-size: 90%;
}
#steps ol ul li {
padding: 0 2px;
font-weight: normal;
margin-left: -1ex;
}
#steps ol ul li.current {
border-color: inherit;
color: #333333;
}
div.widget {
clear: none;
margin-bottom: 1.5em;
}
hr {
visibility: hidden;
}
textarea {
max-width: 455px;
}
p#breadcrumb {
background: #e6e6e6;
-moz-border-radius: 6px;
width: 750px;
padding: 3px;
font-size: 90%;
border: 1px solid #bfbfbf;
}
div#receipt {
}
div#receipt span.label {
font-weight: bold;
display: block;
}
div#receipt span.value {
display: block;
margin-left: 1em;
}
form div.page,
div#receipt div.page {
border: 1px solid #bfbfbf;
padding: 1ex;
margin-bottom: 1em;
}
form div.page p,
div#receipt div.page p {
margin-top: 0;
}
form div.page h3,
div#receipt div.page h3 {
margin: 0;
margin-bottom: 1ex;
}
p#receiver {
margin: 0;
margin-left: 2em;
margin-top: -0.7em;
margin-bottom: 1em;
padding: 2px 5px;
font-weight: bold;
}
table#listing {
background: white;
border: 1px solid #888;
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<theme name="default" version="1.0">
<label>Default</label>
<desc>Default theme</desc>
<author>Frederic Peters &amp; Dotclear Team</author>
</theme>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
@import url(../qo/css/sofresh.css);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,18 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>w.c.s.</title>
<link rel="stylesheet" type="text/css" href="/css/wcs.css"/>
<style type="text/css">
p#wcs {
margin-top: 30%;
text-align: center;
font-weight: bold;
}
</style>
</head>
<body>
<p id="wcs">
w.c.s
</p>
</body>
</html>

View File

@ -1,179 +0,0 @@
AbachoBOT
abcdatos_botlink
http://www.abcdatos.com/botlink/
AESOP_com_SpiderMan
ah-ha.com crawler (crawler@ah-ha.com)
ia_archiver
Scooter
Mercator
Scooter2_Mercator_3-1.0
roach.smo.av.com-1.0
Tv<nn>_Merc_resh_26_1_D-1.0
AltaVista-Intranet
jan.gelin@av.com
FAST-WebCrawler
crawler@fast.no
Wget
Acoon Robot
antibot
Atomz
AxmoRobot
Buscaplus Robi
http://www.buscaplus.com/robi/
CanSeek/
support@canseek.ca
ChristCRAWLER
http://www.christcrawler.com/
Clushbot
http://www.clush.com/bot.html
Crawler
admin@crawler.de
DaAdLe.com ROBOT/
RaBot
Agent-admin/ phortse@hanmail.net
contact/jylee@kies.co.kr
RaBot
Agent-admin/ webmaster@kisco.go.kr
DeepIndex
DittoSpyder
Jack
EARTHCOM.info
Speedy Spider
ArchitextSpider
ArchitectSpider
EuripBot
Arachnoidea
arachnoidea@euroseek.net
EZResult
Fast PartnerSite Crawler
FAST Data Search Crawler
FAST Data Search Document Retriever
KIT-Fireball
france.misesajour.com
FyberSearch
GalaxyBot
http://www.galaxy.com/galaxybot.html
geckobot
GenCrawler
GeonaBot
getRAX
Googlebot
googlebot@googlebot.com
http://googlebot.com/
moget/2.0
moget@goo.ne.jp
Aranha
Slurp.so/1.0
slurp@inktomi.com
Slurp/2.0j
slurp@inktomi.com
www.inktomisearch.com
Slurp/2.0-KiteHourly
slurp@inktomi.com;
www.inktomi.com/slurp.html
Slurp/2.0-OwlWeekly
spider@aeneid.com
www.inktomi.com/slurp.html
Slurp/3.0-AU
slurp@inktomi.com
Toutatis 2.5-2
Hubater
http://www.almaden.ibm.com/cs/crawler
IlTrovatore-Setaccio
IncyWincy
UltraSeek
InfoSeek Sidewinder
Mole2/1.0
webmaster@intags.de
MP3Bot
C-PBWF-ip3000.com-crawler
ip3000.com-crawler
http://www.istarthere.com
spider@istarthere.com
Knowledge.com/
kuloko-bot/0.2
LNSpiderguy
Linknzbot
lookbot
MantraAgent
NetResearchServer
www.loopimprovements.com/robot.html
Lycos_Spider_(T-Rex)
JoocerBot
HenryTheMiragoRobot
MojeekBot
mozDex/
MSNBOT/0.1
http://search.msn.com/msnbot.htm)
Navadoo Crawler
Gulliver
ObjectsSearch/0.01
PicoSearch/
PJspider
DIIbot
nttdirectory_robot
super-robot@super.navi.ocn.ne.jp
griffon
griffon@super.navi.ocn.ne.jp
Spider/maxbot.com
admin@maxbot.com
various (fakes agent on each access)
gazz/1.0
gazz@nttrd.com
???
NationalDirectory-SuperSpider
dloader(NaverRobot)/
dumrobo(NaverRobot)/
Openfind piranha,Shark
robot-response@openfind.com.tw
Openbot/
psbot
www.picsearch.org/bot.html
CrawlerBoy Pinpoint.com
user<n>.ip3000.com
QweeryBot
http://qweerybot.qweery.com)
AlkalineBOT
SeznamBot
Search-10
Fluffy the spider
info@searchhippo.com)
Scrubby/
asterias
speedfind ramBot xtreme
Kototoi/0.1
SearchByUsa
Searchspider/
SightQuestBot/
http://www.sightquest.com/bot.htm
Spider_Monkey/
Surfnomore Spider v1.1
Robot@SuperSnooper.Com
teoma_agent1
teoma_admin@hawkholdings.com
Teradex_Mapper
mapper@teradex.com
ESISmartSpider
Spider TraficDublu
Tutorial Crawler
http://www.tutorgig.com/crawler
updated/0.1beta
crawler@updated.com
UK Searcher Spider
Vivante Link Checker
appie
Nazilla
www.WebWombat.com.au
marvin/infoseek
marvin-team@webseek.de
MuscatFerret
WhizBang! Lab
ZyBorg
(info@WISEnut.com)
WIRE WebRefiner:
webrefiner@wire.co.uk
WSCbot
Yandex
Yellopet-Spider
libwww-perl
Iron33

2
debian/.cvsignore vendored
View File

@ -1,2 +0,0 @@
authentic
files

48
debian/changelog vendored
View File

@ -1,48 +0,0 @@
wcs (1.5-1) lenny; urgency=low
* New upstream release.
-- Frederic Peters <fpeters@entrouvert.com> Wed, 28 Oct 2009 13:46:35 +0100
wcs (1.4~rc1-1) lenny; urgency=low
* Release Candidate 1, v2
-- Frederic Peters <fpeters@entrouvert.com> Mon, 26 Oct 2009 16:47:36 +0100
wcs (1.4~rc1-0) lenny; urgency=low
* Release Candidate
-- Frederic Peters <fpeters@debian.org> Mon, 26 Oct 2009 14:45:05 +0100
wcs (1.0-0.etch.1) etch; urgency=low
* First real release.
-- Frederic Peters <fpeters@debian.org> Tue, 14 Apr 2009 08:32:50 +0200
wcs (0.4.9svn-0) unstable; urgency=low
* CVS snapshot; no longer using SQLObject...
-- Frederic Peters <fpeters@debian.org> Mon, 5 Sep 2005 19:01:11 +0200
wcs (0.3.9cvs-0) unstable; urgency=low
* CVS snapshot; now using SQLObject.
-- Frederic Peters <fpeters@debian.org> Mon, 22 Aug 2005 15:20:12 +0200
wcs (0.1.9cvs-0) unstable; urgency=low
* CVS snapshot.
-- Frederic Peters <fpeters@debian.org> Thu, 4 Aug 2005 10:51:42 +0200
wcs (0.0.0-0) unstable; urgency=low
* Initial package.
-- Frederic Peters <fpeters@debian.org> Sat, 23 Apr 2005 20:48:19 +0200

1
debian/compat vendored
View File

@ -1 +0,0 @@
4

19
debian/control vendored
View File

@ -1,19 +0,0 @@
Source: wcs
Section: web
Priority: optional
Maintainer: Frederic Peters <fpeters@debian.org>
Build-Depends: python-support (>= 0.4), python-quixote, debhelper (>= 5.0.37.2), gettext
Standards-Version: 3.6.7.0
Homepage: http://wcs.labs.libre-entreprise.org
Package: wcs
Architecture: all
Depends: ${python:Depends}, python-quixote, libapache2-mod-scgi | libapache-mod-scgi, python-scgi, python-libxml2, python-elementtree
Recommends: python-dns, python-m2crypto
XB-Python-Version: ${python:Versions}
Description: web application to design and set up online forms
w.c.s. is a web application which allows to design and set up online forms.
.
It gives a user the ability to create web forms easily without requiring
any other skill than familiarity with web surfing

27
debian/copyright vendored
View File

@ -1,27 +0,0 @@
This package was debianized by Frederic Peters <fpeters@debian.org> on
Wed, 20 Apr 2005 11:10:00 +0200.
Upstream Author: Frederic Peters <fpeters@entrouvert.com>
Copyright (c) 2005 Entr'ouvert;
copyright (c) 2003-2005 dotclear for the graphics.
License is GNU GPL v2 or later plus OpenSSL exception clause.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.
On Debian GNU/Linux systems, the complete text of the GNU General Public
License can be found in `/usr/share/common-licenses/GPL'.

3
debian/dirs vendored
View File

@ -1,3 +0,0 @@
etc/apache2/sites-available
usr/sbin
var/lib/wcs

1
debian/docs vendored
View File

@ -1 +0,0 @@
README

63
debian/rules vendored
View File

@ -1,63 +0,0 @@
#!/usr/bin/make -f
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYTHON=/usr/bin/python
build: build-stamp
build-stamp:
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
cd po && rm -f *.mo
python setup.py clean
rm -rf build
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(PYTHON) setup.py install --prefix=$(CURDIR)/debian/wcs/usr --no-compile
mv $(CURDIR)/debian/wcs/usr/bin/wcsctl.py \
$(CURDIR)/debian/wcs/usr/sbin/wcsctl
rmdir $(CURDIR)/debian/wcs/usr/bin/
cd po && make install prefix=$(CURDIR)/debian/wcs/
cp debian/vhost-apache-wcs $(CURDIR)/debian/wcs/etc/apache2/sites-available
chown www-data.www-data $(CURDIR)/debian/wcs/var/lib/wcs/
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installcron
dh_installdocs
dh_installchangelogs
dh_installinit
dh_link
dh_strip
dh_fixperms -X /var/lib/wcs
dh_pysupport
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

View File

@ -1,15 +0,0 @@
<VirtualHost *>
ServerAdmin webmaster@locahost
ServerName www.example.com
DocumentRoot /usr/share/wcs/web/
Alias /qo/ /usr/share/wcs/qommon/
SCGIMount / 127.0.0.1:3001
<LocationMatch "^/(css|images|js|qo)/.*">
SCGIHandler off
</LocationMatch>
CustomLog /var/log/apache2/wcs-access.log combined
ErrorLog /var/log/apache2/wcs-error.log
</VirtualHost>

10
debian/wcs.cron.daily vendored
View File

@ -1,10 +0,0 @@
#! /bin/sh
NAME=wcs
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
/usr/sbin/wcsctl clean_sessions

96
debian/wcs.init vendored
View File

@ -1,96 +0,0 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: wcs
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start w.c.s. web form manager
# Description: Start w.c.s. web form manager
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="wcs"
NAME=wcs
DAEMON=/usr/sbin/wcsctl
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
WCS_USER=www-data
WCS_GROUP=www-data
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
#
# Function that starts the daemon/service.
#
d_start() {
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background --exec $DAEMON -- start $OPTIONS
}
#
# Function that stops the daemon/service.
#
d_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE
}
#
# Function that sends a SIGHUP to the daemon/service.
#
d_reload() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--make-pidfile --background --signal 1
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
#reload)
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this an "exit 0".
#
# echo -n "Reloading $DESC configuration..."
# d_reload
# echo "done."
#;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -1,8 +0,0 @@
all:
$(MAKE) -C fr
clean:
$(MAKE) -C fr clean
.PHONY: clean

View File

@ -1,9 +0,0 @@
wcs-admin.aux
wcs-admin.html
wcs-admin.log
wcs-admin.out
wcs-admin.pdf
wcs-admin.tex
wcs-admin.toc
figures-no-alpha
figures-no-alpha-stamp

View File

@ -1,34 +0,0 @@
REST2HTML = rst2html
RST2LATEX = ../scripts/rst2latex.py
PDFLATEX = pdflatex
all: wcs-admin.pdf wcs-admin.html
%.html: %.rst
$(REST2HTML) --stylesheet=default.css --link-stylesheet --language=fr $? > $@
figures-no-alpha-stamp:
-rm -rf figures-no-alpha/
mkdir figures-no-alpha/
for F in figures/*.png; do \
../scripts/removealpha.sh $$F figures-no-alpha/`basename $$F`; \
done
touch figures-no-alpha-stamp
%.tex: %.rst figures-no-alpha-stamp
cat $? | sed -e 's/figures\//figures-no-alpha\//' \
-e 's/ ::$$/ : ::/g' \
-e 's/.. section-numbering:://' | $(RST2LATEX) --language=fr > $@
%.pdf: %.tex custom.tex
$(PDFLATEX) $?
logfile=`echo "$@" |sed -r "s/(.*)....$$/\\1/"`.log; while [ -f "$$logfile" -a -n "`grep "Rerun to get cross-references right" $$logfile`" ]; do $(PDFLATEX) $< ; done
clean:
-rm *.aux *.toc *.log *.out
-rm wcs-admin.pdf
-rm wcs-admin.tex
-rm wcs-admin.html
-rm -rf figures-no-alpha figures-no-alpha-stamp
.PHONY: all clean

View File

@ -1,45 +0,0 @@
\usepackage{float,fancyhdr,lscape,sectsty,colortbl,color,lastpage,setspace}
\usepackage[perpage,bottom]{footmisc}
\usepackage[hang]{caption2}
\usepackage{marvosym}
\usepackage{float,url,listings,tocbibind,fancyhdr,calc,placeins}
\usepackage{palatino}
\usepackage[Glenn]{fncychap}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{w.c.s.}
\fancyhead[R]{Guide de l'administrateur}
\fancyfoot[C]{Page \thepage}
\addtolength{\headheight}{1.6pt}
\setlength\parindent{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\setlength\abovecaptionskip{0.1ex}
\makeatletter
\renewcommand{\maketitle}{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\parindent \z@
\reset@font
\null\vfil
\begin{flushleft}
\huge \@title
\end{flushleft}
\par
\hrule height 1pt
\par
\begin{flushright}
\LARGE \@author \par
\end{flushright}
\vskip 60\p@
\vfil\null
\end{titlepage}%
\setcounter{footnote}{0}%
}
\makeatother

View File

@ -1,143 +0,0 @@
body {
font-family: sans-serif;
}
h1 a, h2 a, h3 a, h4 a {
text-decoration: inherit;
color: inherit;
}
pre.literal-block {
background: #eee;
border: 1px inset black;
padding: 2px;
margin: auto 10px;
overflow: auto;
}
h1.title {
text-align: center;
background: #eef;
border: 1px solid #aaf;
letter-spacing: 1px;
}
div.section {
margin-bottom: 2em;
}
div.section h1 {
padding: 0 15px;
background: #eef;
border: 1px solid #aaf;
}
div.section h2 {
padding: 0 15px;
background: #eef;
border: 1px solid #aaf;
}
div.document {
margin-top: 1em;
border-top: 1px solid #aaf;
border-bottom: 1px solid #aaf;
}
div.section p,
div.section ul {
text-align: justify;
}
div.contents {
float: right;
border: 1px solid black;
margin: 1em;
background: #eef;
max-width: 33%;
}
div#building-liberty-services-with-lasso div#table-of-contents {
max-width: inherit;
float: none;
background: white url(lasso.png) bottom right no-repeat;
}
div.contents ul {
padding-left: 1em;
list-style: none;
}
div.contents li {
padding-bottom: 2px;
}
div.contents p {
background: #ddf;
text-align: center;
border-bottom: 1px solid black;
margin: 0;
}
th.docinfo-name {
text-align: right;
padding-right: 0.5em;
}
dd {
margin-bottom: 1ex;
}
table.table {
margin: 1ex 0;
border-spacing: 0px;
}
table.table th {
padding: 0px 1ex;
background: #eef;
font-weight: normal;
}
table.table td {
padding: 0 0.5ex;
}
div.note, div.warning {
padding: 0.3ex;
padding-left: 60px;
min-height: 50px;
margin: 1ex 1em;
}
div.note {
background: #ffa url(note.png) top left no-repeat;
border: 1px solid #fd8;
}
div.warning {
background: #ffd url(warning.png) top left no-repeat;
}
p.admonition-title {
font-weight: bold;
display: inline;
display: none;
padding-right: 1em;
}
div.figure {
margin: 0 auto;
width: 70%;
min-width: 800px;
text-align: center;
}
div.figure p.caption {
font-style: italic;
margin: 1ex 0 2em 0;
text-align: center;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

View File

@ -1,490 +0,0 @@
%%% Copyright Ulf A. Lindgren
%%%
%%% Note Premission is granted to modify this file under
%%% the condition that it is saved using another
%%% file and package name.
%%%
%%% Revision 1.1 (1997)
%%%
%%% Jan. 8th Modified package name base date option
%%% Jan. 22th Modified FmN and FmTi for error in book.cls
%%% \MakeUppercase{#}->{\MakeUppercase#}
%%% Apr. 6th Modified Lenny option to prevent undesired
%%% skip of line.
%%% Nov. 8th Fixed \@chapapp for AMS
%%%
%%% Revision 1.2 (1998)
%%%
%%% Feb. 11th Fixed appendix problem related to Bjarne
%%% Aug. 11th Fixed problem related to 11pt and 12pt
%%% suggested by Tomas Lundberg. THANKS!
%%%
%%% Revision 1.3 (2004)
%%% Sep. 20th problem with frontmatter, mainmatter and
%%% backmatter, pointed out by Lapo Mori
%%%
%%% Revision 1.31 (2004)
%%% Sep. 21th problem with the Rejne definition streched text
%%% caused ugly gaps in the vrule aligned with the title
%%% text. Kindly pointed out to me by Hendri Adriaens
%%%
%%% Revision 1.32 (2005)
%%% Jun. 23th compatibility problem with the KOMA class 'scrbook.cls'
%%% a remedy is a redefinition of '\@schapter' in
%%% line with that used in KOMA. The problem was pointed
%%% out to me by Mikkel Holm Olsen
%%%
%%% Revision 1.33 (2005)
%%% Aug. 9th misspelled ``TWELV'' corrected, the error was pointed
%%% out to me by George Pearson
%%%
%%% Last modified Aug. 9th 2005
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{fncychap}
[2004/09/21 v1.33
LaTeX package (Revised chapters)]
%%%% DEFINITION OF Chapapp variables
\newcommand{\CNV}{\huge\bfseries}
\newcommand{\ChNameVar}[1]{\renewcommand{\CNV}{#1}}
%%%% DEFINITION OF TheChapter variables
\newcommand{\CNoV}{\huge\bfseries}
\newcommand{\ChNumVar}[1]{\renewcommand{\CNoV}{#1}}
\newif\ifUCN
\UCNfalse
\newif\ifLCN
\LCNfalse
\def\ChNameLowerCase{\LCNtrue\UCNfalse}
\def\ChNameUpperCase{\UCNtrue\LCNfalse}
\def\ChNameAsIs{\UCNfalse\LCNfalse}
%%%%% Fix for AMSBook 971008
\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}
%%%%% Fix for Bjarne and appendix 980211
\newif\ifinapp
\inappfalse
\renewcommand\appendix{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\inapptrue%
\renewcommand\@chapapp{\appendixname}%
\renewcommand\thechapter{\@Alph\c@chapter}}
%%%%% Fix for frontmatter, mainmatter, and backmatter 040920
\@ifundefined{@mainmatter}{\newif\if@mainmatter \@mainmattertrue}{}
%%%%%
\newcommand{\FmN}[1]{%
\ifUCN
{\MakeUppercase#1}\LCNfalse
\else
\ifLCN
{\MakeLowercase#1}\UCNfalse
\else #1
\fi
\fi}
%%%% DEFINITION OF Title variables
\newcommand{\CTV}{\Huge\bfseries}
\newcommand{\ChTitleVar}[1]{\renewcommand{\CTV}{#1}}
%%%% DEFINITION OF the basic rule width
\newlength{\RW}
\setlength{\RW}{1pt}
\newcommand{\ChRuleWidth}[1]{\setlength{\RW}{#1}}
\newif\ifUCT
\UCTfalse
\newif\ifLCT
\LCTfalse
\def\ChTitleLowerCase{\LCTtrue\UCTfalse}
\def\ChTitleUpperCase{\UCTtrue\LCTfalse}
\def\ChTitleAsIs{\UCTfalse\LCTfalse}
\newcommand{\FmTi}[1]{%
\ifUCT
{\MakeUppercase#1}\LCTfalse
\else
\ifLCT
{\MakeLowercase#1}\UCTfalse
\else {#1}
\fi
\fi}
\newlength{\mylen}
\newlength{\myhi}
\newlength{\px}
\newlength{\py}
\newlength{\pyy}
\newlength{\pxx}
\def\mghrulefill#1{\leavevmode\leaders\hrule\@height #1\hfill\kern\z@}
\newcommand{\DOCH}{%
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip 20\p@
}
\newcommand{\DOTI}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
\newcommand{\DOTIS}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
%%%%%% SONNY DEF
\DeclareOption{Sonny}{%
\ChNameVar{\Large\sf}
\ChNumVar{\Huge}
\ChTitleVar{\Large\sf}
\ChRuleWidth{0.5pt}
\ChNameUpperCase
\renewcommand{\DOCH}{%
\raggedleft
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTI}[1]{%
\CTV\raggedleft\mghrulefill{\RW}\par\nobreak
\vskip 5\p@
\CTV\FmTi{#1}\par\nobreak
\mghrulefill{\RW}\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTIS}[1]{%
\CTV\raggedleft\mghrulefill{\RW}\par\nobreak
\vskip 5\p@
\CTV\FmTi{#1}\par\nobreak
\mghrulefill{\RW}\par\nobreak
\vskip 40\p@}
}
%%%%%% LENNY DEF
\DeclareOption{Lenny}{%
\ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont}
\ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
\ChTitleVar{\Huge\bfseries\rm}
\ChRuleWidth{1pt}
\renewcommand{\DOCH}{%
\settowidth{\px}{\CNV\FmN{\@chapapp}}
\addtolength{\px}{2pt}
\settoheight{\py}{\CNV\FmN{\@chapapp}}
\addtolength{\py}{1pt}
\settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
\addtolength{\mylen}{1pt}
\settowidth{\pxx}{\CNoV\thechapter}
\addtolength{\pxx}{-1pt}
\settoheight{\pyy}{\CNoV\thechapter}
\addtolength{\pyy}{-2pt}
\setlength{\myhi}{\pyy}
\addtolength{\myhi}{-1\py}
\par
\parbox[b]{\textwidth}{%
\rule[\py]{\RW}{\myhi}%
\hskip -\RW%
\rule[\pyy]{\px}{\RW}%
\hskip -\px%
\raggedright%
\CNV\FmN{\@chapapp}\space\CNoV\thechapter%
\hskip1pt%
\mghrulefill{\RW}%
\rule{\RW}{\pyy}\par\nobreak%
\vskip -\baselineskip%
\vskip -\pyy%
\hskip \mylen%
\mghrulefill{\RW}\par\nobreak%
\vskip \pyy}%
\vskip 20\p@}
\renewcommand{\DOTI}[1]{%
\raggedright
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTIS}[1]{%
\raggedright
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
}
%%%%%%% GLENN DEF
\DeclareOption{Glenn}{%
\ChNameVar{\bfseries\Large\sf}
\ChNumVar{\Huge}
\ChTitleVar{\bfseries\Large\rm}
\ChRuleWidth{1pt}
\ChNameUpperCase
\ChTitleUpperCase
\renewcommand{\DOCH}{%
\settoheight{\myhi}{\CTV\FmTi{Test}}
\setlength{\py}{\baselineskip}
\addtolength{\py}{\RW}
\addtolength{\py}{\myhi}
\setlength{\pyy}{\py}
\addtolength{\pyy}{-1\RW}
\raggedright
\CNV\FmN{\@chapapp}\space\CNoV\thechapter
\hskip 3pt\mghrulefill{\RW}\rule[-1\pyy]{2\RW}{\py}\par\nobreak}
\renewcommand{\DOTI}[1]{%
\addtolength{\pyy}{-4pt}
\settoheight{\myhi}{\CTV\FmTi{#1}}
\addtolength{\myhi}{\py}
\addtolength{\myhi}{-1\RW}
\vskip -1\pyy
\rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt
\raggedleft\CTV\FmTi{#1}\par\nobreak
\vskip 80\p@}
\newlength{\backskip}
\renewcommand{\DOTIS}[1]{%
% \setlength{\py}{10pt}
% \setlength{\pyy}{\py}
% \addtolength{\pyy}{\RW}
% \setlength{\myhi}{\baselineskip}
% \addtolength{\myhi}{\pyy}
% \mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak
% \addtolength{}{}
%\vskip -1\baselineskip
% \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt
% \raggedleft\CTV\FmTi{#1}\par\nobreak
% \vskip 60\p@}
%% Fix suggested by Tomas Lundberg
\setlength{\py}{25pt} % eller vad man vill
\setlength{\pyy}{\py}
\setlength{\backskip}{\py}
\addtolength{\backskip}{2pt}
\addtolength{\pyy}{\RW}
\setlength{\myhi}{\baselineskip}
\addtolength{\myhi}{\pyy}
\mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak
\vskip -1\backskip
\rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 3pt %
\raggedleft\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
}
%%%%%%% CONNY DEF
\DeclareOption{Conny}{%
\ChNameUpperCase
\ChTitleUpperCase
\ChNameVar{\centering\Huge\rm\bfseries}
\ChNumVar{\Huge}
\ChTitleVar{\centering\Huge\rm}
\ChRuleWidth{2pt}
\renewcommand{\DOCH}{%
\mghrulefill{3\RW}\par\nobreak
\vskip -0.5\baselineskip
\mghrulefill{\RW}\par\nobreak
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip -0.5\baselineskip
}
\renewcommand{\DOTI}[1]{%
\mghrulefill{\RW}\par\nobreak
\CTV\FmTi{#1}\par\nobreak
\vskip 60\p@
}
\renewcommand{\DOTIS}[1]{%
\mghrulefill{\RW}\par\nobreak
\CTV\FmTi{#1}\par\nobreak
\vskip 60\p@
}
}
%%%%%%% REJNE DEF
\DeclareOption{Rejne}{%
\ChNameUpperCase
\ChTitleUpperCase
\ChNameVar{\centering\Large\rm}
\ChNumVar{\Huge}
\ChTitleVar{\centering\Huge\rm}
\ChRuleWidth{1pt}
\renewcommand{\DOCH}{%
\settoheight{\py}{\CNoV\thechapter}
\parskip=0pt plus 1pt % Set parskip to default, just in case v1.31
\addtolength{\py}{-1pt}
\CNV\FmN{\@chapapp}\par\nobreak
\vskip 20\p@
\setlength{\myhi}{2\baselineskip}
\setlength{\px}{\myhi}
\addtolength{\px}{-1\RW}
\rule[-1\px]{\RW}{\myhi}\mghrulefill{\RW}\hskip
10pt\raisebox{-0.5\py}{\CNoV\thechapter}\hskip 10pt\mghrulefill{\RW}\rule[-1\px]{\RW}{\myhi}\par\nobreak
\vskip -3\p@% Added -2pt vskip to correct for streched text v1.31
}
\renewcommand{\DOTI}[1]{%
\setlength{\mylen}{\textwidth}
\parskip=0pt plus 1pt % Set parskip to default, just in case v1.31
\addtolength{\mylen}{-2\RW}
{\vrule width\RW}\parbox{\mylen}{\CTV\FmTi{#1}}{\vrule width\RW}\par\nobreak%
\vskip -3pt\rule{\RW}{2\baselineskip}\mghrulefill{\RW}\rule{\RW}{2\baselineskip}%
\vskip 60\p@% Added -2pt in vskip to correct for streched text v1.31
}
\renewcommand{\DOTIS}[1]{%
\setlength{\py}{\fboxrule}
\setlength{\fboxrule}{\RW}
\setlength{\mylen}{\textwidth}
\addtolength{\mylen}{-2\RW}
\fbox{\parbox{\mylen}{\vskip 2\baselineskip\CTV\FmTi{#1}\par\nobreak\vskip \baselineskip}}
\setlength{\fboxrule}{\py}
\vskip 60\p@
}
}
%%%%%%% BJARNE DEF
\DeclareOption{Bjarne}{%
\ChNameUpperCase
\ChTitleUpperCase
\ChNameVar{\raggedleft\normalsize\rm}
\ChNumVar{\raggedleft \bfseries\Large}
\ChTitleVar{\raggedleft \Large\rm}
\ChRuleWidth{1pt}
%% Note thechapter -> c@chapter fix appendix bug
%% Fixed misspelled 12
\newcounter{AlphaCnt}
\newcounter{AlphaDecCnt}
\newcommand{\AlphaNo}{%
\ifcase\number\theAlphaCnt
\ifnum\c@chapter=0
ZERO\else{}\fi
\or ONE\or TWO\or THREE\or FOUR\or FIVE
\or SIX\or SEVEN\or EIGHT\or NINE\or TEN
\or ELEVEN\or TWELVE\or THIRTEEN\or FOURTEEN\or FIFTEEN
\or SIXTEEN\or SEVENTEEN\or EIGHTEEN\or NINETEEN\fi
}
\newcommand{\AlphaDecNo}{%
\setcounter{AlphaDecCnt}{0}
\@whilenum\number\theAlphaCnt>0\do
{\addtocounter{AlphaCnt}{-10}
\addtocounter{AlphaDecCnt}{1}}
\ifnum\number\theAlphaCnt=0
\else
\addtocounter{AlphaDecCnt}{-1}
\addtocounter{AlphaCnt}{10}
\fi
\ifcase\number\theAlphaDecCnt\or TEN\or TWENTY\or THIRTY\or
FORTY\or FIFTY\or SIXTY\or SEVENTY\or EIGHTY\or NINETY\fi
}
\newcommand{\TheAlphaChapter}{%
\ifinapp
\thechapter
\else
\setcounter{AlphaCnt}{\c@chapter}
\ifnum\c@chapter<20
\AlphaNo
\else
\AlphaDecNo\AlphaNo
\fi
\fi
}
\renewcommand{\DOCH}{%
\mghrulefill{\RW}\par\nobreak
\CNV\FmN{\@chapapp}\par\nobreak
\CNoV\TheAlphaChapter\par\nobreak
\vskip -1\baselineskip\vskip 5pt\mghrulefill{\RW}\par\nobreak
\vskip 20\p@
}
\renewcommand{\DOTI}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
\renewcommand{\DOTIS}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
}
\DeclareOption*{%
\PackageWarning{fancychapter}{unknown style option}
}
\ProcessOptions* \relax
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter%%%%% Fix for frontmatter, mainmatter, and backmatter 040920
\DOCH
\fi
\fi
\interlinepenalty\@M
\DOTI{#1}
}}
%%% Begin: To avoid problem with scrbook.cls (fncychap version 1.32)
%%OUT:
%\def\@schapter#1{\if@twocolumn
% \@topnewpage[\@makeschapterhead{#1}]%
% \else
% \@makeschapterhead{#1}%
% \@afterheading
% \fi}
%%IN:
\def\@schapter#1{%
\if@twocolumn%
\@makeschapterhead{#1}%
\else%
\@makeschapterhead{#1}%
\@afterheading%
\fi}
%%% End: To avoid problem with scrbook.cls (fncychap version 1.32)
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\DOTIS{#1}
\vskip 40\p@
}}
\endinput

View File

@ -1,469 +0,0 @@
==================================
w.c.s. - Guide de l'administrateur
==================================
:auteur: Christophe Boutet et Pierre Cros
:contact: cboutet@entrouvert.com
:contact: pcros@entrouvert.com
:copyright: Copyright © 2005-2006 Entr'ouvert
.. contents:: Table des matières
.. section-numbering::
Vue générale
============
w.c.s est un logiciel permettant de générer des formulaires et des consultations
en ligne et de les intégrer dans un workflow. Il est conforme aux standards et
protocoles du consortium `Liberty Alliance`_ grâce à l'utilisation de la
librairie certifiée Lasso_. Il dispose d'une interface d'administration et d'un
back-office soignés permettant une personnalisation poussée et son adaption à de
nombreux usages différents.
Se procurer et installer w.c.s.
===============================
Installation sous Debian_ Sarge
+++++++++++++++++++++++++++++++
Pour fonctionner correctement Authentic s'appuie sur :
* Apache_ (1.3 ou 2, Apache2 recommandé) ;
* Lasso_ (0.6.2) ;
* Quixote_ (2.0) ;
* mod_python_ ou SCGI_ (SCGI_ recommandé).
Installation des paquets
------------------------
En tant que root tapez la commande ::
echo 'deb http://deb.entrouvert.org/ sarge main' \
>> /etc/apt/sources.list
Cette commande ajoute le répertoire qui contient tous les paquets nécessaires
dans votre fichier sources.list.
Toujours en tant que root tapez ::
apt-get update
apt-get install wcs
Tous les paquets nécessaires sont installés.
Si vous ne souhaitez pas modifier votre fichier sources.list vous pouvez
récupérer les paquets nécessaire et les installer manuellement avec la commande
dpkg -i :
* wcs et Quixote 2.0 sur http://wcs.labs.libre-entreprise.org/ ;
* Lasso sur http://lasso.entrouvert.org.
Configuration d'Apache_
-----------------------
Il faut ensuite configurer Apache_ pour avoir un virtual host w.c.s., le
fichier d'example ci-dessous s'appelle vhost-apache-wcs et il est installé par
défaut. Il fonctionne (en remplaçant www.example.com par le nom de domaine que
vous avez choisi pour w.c.s., nous utiliserons wcs.example.com) pour Apache2 et
SCGI_. Vous le trouverez dans le répertoire ``/etc/apache2/sites-enabled`` ::
<VirtualHost *>
ServerAdmin webmaster@locahost
ServerName wcs.example.com
DocumentRoot /usr/share/wcs/web/
<LocationMatch "^/(forms|admin|liberty|login|logout|themes|consultations|token)|^/$">
SCGIServer 127.0.0.1:3001
SCGIHandler On
</LocationMatch>
SSLEngine On
CustomLog /var/log/apache2/wcs-access.log combined
ErrorLog /var/log/apache2/wcs-error.log
</VirtualHost>
Il faut également vous assurer qu'Apache_ est configuré pour supporter le SSL,
vérifiez que dans votre fichier /etc/apache2/ports.conf vous avez une ligne ::
Listen 443
Ajoutez la si elle n'est pas présente.
Ensuite, il s'agit d'activer le module SCGI, s'il ne l'était déjà ::
a2enmod scgi
Vous pouvez ensuite redémarrer Apache_ (toujours en root) ::
/etc/init.d/apache2 restart
Pensez également à modifier votre fichier /etc/hosts le cas échéant. Lorsque wcs
fonctionne, l'interface d'administration est se trouve à l'URL
http://wcs.example.com/admin.
Installation avec une autre distribution Linux
++++++++++++++++++++++++++++++++++++++++++++++
Nous supposons qu'Apache_, SCGI_ ou mod_python_ sont déjà installés. Il faut
ensuite télécharger les sources suivantes et les installer :
* Lasso http://lasso.entrouvert.org ;
* Quixote http://www.mems-exchange.org/software/quixote/ ;
* Authentic http://authentic.labs.libre-entreprise.org/.
Pour installer Authentic, décompressez les sources que vous avez téléchargées
et lancez le script setup.py ::
tar xzf wcs*.tar.gz
cd wcs*
python setup.py install
Il vous faut ensuite configurer correctement Apache_.
Lorsque que w.c.s. fonctionne, l'interface d'administration est accessible à
l'URL http://wcs.example.com/admin.
Installation sous Windows
+++++++++++++++++++++++++
Nous n'avons pas à l'heure actuelle réalisé d'installation de w.c.s. sous
Windows. Mais étant donné que tous les composants nécessaires à son utilisation
fonctionne sur ce système d'exploitation, l'installation est envisageable et
nous seront peut-être amenés à la décrire bientôt. N'hésitez pas à nous faire
part de vos tentatives.
Configuration de base de wcs
============================
Création clés publiques et privées
++++++++++++++++++++++++++++++++++
Si vous ne possédez pas de clés au format pem, il vous faut en créer car elles
seront nécessaire pour configurer wcs comme fournisseur de service. Pour créer
un couple clé publique/clé privée avec OpenSSL_, utilisez ces commandes ::
openssl genrsa -out nom-de-la-clé-privé.pem 2048
Cette commande crée la clé privée sous la forme d'un fichier appelé
nom-de-la-clé-privé.pem. ::
openssl rsa -in nom-de-la-clé-privé-key.pem -pubout\
-out nom-de-la-clé-publique.pem
Cette commande extrait la clé publique de la clé privée sous la forme d'un
fichier appelé nom-de-la-clé-publique.pem.
Configuration de base du fournisseur de service
+++++++++++++++++++++++++++++++++++++++++++++++
Allez sur l'interface d'administration de w.c.s. http://wcs.example.com/admin.
.. figure:: figures/wcs-admin.png
L'interface d'administration lorsqu'aucun utilisateur n'existe encore.
Cliquez sur l'onglet paramètres puis sur le lien « fournisseur de service ».
.. figure:: figures/wcs-admin-settings-liberty_sp.png
Configuration du fournisseur de service wcs
Les deux premiers champs sont remplis automatiquement, ne cherchez pas à les
modifier à moins de savoir réellement ce que vous faites.
Champs :
* Identifiant du fournisseur (un identifiant qui prend nécessairement la
forme d'une URL) ;
* URL de la racine (toutes les URL nécessaires à `Liberty Alliance`_ se
trouvent sur cette racine) ;
* Nom de l'organisation (nom de l'organisation qui gère le fournisseur
d'identité) ;
* Clé privée (clé privée au format pem) ;
* Clé publique (clé publique au format pem) ;
* Domaine commun, pour « Identity Provider Introduction » (L'identity
provider introduction est un mécanisme `Liberty Alliance`_ permettant à un
fournisseur d'identité, pour un nom de domaine particulier, de générer un
cookie sur la machine de l'utilisateur. C'est utile lorsqu'il y a plusieurs
fournisseurs d'identités associés à un fournisseur de service : dans le
cookie on associe les fournisseurs de service d'un domaine, au fournisseur
d'identité qui a délivré le cookie. Cela permet de stipuler au fournisseur de
service : « cet utilisateur utilise le fournisseur d'identité du domaine
».).
Une fois tous ces champs dûment remplis, cliquez sur le bouton valider.
Enregistrement du fichier de metadata
+++++++++++++++++++++++++++++++++++++
Dans l'interface d'administration de wcs vous pouvez récupérer le
fichier de metadata. Cela sera utile par la suite lorsqu'il s'agira de
déclarer wcs fournisseur de service sur un fournisseur d'identité. Procédez
comme suit :
* cliquez sur l'onglet paramètres ;
* vous voyez un lien « Metadata du fournisseur de service ». Faites un clic
droit et « enregistrer la cible du lien sous » ;
* choisissez le nom que vous donnez à ce fichier (par exemple
metadata-wcs.xml) et l'endroit ou vous le sauvegardez.
Déclarer un fournisseur d'identité
++++++++++++++++++++++++++++++++++
Sur l'interface d'administration de w.c.s., cliquez sur l'onglet
paramètres, puis sur le lien « fournisseurs d'identités ». Cliquez encore
sur « nouveau ».
.. figure:: figures/wcs-admin-settings-liberty_idp-new.png
Déclarer un fournisseur d'identité
Compléter les champs suivants :
* Metadata (le fichier de metadata du fournisseur d'identité) ;
* Clé publique (la clé publique du fournisseur d'identité) ;
* Chaîne de certification (certificat contenant toute la chaîne
d'authentification jusqu'au root CA).
Création Administrateur
+++++++++++++++++++++++
Les paramètres Liberty doivent avoir été configurés préablablement à la création
des utilisateurs. Pour créer l'administrateur, allez sur l'interface
d'administration de w.c.s.. Cliquez sur l'onglet « Gestion des identités », puis
sur le lien « Ajouter une identité ».
.. figure:: figures/wcs-admin-users-new.png
Création de la première identité, celle de l'administrateur
Remplissez les champs suivants :
* Nom (saisissez vos Nom et prénom) ;
* Courriel (saisissez votre Courriel) ;
* Compte administrateur (cochez cette case pour que le compte créé soit un
compte administrateur) ;
Cliquez sur valider, le compte administrateur est créé.
Onglet rôles
============
À chaque rôle il faut affecter une ou plusieurs adresses mail, qui seront
destinataires des notifications de remplissage de formulaires par les
utilisateurs.
Onglet utilisateurs
===================
Une fois un rôle créé, il faut aller sur les utilisateurs qui y auront accès au
back-office correspondant et leur affecter le rôle.
On peut également grâce à cet onglet créer des utilisateurs, mais la création
d'un utilisateur à ce niveau n'est pas suffisante, s'agissant d'un contexte
Liberty Alliance, il faut également que l'utilisateur dispose d'un compte sur le
fournisseur d'identité.
Onglet catégories
=================
Il permet de gérer les catégories dans lesquelles les formulaires seront rangés
coté utilisateur, par exemple « vie pratique ».
Par défaut si la catégorie de rangement n'est pas choisie pour un formulaire,
il est classé dans la catégorie divers.
Onglet formulaires
==================
il permet de créer et d'administrer les formulaires :
Création du formulaire
++++++++++++++++++++++
Cliquer sur nouveau
Donner un nom au formulaire, puis fixer la valeur des champs et les nommer:
Les champs : titre, sous titre, et commentaire, ne sont pas de champs de
réponse, ils servent à apporter des compléments d'information sur les
formulaires.
Le champ commentaire, en particulier, permet de préciser le caractère
obligatoire des réponses sur certaines question, matérialisé par un carré rouge,
mais aussi tout type d'information utiles, en revanche, il n'a pas fonction à
servir d'aide directe à la complétion d'une question (traitée par ailleurs).
Les autres champs fixent la nature de la réponse que l'on souhaite voir
apportée : date, adresse mail, bloc de texte, ligne de texte (qui sert également
pour les chiffres), case à cocher, liste, upload de fichier.
Une fois les champs fixés, il faut choisir le destinataire du formulaire.
Ensuite on affecte un rôle au formulaire, par défaut un formulaire est
accessible à tout le monde, on peut restreindre l'accès de manière fine par le
biais des rôles.
La catégorie permet de classer l'affichage du formulaire coté utilisateur.
Il reste alors une série d'options :
- Cochée, la case « Inclure une page de confirmation » permet d'afficher une page
récapitulative coté utilisateur avant qu'il n'envoie le formulaire.
- Cochée, la case « Permettre la discussion » autorise un dialogue via le
back-office entre l'utilisateur et la personne en charge du traitement d'un
formulaire.
- Cochée, la case « accès public » permet à tous les utilisateurs d'un formulaire
de visualiser toutes les réponses apportées.
- Cochée, la case « Envoyer des courriels de notification détaillés » , génère
pour la personne chargée du traitement, un mail reprenant tous les champs
complétés par le demandeur.
- Cochée, la case « Désactiver l'accès au formulaire » ne permet plus la
visualisation, donc la complétion du formulaire concerné coté utilisateur.
Cette option permet de conserver dans la base les formulaires à utilisation
saisonnière.
La validation en bas de page génère la création du formulaire et vous dirige
vers l'écran suivant qui va vous permettre de définir précisement les champs
selon leur type.
Définition des champs
+++++++++++++++++++++
Outre la définition des champs, vous pouvez depuis cet écran modifier leur ordre
par « drag&drop ».
Tous les types de champs disposent d'une série d'options communes:
Obligatoire: il s'agit d'une case à cocher qui fixe le caractère obligatoire
d'une réponse pour l'utilisateur, si la case n'est pas cochée, la réponse à la
question est optionnelle.
Affichage dans les Listings: il n'est pas forcément pertinent que tous les
champs figurent dans le listing de back-office d'autant que dans le cas de
formulaires comprenant beaucoup de champs, le listing n'est pas très lisible si
tous sont affichés. Cette option permet donc, par le biais d'une case à cocher
de fixer, ou non, l'affichage du champ concerné dans le listing back-office.
Remarque: permet d'apporter une aide au répondant, dans le cas d'un champ
adresse électronique: Exemple: francis.kuntz@wanagro.com.
Champ date : Il oblige le répondant à compléter une date de la forme 12/12/2005,
dans le cas des mois ou jours à chiffre unique, le zéro n'est pas obligatoire,
3/6/2005 est admis.
Les dates admises actuellement vont du 01/01/1800 au 31/12/2099, un contrôle est
opéré.
Champ adresse électronique : le répondant devra mentionner une adresse mail, la
vérification s'effectue sur l'arobase.
Champ bloc de texte : la taille du bloc de texte est modifiable, par défaut le
nombre de caractères par ligne est fixé à 20 et le nombre de lignes à 3. Pour un
affichage optimal coté utilisateur, 70 caractères par ligne constitue un bon
compromis. 10 lignes par bloc permet une réponse déjà longue, sachant que si
l'utilisateur dépasse, il aura un ascenseur.
Champ ligne de texte: Par défaut le nombre de caractères d'une ligne est fixé à
20, Le champ texte permet, de base une réponse comprenant des lettres et des
chiffres, si la réponse ne doit comporter que des chiffres, il convient
d'appliquer une règle dans le champ regex prévu à cet effet.
Exemple de règles :
- Tél : 10 chiffres ``^\d{10}$``
- Code postal : 5 chiffres ``^\d{5}$``
- Valeur numérique ``^\d+$``
La valeur Liberty, si elle est complétée autorise le pré-remplissage.
Si vous souhaitez utiliser cette fonction, il est indispensable que vous mettiez
en place un fournisseur de service candle.
La case explicite, si elle est cochée, demande un consentement supplémentaire à
l'utilisateur pour la complétion.
Champ liste : grâce à « éléments », il vous faut fixer possibilités de réponse à
votre liste, ajoutez autant d'éléments que nécessaire.
Vous pouvez choisir d'afficher les réponses sous forme de bouton radio à l'aide
de la case à cocher prévue à cet effet.
Champ case à cocher : Case à cocher ; Un formulaire, une fois créé apparaît
sous la forme d'un résumé d'une ligne en bout de laquelle sont affichés 4
boutons qui respectivement permettent: l'édition, la modification des champs,
la duplication et la suppression.
Éditer
++++++
Le bouton prévu à cet effet permet d'éditer le formulaire.
Vous pourrez ensuite modifier le cas échéant, les types de champ du formulaire
concerné, ainsi que les rôles, catégories, destinataire et d'activer/désactiver
le formulaire.
Modifier
++++++++
Grâce à ce bouton, vous pourrez ensuite modifier les paramètres des champs d'un
formulaire ainsi que les déplacer par « drag&drop ».
Dupliquer
+++++++++
Ce bouton permet la duplication d'un formulaire, pour éviter d'avoir à faire une
création ex-nihilo si vous souhaiter créer un formulaire ayant une structuration
proche d'un existant.
Supprimer
+++++++++
Vous pourrez ici supprimer un formulaire. Afin d'éviter les suppressions
brutales ou les erreurs de manipulation, une confirmation de la suppression
est demandée.
Onglet Logs
===========
S'il est activé, permet d'analyser le comportement des répondants.
Onglet Paramètres
=================
Sert à paramétrer complètement l'application
Licences
========
w.c.s., Authentic_, et Lasso_ sont publiés sous la `licence GNU/GPL`_.
.. _Lasso: http://lasso.entrouvert.org/
.. _`licence GNU/GPL`: http://www.gnu.org/copyleft/gpl.html
.. _`Liberty Alliance`: http://projectliberty.org/
.. _Authentic: http://authentic.labs.libre-entreprise.org
.. _Debian: http://www.debian.org/
.. _Apache: http://www.apache.org/
.. _Quixote: http://www.mems-exchange.org/software/Quixote
.. _mod_python: http://www.modpython.org/
.. _SCGI: http://www.mems-exchange.org/software/scgi/
.. _OpenSSL: http://www.openssl.org

View File

@ -1,5 +0,0 @@
#! /bin/sh
size=$(identify $1 | cut -d ' ' -f 3)
composite $1 -size $(identify $1 | cut -d ' ' -f3) xc:white $2

View File

@ -1,29 +0,0 @@
#! /usr/bin/python
"""A minimal reST frontend, to create appropriate LaTeX files."""
try:
import locale
locale.setlocale(locale.LC_ALL, '')
except:
pass
from docutils.core import publish_cmdline, Publisher
def set_io(self, source_path=None, destination_path=None):
Publisher.set_io_orig(self, source_path, destination_path='/dev/null')
Publisher.set_io_orig, Publisher.set_io = Publisher.set_io, set_io
output = publish_cmdline(writer_name='latex',
settings_overrides = {
'documentclass': 'report',
'documentoptions': '11pt,a4paper,titlepage',
'use_latex_toc': True,
'use_latex_docinfo': True,
'stylesheet': 'custom.tex'})
output = output.replace('\\includegraphics',
'\\includegraphics[width=.9\\textwidth,height=15cm,clip,keepaspectratio]')
output = output.replace('\\begin{figure}[htbp]', '\\begin{figure}[H]')
print output

View File

@ -1,277 +0,0 @@
# w.c.s. - web application for online forms
# Copyright (C) 2005-2010 Entr'ouvert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
import random
from quixote.html import htmltext, TemplateIO
from qommon.form import CompositeWidget, IntWidget, WidgetList, StringWidget, \
CheckboxWidget, SingleSelectWidget
from wcs.fields import WidgetField, register_field_class
from pyvotecore import schulze_method, irv, ranked_pairs, schulze_pr, \
schulze_stv, schulze_npr
class VoteWidget(CompositeWidget):
readonly = False
def __init__(self, name, value = None, elements = None, **kwargs):
CompositeWidget.__init__(self, name, value, **kwargs)
self.element_names = {}
if kwargs.has_key('title'):
del kwargs['title']
if kwargs.has_key('readonly'):
if kwargs['readonly']:
self.readonly = True
del kwargs['readonly']
if kwargs.has_key('required'):
if kwargs['required']:
self.required = True
del kwargs['required']
self.randomize_items = False
if kwargs.has_key('randomize_items'):
if kwargs['randomize_items']:
self.randomize_items = True
del kwargs['randomize_items']
for v in elements:
if type(v) is tuple:
title = v[1]
key = v[0]
if type(key) is int:
name = 'element%d' % v[0]
elif type(key) in (str, htmltext):
name = str('element%s' % v[0])
key = str(key)
else:
raise NotImplementedError()
else:
title = v
key = v
name = 'element%d' % len(self.element_names.keys())
if value:
position = value.get(key)
else:
position = None
self.add(IntWidget, name, title = title, value = position, size = 5, **kwargs)
self.element_names[name] = key
if self.randomize_items:
random.shuffle(self.widgets)
if self.readonly:
def cmp_w(x, y):
if x.value is None and y.value is None:
return 0
if x.value is None:
return 1
if y.value is None:
return -1
return cmp(x.value, y.value)
self.widgets.sort(cmp_w)
def _parse(self, request):
values = {}
for name in self.element_names:
value = self.get(name)
values[self.element_names[name]] = value
if type(value) is not int:
self.get_widget(name).set_error(IntWidget.TYPE_ERROR)
self.value = values or None
def parse(self, request=None):
value = CompositeWidget.parse(self, request=request)
for widget in self.widgets:
if widget.has_error():
self.set_error(_('Some fields were not filled properly.'))
break
return value
def render_content(self):
r = TemplateIO(html=True)
r += htmltext('<ul>')
for widget in self.get_widgets():
if widget.has_error():
r += htmltext('<li class="error"><label>')
else:
r += htmltext('<li><label>')
if self.readonly:
widget.attrs['disabled'] = 'disabled'
if widget.value:
r += htmltext('<input type="hidden" name="%s" value="%s" >') % (
widget.name, widget.value)
widget.name = widget.name + 'xx'
r += widget.render_content()
r += htmltext('</label>')
r += widget.title
r += htmltext('</li>')
r += htmltext('</ul>')
return r.getvalue()
METHODS = {
'condorcet-schulze': N_('Condorcet-Shulze'),
'irv': N_('Instant Run-off'),
'ranked_pairs': N_('Ranked pairs'),
'schulze-pr': N_('Schulze Proportional Ranking'),
'schulze-stv': N_('Schulze STV'),
'schulze-npr': N_('Schulze NPR'),
}
class VoteField(WidgetField):
key = 'vote-field'
description = N_('Ranked choice vote')
items = None
randomize_items = True
widget_class = VoteWidget
required_winners = None
winner_threshold = None
tallying_method = 'condorcet-schulze'
def perform_more_widget_changes(self, form, kwargs, edit = True):
kwargs['elements'] = self.items or []
kwargs['randomize_items'] = self.randomize_items
def fill_admin_form(self, form):
WidgetField.fill_admin_form(self, form)
form.add(WidgetList, 'items', title = _('Items'), element_type = StringWidget,
value = self.items, required = True,
element_kwargs = {'render_br': False, 'size': 50},
add_element_label = _('Add item'))
form.add(CheckboxWidget, 'randomize_items', title = _('Randomize Items'),
value = self.randomize_items)
form.add(SingleSelectWidget, 'tallying_method', title=_('Tallying method'),
value=self.tallying_method,
options=METHODS.items())
form.add(IntWidget, 'required_winners', title=_('Required winners'),
value=self.required_winners),
form.add(IntWidget, 'winner_threshold', title=_('Winner threshold'),
value=self.winner_threshold),
def get_admin_attributes(self):
return WidgetField.get_admin_attributes(self) + ['items',
'randomize_items', 'tallying_method', 'required_winners',
'winner_threshold']
def get_view_value(self, value):
r = TemplateIO(html=True)
r += htmltext('<ul>')
items = value.items()
items.sort(lambda x,y: cmp(x[1], y[1]))
for it in items:
if it[1]:
r += htmltext('<li>%s: %s</li>') % (it[1], it[0])
r += htmltext('</ul>')
return r.getvalue()
def stats(self, values):
'''
Compute vote result using the pyvotecore library.
'''
r = TemplateIO(html = True)
votes = [x.data.get(self.id) for x in values]
# build ballots
kwargs = { 'winner_threshold': self.winner_threshold,
'required_winners': self.required_winners }
if self.tallying_method == 'condorcet-schulze':
votes = [{ 'count': 1, 'ballot': x } for x in votes if x]
method = schulze_method.SchulzeMethod
elif self.tallying_method == 'irv':
votes = [ x.items() for x in votes ]
votes = [ sorted(x, cmp=lambda x,y: cmp(x[1],y[1])) for x in votes ]
votes = [ {'count':1, 'ballot': [ a for a,b in x ] } for x in votes ]
method = irv.IRV
elif self.tallying_method == 'ranked_pairs':
votes = [{ 'count': 1, 'ballot': x } for x in votes if x]
method = ranked_pairs.RankedPairs
elif self.tallying_method == 'schulze-pr':
votes = [{ 'count': 1, 'ballot': x } for x in votes if x]
method = schulze_pr.SchulzePR
elif self.tallying_method == 'schulze-stv':
votes = [{ 'count': 1, 'ballot': x } for x in votes if x]
method = schulze_stv.SchulzeSTV
elif self.tallying_method == 'schulze-npr':
votes = [{ 'count': 1, 'ballot': x } for x in votes if x]
method = schulze_npr.SchulzeNPR
else:
raise ValueError, 'unknown method', self.tallying_method
# Restrain arguments
accepted_args = method.__init__.im_func.func_code.co_varnames
for key in kwargs.keys():
if key not in accepted_args or kwargs.get(key) is None:
del kwargs[key]
# Run vote
result = method(votes, **kwargs).as_dict()
r += htmltext('<h4>%s</h4>') % _('Method')
r += htmltext('<p>%s</p>') % _(METHODS.get(self.tallying_method))
if 'candidates' in result:
r += htmltext('<h4>%s</h4>') % _('Candidates')
r += htmltext('<p>%s</p>') % (', '.join(result['candidates']))
if 'quota' in result:
r += htmltext('<h4>%s</h4>') % _('Quota')
r += htmltext('<p>%s</p>') % result.get('quota')
if 'rounds' in result:
for i, _round in enumerate(result['rounds']):
r += htmltext('<h4>%s</h4><div class="round">') % (_('Round %s') % (i+1))
if 'loser' in _round:
r += htmltext('<h5>%s</h5>') % _('Loser')
r += htmltext('<p>%s</p>') % _round['loser']
if 'tallies' in _round:
r += htmltext('<h5>%s</h5><ul>') % _('Tallies')
for a, b in _round['tallies'].iteritems():
r += htmltext('<li>%s: %s</li>') % (a,b)
r += htmltext('</ul>')
if 'tied_losers' in _round:
r += htmltext('<h5>%s</h5>') % _('Tied losers')
r += htmltext('<p>%s</p>') % ', '.join(list(_round['tied_losers']))
if 'winner' in _round:
r += htmltext('<h5>%s</h5>') % _('Winner')
r += htmltext('<p>%s</p>') % _round['winner']
r += htmltext('</div>')
if 'pairs' in result:
r += htmltext('<h4>%s</h4><dl>') % _('Pairs')
for a, b in result['pairs'].iteritems():
r += htmltext('<dt>%s</dt>') % ', '.join(a)
r += htmltext('<dd>%s</dd>') % b
r += htmltext('</dl>')
if 'strong_pairs' in result:
r += htmltext('<h4>%s</h4><dl>') % _('Strong pairs')
for a, b in result['strong_pairs'].iteritems():
r += htmltext('<dt>%s</dt>') % ', '.join(a)
r += htmltext('<dd>%s</dd>') % b
r += htmltext('</dl>')
if 'winner' in result:
r += htmltext('<h4>%s</h4>') % _('Winner')
r += htmltext('<p>%s</p>') % result['winner']
if 'winners' in result:
r += htmltext('<h4>%s</h4>') % _('Winners')
r += htmltext('<p>%s</p>') % ', '.join(result['winners'])
if 'order' in result:
r += htmltext('<h4>%s</h4>') % _('Order')
r += htmltext('<p>%s</p>') % ', '.join(result['order'])
# FIXME: show actions
# import pprint
# r += htmltext('<pre>%s</pre>') % pprint.pformat(result)
return r.getvalue()
register_field_class(VoteField)

View File

@ -1,109 +0,0 @@
# w.c.s. - web application for online forms
# Copyright (C) 2005-2010 Entr'ouvert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
from quixote import get_publisher
from wcs.fields import WidgetField, register_field_class
from qommon.form import *
class VoteAnonymityWidget(CheckboxWidget):
vote_anonymity = 'anonymous'
def __init__(self, name, value = None, elements = None, **kwargs):
if kwargs and kwargs.get('vote_anonymity'):
self.vote_anonymity = kwargs.get('vote_anonymity')
if kwargs and 'required' in kwargs:
del kwargs['required']
CheckboxWidget.__init__(self, name, value=value, elements=elements, **kwargs)
def render(self):
if self.vote_anonymity != 'choice':
# XXX: include info for user ?
return ''
return CheckboxWidget.render(self)
def render_title(self, title):
return CheckboxWidget.render_title(self, _('Anonymous Voting'))
def render_content(self):
value = True
if self.value:
if self.value[0] == 'anonymous':
value = True
else:
value = False
return htmltag('input', xml_end=True,
type='checkbox',
name=self.name,
value='yes',
checked=value and 'checked' or None,
**self.attrs)
def _parse(self, request):
if self.vote_anonymity == 'anonymous':
self.value = ('anonymous', None)
elif self.vote_anonymity == 'public':
self.value = ('public', request.user.id)
else:
if type(request.form.get(self.name)) is tuple:
self.value = request.form.get(self.name)
else:
CheckboxWidget._parse(self, request)
if self.value is True:
self.value = ('anonymous', None)
else:
self.value = ('public', request.user.id)
class VoteAnonymityField(WidgetField):
key = 'vote-anonymity'
description = N_('Vote Anonymity')
widget_class = VoteAnonymityWidget
vote_anonymity = 'anonymous'
# possible values:
# 'anonymous': anonymous vote
# 'public': public vote
# 'choice': anonymous or public, choice of voter
def fill_admin_form(self, form):
form.add(StringWidget, 'label', title = _('Label'), value = self.label,
required = True, size = 50)
form.add(SingleSelectWidget, 'vote_anonymity', title = _('Vote Anonymity'),
value = self.vote_anonymity,
options = [('anonymous', _('Anonymous Vote')),
('public', _('Public Vote')),
('choice', _('Choice of Voter'))])
def get_admin_attributes(self):
return ['label', 'vote_anonymity']
def perform_more_widget_changes(self, form, kwargs, edit = True):
kwargs['vote_anonymity'] = self.vote_anonymity
def get_view_value(self, value):
public = False
if self.vote_anonymity == 'choice':
if value and value[0] == 'public':
public = True
if public:
return get_publisher().user_class.get(value[1]).get_display_name()
else:
return _('Anonymous') # XXX: include token?
register_field_class(VoteAnonymityField)

View File

@ -1,281 +0,0 @@
# w.c.s. - web application for online forms
# Copyright (C) 2005-2010 Entr'ouvert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
import random
from quixote.html import htmltext, TemplateIO
from qommon.form import *
from wcs.fields import WidgetField, register_field_class
class RankedItemsWidget(CompositeWidget):
readonly = False
def __init__(self, name, value = None, elements = None, **kwargs):
CompositeWidget.__init__(self, name, value, **kwargs)
self.element_names = {}
if kwargs.has_key('title'):
del kwargs['title']
if kwargs.has_key('readonly'):
if kwargs['readonly']:
self.readonly = True
del kwargs['readonly']
if kwargs.has_key('required'):
if kwargs['required']:
self.required = True
del kwargs['required']
self.randomize_items = False
if kwargs.has_key('randomize_items'):
if kwargs['randomize_items']:
self.randomize_items = True
del kwargs['randomize_items']
for v in elements:
if type(v) is tuple:
title = v[1]
key = v[0]
if type(key) is int:
name = 'element%d' % v[0]
elif type(key) in (str, htmltext):
name = str('element%s' % v[0])
key = str(key)
else:
raise NotImplementedError()
else:
title = v
key = v
name = 'element%d' % len(self.element_names.keys())
if value:
position = value.get(key)
else:
position = None
self.add(IntWidget, name, title = title, value = position, size = 5, **kwargs)
self.element_names[name] = key
if self.randomize_items:
random.shuffle(self.widgets)
if self.readonly:
def cmp_w(x, y):
if x.value is None and y.value is None:
return 0
if x.value is None:
return 1
if y.value is None:
return -1
return cmp(x.value, y.value)
self.widgets.sort(cmp_w)
def _parse(self, request):
values = {}
for name in self.element_names:
value = self.get(name)
values[self.element_names[name]] = value
if type(value) is not int:
self.get_widget(name).set_error(IntWidget.TYPE_ERROR)
self.value = values or None
def parse(self, request=None):
value = CompositeWidget.parse(self, request=request)
for widget in self.widgets:
if widget.has_error():
self.set_error(_('Some fields were not filled properly.'))
break
return value
def render_content(self):
r = TemplateIO(html=True)
r += htmltext('<ul>')
for widget in self.get_widgets():
if widget.has_error():
r += htmltext('<li class="error"><label>')
else:
r += htmltext('<li><label>')
if self.readonly:
widget.attrs['disabled'] = 'disabled'
if widget.value:
r += htmltext('<input type="hidden" name="%s" value="%s" >') % (
widget.name, widget.value)
widget.name = widget.name + 'xx'
r += widget.render_content()
r += htmltext('</label>')
r += widget.title
r += htmltext('</li>')
r += htmltext('</ul>')
return r.getvalue()
class RankedItemsField(WidgetField):
key = 'ranked-items'
description = N_('Ranked Items')
items = None
randomize_items = True
widget_class = RankedItemsWidget
def perform_more_widget_changes(self, form, kwargs, edit = True):
kwargs['elements'] = self.items or []
kwargs['randomize_items'] = self.randomize_items
def fill_admin_form(self, form):
WidgetField.fill_admin_form(self, form)
form.add(WidgetList, 'items', title = _('Items'), element_type = StringWidget,
value = self.items, required = True,
element_kwargs = {'render_br': False, 'size': 50},
add_element_label = _('Add item'))
form.add(CheckboxWidget, 'randomize_items', title = _('Randomize Items'),
value = self.randomize_items)
def get_admin_attributes(self):
return WidgetField.get_admin_attributes(self) + ['items', 'randomize_items']
def get_view_value(self, value):
r = TemplateIO(html=True)
r += htmltext('<ul>')
items = value.items()
items.sort(lambda x,y: cmp(x[1], y[1]))
for it in items:
if it[1]:
r += htmltext('<li>%s: %s</li>') % (it[1], it[0])
r += htmltext('</ul>')
return r.getvalue()
def stats(self, values):
r = TemplateIO(html = True)
# hardcoded to condorcet for the moment
candidates = self.items
# compute matrix
matrix = {}
for c1 in candidates:
matrix[c1] = {}
for c2 in candidates:
matrix[c1][c2] = 0
votes = [x.data.get(self.id) for x in values]
votes = [x for x in votes if x]
for vote in votes:
for c1 in candidates:
for c2 in candidates:
if c1 == c2:
continue
vote_a = vote.get(c1)
vote_b = vote.get(c2)
if vote_a is None:
vote_a = 99999 # XXX MAX_INT
if vote_b is None:
vote_b = 99999 # idem
if int(vote_a) == int(vote_b):
matrix[c1][c2] += 0.5
elif int(vote_a) < int(vote_b):
matrix[c1][c2] += 1
import pprint
pprint.pprint(matrix)
# compute ratings
ratings = {}
for c1 in candidates:
ratings[c1] = {'win': [], 'loss': [], 'tie': [], 'worst': 0}
for c2 in candidates:
if c1 == c2:
continue
delta = matrix[c1][c2] - matrix[c2][c1]
if delta > 0:
ratings[c1]['win'].append(c2)
elif delta < 0:
ratings[c1]['loss'].append(c2)
if delta < ratings[c1]['worst']:
ratings[c1]['worst'] = -delta
else:
ratings[c1]['tie'].append(c2)
pprint.pprint(ratings)
# compute winner
winners = []
remaining = candidates[:]
for c1 in remaining:
rating = ratings[c1]
winner = True
for loss in rating['loss']:
if loss not in winners:
winner = False
break
if not winner:
continue
for tie in rating['tie']:
if tie not in winners:
winner = False
break
if not winner:
continue
winners.append(c1)
remaining.remove(c1)
break
else:
narrowest = None
winners = []
for c2 in remaining:
rating = ratings[c2]
if narrowest is None or rating['worst'] < narrowest:
narrowest = rating['worst']
winners = [c2]
elif rating['worst'] == narrowest:
winners.append(c2)
candidates.sort(lambda x,y: cmp(len(ratings[x]['win']), len(ratings[y]['win'])))
r += htmltext('<table>'
'<thead>'
'<tr>'
'<td></td>')
for c in candidates:
r += htmltext('<th>%s</th>' % c)
r += htmltext('</tr>'
'</thead>'
'<tbody>')
for c1 in candidates:
r += htmltext('<tr>'
'<th>%s</th>' % c1)
for c2 in candidates:
if c2 == c1:
r += htmltext('<td></td>')
else:
if matrix[c1][c2] > matrix[c2][c1]:
color = '#0f0'
elif matrix[c1][c2] == matrix[c2][c1]:
color = '#ff0'
else:
color = '#f00'
r += htmltext('<td style="background: %s">' % color)
r += '%.1f' % matrix[c1][c2]
r += htmltext('</td>')
r += htmltext('</tr>')
r += htmltext('</tbody>'
'</table>'
'<p>')
r += _('Winner:')
r += ' '
r += ' '.join(winners)
r += htmltext('</p>')
return r.getvalue()
register_field_class(RankedItemsField)

View File

@ -1,38 +0,0 @@
POFILES=$(wildcard *.po)
MOFILES=$(POFILES:.po=.mo)
PYFILES=$(shell find ../wcs -name '*.py' -or -name '*.ptl' | grep -v vendor)
all: $(MOFILES)
install: all
for file in $(MOFILES); do \
lang=`echo $$file | sed 's/\.mo//'`; \
install -d $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/; \
install -m 0644 $$file $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/wcs.mo; \
done
wcs.pot: $(PYFILES)
@echo "Rebuilding the pot file"
rm -f wcs.pot tmp.*.pot
cnt=0;
for file in $(PYFILES); do \
cnt=$$(expr $$cnt + 1); \
bn=$$cnt.`basename $$file`; \
xgettext --keyword=N_ -c -L Python -o tmp.$$bn.pot $$file; \
done
msgcat tmp.*.pot > wcs.pot
rm tmp.*.pot
%.mo: %.po
msgfmt -o $@ $<
%.po: wcs.pot
@echo -n "Merging wcs.pot and $@"
@msgmerge $@ wcs.pot -o $@.new
@if [ "`diff $@ $@.new | grep '[<>]' | wc -l`" -ne 2 ]; then \
mv -f $@.new $@; \
else \
rm -f $@.new; \
fi
@msgfmt --statistics $@

4463
po/es.po

File diff suppressed because it is too large Load Diff

4980
po/fr.po

File diff suppressed because it is too large Load Diff

3993
po/wcs.pot

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +0,0 @@
#! /usr/bin/env python
import os
from distutils.core import setup
from quixote.ptl.qx_distutils import qx_build_py
local_cfg = None
if os.path.exists('wcs/wcs_cfg.py'):
local_cfg = file('wcs/wcs_cfg.py').read()
os.unlink('wcs/wcs_cfg.py')
def data_tree(destdir, sourcedir):
extensions = ['.css', '.png', '.jpeg', '.jpg', '.gif', '.xml', '.html', '.js', '.ezt', '.dat']
r = []
for root, dirs, files in os.walk(sourcedir):
l = [os.path.join(root, x) for x in files if os.path.splitext(x)[1] in extensions]
r.append( (root.replace(sourcedir, destdir, 1), l) )
for vcs_dirname in ('CVS', '.svn', '.bzr', '.git'):
if vcs_dirname in dirs:
dirs.remove(vcs_dirname)
return r
setup(
name = 'wcs',
version = '1.5',
maintainer = "Frederic Peters",
maintainer_email = "fpeters@entrouvert.com",
url = "http://wcs.labs.libre-entreprise.org",
package_dir = { 'wcs': 'wcs' },
packages = ['wcs', 'wcs.admin', 'wcs.backoffice', 'wcs.ctl',
'wcs.ctl.Bouncers', 'wcs.forms', 'wcs.wf', 'wcs.qommon',
'wcs.qommon.admin', 'wcs.qommon.backoffice', 'wcs.qommon.ident',
'wcs.qommon.vendor'],
cmdclass = {'build_py': qx_build_py},
scripts = ['wcsctl.py'],
data_files = data_tree('share/wcs/web/', 'data/web/') + \
data_tree('share/wcs/themes/', 'data/themes/') + \
data_tree('share/wcs/vendor/', 'data/vendor/') + \
data_tree('share/wcs/qommon/', 'wcs/qommon/static/')
)
if local_cfg:
file('wcs/wcs_cfg.py', 'w').write(local_cfg)

View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

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