├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.rst ├── docs ├── Makefile ├── administration.rst ├── conf.py ├── developers.rst ├── getting_started.rst ├── images │ ├── layout_concept_structure.png │ ├── screenshot_admin_event.png │ ├── screenshot_admin_overview.png │ ├── screenshot_admin_overview_project_parts.png │ ├── screenshot_admin_project.png │ ├── screenshot_admin_project_goal_group.png │ ├── screenshot_admin_site_config.png │ ├── screenshot_comment_dialog.png │ ├── screenshot_main_page.png │ ├── screenshot_website_document.png │ ├── screenshot_website_questions.png │ └── screenshots │ │ └── v06 │ │ ├── admin_comments_overview.png │ │ ├── admin_document_form.png │ │ ├── admin_event_form_connections.png │ │ ├── admin_goal_performance_figures.png │ │ ├── admin_participant_form.png │ │ ├── admin_participant_membership_form.png │ │ ├── admin_participant_search_tag_form.png │ │ ├── admin_participant_types_overview.png │ │ ├── admin_question_form.png │ │ ├── admin_topics_form.png │ │ ├── admin_user_form.png │ │ ├── admin_user_form_user_permissions.png │ │ ├── admin_web_source_form.png │ │ ├── admin_website_configuration_form.png │ │ ├── admin_wysiwyg_editor_adding_images.png │ │ ├── example_comment_dialog.png │ │ ├── example_event_detail_connections.png │ │ ├── example_events_overview_detail.png │ │ ├── example_goals_overview_detail.png │ │ ├── example_participant_search_tag_detail.png │ │ ├── example_project_admin.png │ │ ├── example_project_dashboard.png │ │ ├── example_question_add_research_request.png │ │ ├── example_questions_detail.png │ │ ├── example_research_request_display.png │ │ └── website_pdf_viewer_german.png ├── index.rst ├── make.bat ├── tutorial.rst └── users.rst ├── example_project ├── create_example_data.sh ├── ep_setup_app │ ├── __init__.py │ ├── docs │ │ ├── dofston_cert_refusal.pdf │ │ └── phonecall_mrs_smith.pdf │ ├── example_data.py │ ├── imgs │ │ └── Bruegel_Tower_of_Babel_1.jpg │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── createexampledata.py │ ├── models.py │ ├── tests.py │ └── views.py ├── example_project │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── init_example_project.sh ├── manage.py └── runserver.sh ├── public_project ├── __init__.py ├── admin.py ├── api.py ├── context_processors.py ├── doc_scanner.py ├── feeds.py ├── forms.py ├── locale │ ├── de │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ └── en │ │ └── LC_MESSAGES │ │ ├── django.mo │ │ └── django.po ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ ├── createpages.py │ │ ├── generatepdfimages.py │ │ └── rebuildsearchtagcache.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_boolean_default_values.py │ ├── 0003_removed_null_on_manytomany.py │ ├── 0004_activation_flags_for_goals_questions_comments.py │ └── __init__.py ├── models.py ├── search.py ├── south_migrations │ ├── 0001_initial.py │ ├── 0002_auto__del_field_participant_participant_type.py │ ├── 0003_auto.py │ ├── 0004_auto__add_field_projectpart_main_project_part.py │ ├── 0005_auto__add_sitecategory.py │ ├── 0006_intro_texts_to_site_categories.py │ ├── 0007_auto__del_project.py │ ├── 0008_auto__add_membership.py │ ├── 0009_auto__del_field_siteconfig_navi_bg_color__del_field_siteconfig_header_.py │ ├── 0010_auto__del_field_projectpart_main_project_part.py │ ├── 0011_auto__add_field_projectgoalgroup_project_part__add_field_projectgoalgr.py │ ├── 0012_auto__add_field_sitecategory_num_new_entries.py │ ├── 0013_auto__add_field_siteconfig_show_all_events.py │ ├── 0014_auto__add_unique_participant_name.py │ ├── 0015_auto__del_field_sitecategory_num_new_entries.py │ ├── 0016_auto__del_field_siteconfig_show_all_events.py │ ├── 0017_auto__add_field_participant_order.py │ ├── 0018_auto__rename_field_image_attribution_html_to_attribution.py │ ├── 0019_auto__add_field_image_attribution_url__add_field_image_comments.py │ ├── 0020_auto__rename_site_config_text_fields.py │ ├── 0021_auto__del_field_siteconfig_header_image.py │ ├── 0022_auto__del_field_siteconfig_sub_title__del_field_siteconfig_sub_title_c.py │ ├── 0023_auto__del_field_siteconfig_navi_link_color.py │ ├── 0024_auto__add_participanttype__add_field_participant_type.py │ ├── 0025_auto__add_field_event_not_exact.py │ └── __init__.py ├── static │ ├── bootstrap-335 │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ ├── css │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ ├── layout-0.5.2.css │ │ ├── lib │ │ │ ├── font-awesome-3.1.1.css │ │ │ └── font-awesome-3.1.1.min.css │ │ └── tinymce_editor-0.1.0.css │ ├── favicon.ico │ ├── font │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── img │ │ └── icon-app-net.png │ └── js │ │ ├── custom-0.5.0.js │ │ ├── lib │ │ ├── bootstrap-hover-dropdown.min.js │ │ ├── bootstrap3-typeahead-3.1.1.min.js │ │ ├── compatibility.js │ │ ├── d3.layout.cloud.js │ │ ├── d3.v3.min.js │ │ ├── jquery-1.11.3.min.js │ │ ├── jquery.highlight.js │ │ ├── pdf.js │ │ ├── pdfjs_viewer.js │ │ └── tinymce-4.0.0 │ │ │ ├── langs │ │ │ └── readme.md │ │ │ ├── license.txt │ │ │ ├── plugins │ │ │ ├── advlist │ │ │ │ └── plugin.min.js │ │ │ ├── anchor │ │ │ │ └── plugin.min.js │ │ │ ├── autolink │ │ │ │ └── plugin.min.js │ │ │ ├── autoresize │ │ │ │ └── plugin.min.js │ │ │ ├── autosave │ │ │ │ └── plugin.min.js │ │ │ ├── bbcode │ │ │ │ └── plugin.min.js │ │ │ ├── charmap │ │ │ │ └── plugin.min.js │ │ │ ├── code │ │ │ │ └── plugin.min.js │ │ │ ├── compat3x │ │ │ │ ├── editable_selects.js │ │ │ │ ├── form_utils.js │ │ │ │ ├── mctabs.js │ │ │ │ ├── tiny_mce_popup.js │ │ │ │ └── validate.js │ │ │ ├── contextmenu │ │ │ │ └── plugin.min.js │ │ │ ├── directionality │ │ │ │ └── plugin.min.js │ │ │ ├── emoticons │ │ │ │ ├── img │ │ │ │ │ ├── smiley-cool.gif │ │ │ │ │ ├── smiley-cry.gif │ │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ │ ├── smiley-frown.gif │ │ │ │ │ ├── smiley-innocent.gif │ │ │ │ │ ├── smiley-kiss.gif │ │ │ │ │ ├── smiley-laughing.gif │ │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ │ ├── smiley-sealed.gif │ │ │ │ │ ├── smiley-smile.gif │ │ │ │ │ ├── smiley-surprised.gif │ │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ │ ├── smiley-undecided.gif │ │ │ │ │ ├── smiley-wink.gif │ │ │ │ │ └── smiley-yell.gif │ │ │ │ └── plugin.min.js │ │ │ ├── example │ │ │ │ └── plugin.min.js │ │ │ ├── example_dependency │ │ │ │ └── plugin.min.js │ │ │ ├── fullpage │ │ │ │ └── plugin.min.js │ │ │ ├── fullscreen │ │ │ │ └── plugin.min.js │ │ │ ├── hr │ │ │ │ └── plugin.min.js │ │ │ ├── image │ │ │ │ └── plugin.min.js │ │ │ ├── insertdatetime │ │ │ │ └── plugin.min.js │ │ │ ├── layer │ │ │ │ └── plugin.min.js │ │ │ ├── legacyoutput │ │ │ │ └── plugin.min.js │ │ │ ├── link │ │ │ │ └── plugin.min.js │ │ │ ├── lists │ │ │ │ └── plugin.min.js │ │ │ ├── media │ │ │ │ ├── moxieplayer.swf │ │ │ │ └── plugin.min.js │ │ │ ├── nonbreaking │ │ │ │ └── plugin.min.js │ │ │ ├── noneditable │ │ │ │ └── plugin.min.js │ │ │ ├── pagebreak │ │ │ │ └── plugin.min.js │ │ │ ├── paste │ │ │ │ └── plugin.min.js │ │ │ ├── preview │ │ │ │ └── plugin.min.js │ │ │ ├── print │ │ │ │ └── plugin.min.js │ │ │ ├── save │ │ │ │ └── plugin.min.js │ │ │ ├── searchreplace │ │ │ │ └── plugin.min.js │ │ │ ├── spellchecker │ │ │ │ └── plugin.min.js │ │ │ ├── tabfocus │ │ │ │ └── plugin.min.js │ │ │ ├── table │ │ │ │ └── plugin.min.js │ │ │ ├── template │ │ │ │ └── plugin.min.js │ │ │ ├── textcolor │ │ │ │ └── plugin.min.js │ │ │ ├── visualblocks │ │ │ │ ├── css │ │ │ │ │ └── visualblocks.css │ │ │ │ └── plugin.min.js │ │ │ ├── visualchars │ │ │ │ └── plugin.min.js │ │ │ └── wordcount │ │ │ │ └── plugin.min.js │ │ │ ├── skins │ │ │ └── lightgray │ │ │ │ ├── content.inline.min.css │ │ │ │ ├── content.min.css │ │ │ │ ├── fonts │ │ │ │ ├── icomoon-small.eot │ │ │ │ ├── icomoon-small.svg │ │ │ │ ├── icomoon-small.ttf │ │ │ │ ├── icomoon-small.woff │ │ │ │ ├── icomoon.eot │ │ │ │ ├── icomoon.svg │ │ │ │ ├── icomoon.ttf │ │ │ │ ├── icomoon.woff │ │ │ │ └── readme.md │ │ │ │ ├── img │ │ │ │ ├── anchor.gif │ │ │ │ ├── loader.gif │ │ │ │ ├── object.gif │ │ │ │ ├── trans.gif │ │ │ │ └── wline.gif │ │ │ │ ├── skin.ie7.min.css │ │ │ │ └── skin.min.css │ │ │ ├── themes │ │ │ └── modern │ │ │ │ └── theme.min.js │ │ │ └── tinymce.min.js │ │ ├── pdf_viewer-0.5.0.js │ │ └── tag_cloud-0.5.2.js ├── tag_cache_creator.py ├── templates │ ├── 404.html │ ├── admin │ │ └── base_site.html │ ├── api.html │ ├── base.html │ ├── comments.html │ ├── contact.html │ ├── dev │ │ └── logo.html │ ├── dialogs │ │ ├── comment.html │ │ ├── generic_confirm.html │ │ ├── more_cos_input.html │ │ └── research_request.html │ ├── document.html │ ├── documents.html │ ├── event.html │ ├── events.html │ ├── goals.html │ ├── index.html │ ├── info_box │ │ ├── activities.html │ │ ├── comments.html │ │ ├── document_detail.html │ │ ├── documents.html │ │ ├── event_compact.html │ │ ├── event_detail.html │ │ ├── events.html │ │ ├── generic.html │ │ ├── generic_html.html │ │ ├── memberships.html │ │ ├── participant_detail.html │ │ ├── participants.html │ │ ├── pdf_navi.html │ │ ├── pdf_viewer.html │ │ ├── pdfjs_doc.html │ │ ├── project_goal_group.html │ │ ├── project_part_detail.html │ │ ├── project_parts.html │ │ ├── question_detail.html │ │ ├── questions.html │ │ ├── research_requests.html │ │ ├── site_category_detail.html │ │ └── web_sources.html │ ├── layout_elements │ │ ├── category_header.html │ │ ├── comments_header.html │ │ ├── ec_button_group.html │ │ ├── ec_header_box.html │ │ ├── event_section_header.html │ │ ├── menu_documents.html │ │ ├── menu_events.html │ │ ├── menu_participants.html │ │ ├── menu_project_parts.html │ │ ├── menu_web_sources.html │ │ ├── page_header.html │ │ ├── research_requests_header.html │ │ └── section_header.html │ ├── participant.html │ ├── participants.html │ ├── project_part.html │ ├── project_parts.html │ ├── question.html │ ├── questions.html │ ├── research_requests.html │ ├── search.html │ └── web_source.html ├── templatetags │ ├── __init__.py │ └── bpw.py ├── tests.py ├── urls.py ├── utils │ ├── __init__.py │ └── test_utils.py └── views.py ├── requirements.txt ├── requirements_dev.txt ├── setup.py └── tests ├── bpw_tests ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py ├── browser ├── __init__.py ├── api_test.py ├── generic_test.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ └── createtestdata.py ├── models.py ├── rss_test.py ├── tests.py ├── ui_elements_test.py └── views.py ├── create_test_data.sh ├── fixtures ├── __init__.py ├── models.py ├── project_factory.py ├── test_document.pdf ├── tests.py └── views.py ├── init_test_project.sh ├── manage.py └── testserver.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[co] 2 | *.db 3 | *.sql 4 | *.gz 5 | *.zip 6 | *.tar 7 | *.log 8 | *.swp 9 | .DS_Store 10 | .project 11 | .settings 12 | .pydevproject 13 | settings_template.py 14 | docs/_build 15 | example_project/example_project/sqlite3.db 16 | example_project/media/ 17 | example_project/static/ 18 | tests/media/ 19 | tests/static/ 20 | dist 21 | build 22 | django_public_project.egg-info/ 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Holger Drewes 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of django-big-projects-watch nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL django-big-projects-watch BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include MANIFEST.in 3 | include README.rst 4 | include requirements.txt 5 | recursive-include public_project/locale * 6 | recursive-include public_project/static * 7 | recursive-include public_project/templates * 8 | 9 | include example_project/*.sh 10 | recursive-include example_project/ep_setup_app/docs * 11 | recursive-include example_project/ep_setup_app/imgs * 12 | 13 | recursive-include docs * 14 | prune docs/_build -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | django-public-project 3 | ===================== 4 | 5 | Django Public Project (DPP) is a custom CMS for making large public projects, political processes and enquiry commissions 6 | more transparent. 7 | 8 | Current languages available: EN | DE 9 | 10 | 11 | Documentation 12 | ============= 13 | Read more about DPP in the ReadTheDocs documentation: 14 | 15 | * http://django-public-project.readthedocs.org/ 16 | 17 | Getting Help/Contact 18 | ==================== 19 | There is a Google Group you can use for asking questions or giving suggestions: 20 | 21 | * http://groups.google.com/d/forum/django-public-project 22 | 23 | Feel free to get in touch on Twitter or follow for updates on new releases: 24 | 25 | * https://twitter.com/DjPublicProject 26 | -------------------------------------------------------------------------------- /docs/administration.rst: -------------------------------------------------------------------------------- 1 | .. _administration: 2 | 3 | ============== 4 | Administration 5 | ============== 6 | 7 | User Management 8 | =============== 9 | 10 | Often it makes sense to work with several people with several accounts on one project. You can add new 11 | users in the ``User`` menu in the admin: 12 | 13 | .. image:: images/screenshots/v06/admin_user_form.png 14 | 15 | If you leave the ``Receive new comment emails`` checkbox checked the user will get emails on new comments 16 | and will be able to publish them. After clicking ``save`` be sure to activate ``Staff status`` on the 17 | following ``Change User`` form so that the user is able to log into the ``admin``. 18 | 19 | **Management of user rights** is a bit tricky. Since everything in ``DPP`` is so interconnected if you 20 | just grant some single user permissions to a user it is easy to miss some dependent item prevent the 21 | user from finishing a desired task because he/she has not the necessary user rights. For that reason 22 | it may be easier choosing all user rights in the first place and then explicitly removing the ones 23 | you don't want to grant, e.g. the right to add/edit/delete documents: 24 | 25 | .. image:: images/screenshots/v06/admin_user_form_user_permissions.png 26 | 27 | Backing up the Database 28 | ======================= 29 | 30 | When backing up the database of a DPP installation, it works best to use the ``-n`` option for 31 | saving content type and some ohter references as natural keys and at the same time ommit backing up the 32 | contenttypes app and the auth.Permission model. This makes it easier to recover an installation 33 | after DB data loss, since Django is automatically generating the content type objects (used in DPP 34 | for comments) which could lead to problems with IDs if not using natural keys:: 35 | 36 | python manage.py dumpdata -n -e contenttypes -e auth.Permission > dpp_dump.json 37 | 38 | When loading the data from a generated dump it is important to comment out the ``post_save`` signals 39 | from the ``models.py`` file, otherwise an error will occur:: 40 | 41 | python manage.py loaddata dpp_dump.json 42 | -------------------------------------------------------------------------------- /docs/images/layout_concept_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/layout_concept_structure.png -------------------------------------------------------------------------------- /docs/images/screenshot_admin_event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_admin_event.png -------------------------------------------------------------------------------- /docs/images/screenshot_admin_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_admin_overview.png -------------------------------------------------------------------------------- /docs/images/screenshot_admin_overview_project_parts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_admin_overview_project_parts.png -------------------------------------------------------------------------------- /docs/images/screenshot_admin_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_admin_project.png -------------------------------------------------------------------------------- /docs/images/screenshot_admin_project_goal_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_admin_project_goal_group.png -------------------------------------------------------------------------------- /docs/images/screenshot_admin_site_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_admin_site_config.png -------------------------------------------------------------------------------- /docs/images/screenshot_comment_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_comment_dialog.png -------------------------------------------------------------------------------- /docs/images/screenshot_main_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_main_page.png -------------------------------------------------------------------------------- /docs/images/screenshot_website_document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_website_document.png -------------------------------------------------------------------------------- /docs/images/screenshot_website_questions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshot_website_questions.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_comments_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_comments_overview.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_document_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_document_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_event_form_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_event_form_connections.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_goal_performance_figures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_goal_performance_figures.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_participant_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_participant_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_participant_membership_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_participant_membership_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_participant_search_tag_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_participant_search_tag_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_participant_types_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_participant_types_overview.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_question_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_question_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_topics_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_topics_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_user_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_user_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_user_form_user_permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_user_form_user_permissions.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_web_source_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_web_source_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_website_configuration_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_website_configuration_form.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/admin_wysiwyg_editor_adding_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/admin_wysiwyg_editor_adding_images.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_comment_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_comment_dialog.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_event_detail_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_event_detail_connections.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_events_overview_detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_events_overview_detail.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_goals_overview_detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_goals_overview_detail.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_participant_search_tag_detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_participant_search_tag_detail.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_project_admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_project_admin.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_project_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_project_dashboard.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_question_add_research_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_question_add_research_request.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_questions_detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_questions_detail.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/example_research_request_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/example_research_request_display.png -------------------------------------------------------------------------------- /docs/images/screenshots/v06/website_pdf_viewer_german.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/docs/images/screenshots/v06/website_pdf_viewer_german.png -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. django-public-project documentation master file, created by 2 | sphinx-quickstart on Mon Aug 6 14:08:32 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | django-public-project - Documentation 7 | ===================================== 8 | 9 | **Django Public Project (DPP)** is an open source software 10 | (`Website `_ | `GitHub `_) 11 | for **creating/maintaining an information website 12 | around a public project** (building of a new opera house or an airport, long-term preparations for a big sports event,...) 13 | bringing transparency to the roles of stakeholders, important events as well as the overall project progress. 14 | 15 | DPP was initially funded by the pirate party in the german parliaments of Berlin and 16 | North Rhine-Westphalia for their projects 17 | `BERwatch (german) `_ and 18 | `BLBwatch (german) `_. 19 | 20 | .. note:: There is now a **Live-Demo installation** to test the software: 21 | `Website `_ | 22 | `Admin `_ (User: ``dpp`` / ``demo``) 23 | 24 | Manual 25 | ------ 26 | 27 | .. toctree:: 28 | :maxdepth: 2 29 | 30 | getting_started 31 | tutorial 32 | administration 33 | developers 34 | 35 | 36 | Indices and tables 37 | ================== 38 | 39 | * :ref:`genindex` 40 | * :ref:`modindex` 41 | * :ref:`search` 42 | 43 | -------------------------------------------------------------------------------- /example_project/create_example_data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Flushing DB..." 3 | python manage.py flush --noinput 4 | echo "Creating superuser with username 'admin'..."; 5 | python manage.py createsuperuser --username=admin --email=d@d.de; 6 | echo "Creating example project data..."; 7 | python manage.py createexampledata; 8 | echo "Finished. You're good to go! :-)"; 9 | -------------------------------------------------------------------------------- /example_project/ep_setup_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/ep_setup_app/__init__.py -------------------------------------------------------------------------------- /example_project/ep_setup_app/docs/dofston_cert_refusal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/ep_setup_app/docs/dofston_cert_refusal.pdf -------------------------------------------------------------------------------- /example_project/ep_setup_app/docs/phonecall_mrs_smith.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/ep_setup_app/docs/phonecall_mrs_smith.pdf -------------------------------------------------------------------------------- /example_project/ep_setup_app/imgs/Bruegel_Tower_of_Babel_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/ep_setup_app/imgs/Bruegel_Tower_of_Babel_1.jpg -------------------------------------------------------------------------------- /example_project/ep_setup_app/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/ep_setup_app/management/__init__.py -------------------------------------------------------------------------------- /example_project/ep_setup_app/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/ep_setup_app/management/commands/__init__.py -------------------------------------------------------------------------------- /example_project/ep_setup_app/management/commands/createexampledata.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand, CommandError 2 | from ep_setup_app.example_data import ExampleData 3 | 4 | class Command(BaseCommand): 5 | help = 'Creates the example data for the example project' 6 | 7 | def handle(self, *args, **options): 8 | ed = ExampleData() 9 | ed.create() 10 | -------------------------------------------------------------------------------- /example_project/ep_setup_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /example_project/ep_setup_app/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /example_project/ep_setup_app/views.py: -------------------------------------------------------------------------------- 1 | # Create your views here. 2 | -------------------------------------------------------------------------------- /example_project/example_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/example_project/example_project/__init__.py -------------------------------------------------------------------------------- /example_project/example_project/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.conf.urls import include, url 3 | 4 | from django.contrib import admin 5 | admin.autodiscover() 6 | import django.views 7 | 8 | from public_project.urls import urlpatterns 9 | 10 | urlpatterns += [ 11 | url(r'^admin/', include(admin.site.urls)), 12 | ] 13 | 14 | 15 | if settings.DEBUG: 16 | urlpatterns += [ 17 | url(r'^media/(?P.*)$', django.views.static.serve, { 18 | 'document_root': settings.MEDIA_ROOT, 19 | }), 20 | ] -------------------------------------------------------------------------------- /example_project/example_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for example_project project. 3 | 4 | This module contains the WSGI application used by Django's development server 5 | and any production WSGI deployments. It should expose a module-level variable 6 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover 7 | this application via the ``WSGI_APPLICATION`` setting. 8 | 9 | Usually you will have the standard Django WSGI application here, but it also 10 | might make sense to replace the whole Django WSGI application with a custom one 11 | that later delegates to the Django one. For example, you could introduce WSGI 12 | middleware here, or combine a Django application with an application of another 13 | framework. 14 | 15 | """ 16 | import os 17 | 18 | # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks 19 | # if running multiple sites in the same mod_wsgi process. To fix this, use 20 | # mod_wsgi daemon mode with each site in its own daemon process, or use 21 | # os.environ["DJANGO_SETTINGS_MODULE"] = "example_project.settings" 22 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings") 23 | 24 | # This application object is used by any WSGI server configured to use this 25 | # file. This includes Django's development server, if the WSGI_APPLICATION 26 | # setting points here. 27 | from django.core.wsgi import get_wsgi_application 28 | application = get_wsgi_application() 29 | 30 | # Apply WSGI middleware here. 31 | # from helloworld.wsgi import HelloWorldApplication 32 | # application = HelloWorldApplication(application) 33 | -------------------------------------------------------------------------------- /example_project/init_example_project.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while true; do 3 | read -p "Warning! This will reset the DB and delete modified example data. Proceed?" yn 4 | case $yn in 5 | [Yy]* ) 6 | rm -f example_project/sqlite3.db; 7 | rm -Rf media/; 8 | rm -Rf static/; 9 | python manage.py migrate; 10 | echo "Creating superuser with username 'admin'..."; 11 | python manage.py createsuperuser --username=admin --email=d@d.de; 12 | echo "Creating example project data..."; 13 | python manage.py createexampledata; 14 | python manage.py collectstatic --noinput; 15 | break;; 16 | [Nn]* ) exit;; 17 | * ) echo "Please answer yes (Y/y) or no (N/n).";; 18 | esac 19 | done 20 | -------------------------------------------------------------------------------- /example_project/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /example_project/runserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SERVER_URL='127.0.0.1:8075' 3 | echo "Example server url: $SERVER_URL/" 4 | echo "Admin url: $SERVER_URL/admin/" 5 | python manage.py runserver --pythonpath=.. $SERVER_URL 6 | -------------------------------------------------------------------------------- /public_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/__init__.py -------------------------------------------------------------------------------- /public_project/api.py: -------------------------------------------------------------------------------- 1 | from tastypie import fields 2 | from tastypie.resources import ModelResource 3 | from public_project.models import ProjectPart, Question, Participant, Event, Page, Document 4 | 5 | 6 | class ProjectPartsResource(ModelResource): 7 | 8 | class Meta: 9 | queryset = ProjectPart.objects.all() 10 | resource_name = 'project_parts' 11 | excludes = ['comments',] 12 | allowed_methods = ['get',] 13 | 14 | 15 | class QuestionsResource(ModelResource): 16 | 17 | class Meta: 18 | queryset = Question.objects.all() 19 | resource_name = 'questions' 20 | excludes = ['comments',] 21 | allowed_methods = ['get',] 22 | 23 | 24 | class ParticipantsResource(ModelResource): 25 | 26 | class Meta: 27 | queryset = Participant.objects.all() 28 | resource_name = 'participants' 29 | excludes = ['comments',] 30 | allowed_methods = ['get',] 31 | 32 | 33 | class EventsResource(ModelResource): 34 | 35 | class Meta: 36 | queryset = Event.objects.all() 37 | resource_name = 'events' 38 | excludes = ['comments',] 39 | allowed_methods = ['get',] 40 | 41 | 42 | class PagesResource(ModelResource): 43 | 44 | class Meta: 45 | queryset = Page.objects.all() 46 | resource_name = 'pages' 47 | allowed_methods = ['get',] 48 | 49 | 50 | class DocumentsResource(ModelResource): 51 | pages = fields.ToManyField(PagesResource, 'page_set', null=True, full=True) 52 | 53 | class Meta: 54 | queryset = Document.objects.all() 55 | limit = 5 56 | resource_name = 'documents' 57 | excludes = ['pdf_images_generated', 'document', 'comments',] 58 | allowed_methods = ['get',] 59 | -------------------------------------------------------------------------------- /public_project/context_processors.py: -------------------------------------------------------------------------------- 1 | from public_project.models import Image 2 | 3 | 4 | def uploaded_images_list(request): 5 | return { 'uploaded_images_list': Image.objects.all() } 6 | 7 | 8 | -------------------------------------------------------------------------------- /public_project/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.utils.translation import ugettext_lazy as _ 3 | 4 | 5 | class CommentForm(forms.Form): 6 | username = forms.CharField() 7 | email = forms.EmailField() 8 | comment = forms.CharField(max_length=800) 9 | feedback_allowed = forms.BooleanField(required=False) 10 | co1_id = forms.IntegerField() 11 | co1_content_type = forms.CharField() 12 | co1_page = forms.IntegerField(required=False) 13 | -------------------------------------------------------------------------------- /public_project/locale/de/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/locale/de/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /public_project/locale/en/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/locale/en/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /public_project/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/management/__init__.py -------------------------------------------------------------------------------- /public_project/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/management/commands/__init__.py -------------------------------------------------------------------------------- /public_project/management/commands/createpages.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand, CommandError 2 | from public_project.models import Document 3 | from public_project.doc_scanner import DocScanner 4 | from public_project.tag_cache_creator import rebuild_cache_for_document 5 | 6 | class Command(BaseCommand): 7 | 8 | args = '' 9 | help = 'Used internally to generate pages from pdf documents' 10 | 11 | def handle(self, *args, **options): 12 | for document_id in args: 13 | try: 14 | document = Document.objects.get(pk=int(document_id)) 15 | except Document.DoesNotExist: 16 | raise CommandError('Document "%s" does not exist' % document_id) 17 | document.page_set.all().delete() 18 | ds = DocScanner(document) 19 | ds.create_pages() 20 | 21 | rebuild_cache_for_document(document) 22 | -------------------------------------------------------------------------------- /public_project/management/commands/generatepdfimages.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | from django.conf import settings 4 | from django.core.management.base import BaseCommand, CommandError 5 | from public_project.models import Document 6 | 7 | class Command(BaseCommand): 8 | 9 | args = '' 10 | help = 'Used internally to generate images from pdf document pages' 11 | 12 | def handle(self, *args, **options): 13 | for document_id in args: 14 | try: 15 | document = Document.objects.get(pk=int(document_id)) 16 | except Document.DoesNotExist: 17 | raise CommandError('Document "%s" does not exist' % document_id) 18 | if document.page_set.count() > 0: 19 | raise CommandError('Pages for document "%s" already created' % document_id) 20 | 21 | #Create images 22 | pdf_path = os.path.join(settings.MEDIA_ROOT, unicode(document.document)) 23 | path = document.get_pages_path() 24 | if not os.path.exists(path): 25 | os.makedirs(path) 26 | 27 | cmd = u"convert -quality 90 -density 100 '" + pdf_path + "' '" + path + "page-%d.png'" 28 | p = subprocess.Popen(cmd, shell=True) 29 | retval = p.wait() 30 | document.pdf_images_generated = True 31 | document.save() 32 | -------------------------------------------------------------------------------- /public_project/management/commands/rebuildsearchtagcache.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | from public_project.models import SearchTag 3 | from public_project.tag_cache_creator import rebuild_cache_for_tag 4 | 5 | 6 | class Command(BaseCommand): 7 | 8 | args = '' 9 | help = 'Rebuilding of all search tag cache entries for the project' 10 | 11 | def handle(self, *args, **options): 12 | tags = SearchTag.objects.all() 13 | for tag in tags: 14 | print tag 15 | rebuild_cache_for_tag(tag) 16 | -------------------------------------------------------------------------------- /public_project/migrations/0002_boolean_default_values.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('public_project', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='event', 16 | name='important', 17 | field=models.BooleanField(default=False, help_text='Event being of central importance for the project.', verbose_name='Main Event'), 18 | ), 19 | migrations.AlterField( 20 | model_name='question', 21 | name='answered', 22 | field=models.BooleanField(default=False, verbose_name='Answered'), 23 | ), 24 | migrations.AlterField( 25 | model_name='siteconfig', 26 | name='contact_text', 27 | field=models.TextField(default='Contact HTML Default', help_text='Html to be displayed on the contact page, provide at least an adress there and some contact information.', verbose_name='Contact'), 28 | ), 29 | migrations.AlterField( 30 | model_name='siteconfig', 31 | name='footer', 32 | field=models.TextField(default='Footer HTML Default', help_text='Some html text you want to use in the footer of the page, you can e.g. provide a link to your email adress or associated social media sites.', verbose_name='Footer'), 33 | ), 34 | migrations.AlterField( 35 | model_name='siteconfig', 36 | name='short_title', 37 | field=models.CharField(default='Project Website Short Title', help_text='Short version of the title, used e.g. in emails.', max_length=250, verbose_name='Short title'), 38 | ), 39 | migrations.AlterField( 40 | model_name='siteconfig', 41 | name='title', 42 | field=models.CharField(default='Project Website Title', help_text='Main title, shown in the header navi.', max_length=250, verbose_name='Title'), 43 | ), 44 | ] 45 | -------------------------------------------------------------------------------- /public_project/migrations/0003_removed_null_on_manytomany.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('public_project', '0002_boolean_default_values'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='document', 16 | name='events', 17 | field=models.ManyToManyField(related_name='related_documents', verbose_name='Events', to='public_project.Event', blank=True), 18 | ), 19 | migrations.AlterField( 20 | model_name='document', 21 | name='participants', 22 | field=models.ManyToManyField(related_name='related_documents', verbose_name='Participants', to='public_project.Participant', blank=True), 23 | ), 24 | migrations.AlterField( 25 | model_name='document', 26 | name='project_parts', 27 | field=models.ManyToManyField(related_name='related_documents', verbose_name='Topics', to='public_project.ProjectPart', blank=True), 28 | ), 29 | migrations.AlterField( 30 | model_name='event', 31 | name='participants', 32 | field=models.ManyToManyField(related_name='related_events', verbose_name='Participants', to='public_project.Participant', blank=True), 33 | ), 34 | migrations.AlterField( 35 | model_name='event', 36 | name='project_parts', 37 | field=models.ManyToManyField(related_name='related_events', verbose_name='Topics', to='public_project.ProjectPart', blank=True), 38 | ), 39 | migrations.AlterField( 40 | model_name='projectpart', 41 | name='main_project_parts', 42 | field=models.ManyToManyField(help_text="If you select another project part here, you'll make this a sub project part.", to='public_project.ProjectPart', verbose_name='Main Topic', blank=True), 43 | ), 44 | migrations.AlterField( 45 | model_name='question', 46 | name='documents', 47 | field=models.ManyToManyField(related_name='related_documents', verbose_name='Documents', to='public_project.Document', blank=True), 48 | ), 49 | migrations.AlterField( 50 | model_name='question', 51 | name='events', 52 | field=models.ManyToManyField(related_name='related_questions', verbose_name='Events', to='public_project.Event', blank=True), 53 | ), 54 | migrations.AlterField( 55 | model_name='question', 56 | name='participants', 57 | field=models.ManyToManyField(related_name='related_questions', verbose_name='Participants', to='public_project.Participant', blank=True), 58 | ), 59 | migrations.AlterField( 60 | model_name='question', 61 | name='project_parts', 62 | field=models.ManyToManyField(related_name='related_questions', verbose_name='Topics', to='public_project.ProjectPart', blank=True), 63 | ), 64 | migrations.AlterField( 65 | model_name='sitecategory', 66 | name='documents', 67 | field=models.ManyToManyField(related_name='related_site_categories', verbose_name='Documents', to='public_project.Document', blank=True), 68 | ), 69 | ] 70 | -------------------------------------------------------------------------------- /public_project/migrations/0004_activation_flags_for_goals_questions_comments.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('public_project', '0003_removed_null_on_manytomany'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='siteconfig', 16 | name='activate_comments', 17 | field=models.BooleanField(default=True), 18 | ), 19 | migrations.AddField( 20 | model_name='siteconfig', 21 | name='show_goals_category', 22 | field=models.BooleanField(default=True), 23 | ), 24 | migrations.AddField( 25 | model_name='siteconfig', 26 | name='show_questions_category', 27 | field=models.BooleanField(default=True), 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /public_project/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/migrations/__init__.py -------------------------------------------------------------------------------- /public_project/search.py: -------------------------------------------------------------------------------- 1 | import re 2 | from django.db.models import Q 3 | from public_project.models import Page 4 | 5 | 6 | #PublicDocs 7 | def normalize_query(query_string, 8 | findterms=re.compile(r'"([^"]+)"|(\S+)').findall, 9 | normspace=re.compile(r'\s{2,}').sub): 10 | ''' Splits the query string in invidual keywords, getting rid of unecessary spaces 11 | and grouping quoted words together. 12 | Example: 13 | 14 | >>> normalize_query(' some random words "with quotes " and spaces') 15 | ['some', 'random', 'words', 'with quotes', 'and', 'spaces'] 16 | 17 | ''' 18 | return [normspace(' ', (t[0] or t[1]).strip()) for t in findterms(query_string)] 19 | 20 | 21 | #PublicDocs 22 | def get_query(query_string, search_fields): 23 | ''' Returns a query, that is a combination of Q objects. That combination 24 | aims to search keywords within a model by testing the given search fields. 25 | 26 | ''' 27 | query = None # Query to search for every search term 28 | #terms = normalize_query(query_string) 29 | for term in [query_string]: # Using complete query string instead of separated terms 30 | or_query = None # Query to search for a given term in each field 31 | for field_name in search_fields: 32 | q = Q(**{"%s__icontains" % field_name: term}) 33 | if or_query is None: 34 | or_query = q 35 | else: 36 | or_query = or_query | q 37 | if query is None: 38 | query = or_query 39 | else: 40 | query = query & or_query 41 | return query 42 | 43 | 44 | def search_for_documents(query_string): 45 | entry_query = get_query(query_string, ['document__title', 'content',]) 46 | found_pages = Page.objects.select_related().filter(entry_query).order_by('document','number') 47 | 48 | document_list = [] 49 | for page in found_pages: 50 | if page.document not in document_list: 51 | page.document.search_tags = [query_string,] 52 | document_list.append(page.document) 53 | 54 | return document_list 55 | -------------------------------------------------------------------------------- /public_project/south_migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/south_migrations/__init__.py -------------------------------------------------------------------------------- /public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/bootstrap-335/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public_project/static/bootstrap-335/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /public_project/static/css/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/css/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /public_project/static/css/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/css/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /public_project/static/css/layout-0.5.2.css: -------------------------------------------------------------------------------- 1 | 2 | h1 { 3 | font-size: 24px; 4 | } 5 | 6 | a { 7 | color: #119; 8 | } 9 | #header { 10 | height: 100px; 11 | margin: 15px 0 6px 0; 12 | padding: 15px 15px 5px 15px; 13 | } 14 | #content { 15 | margin-top:35px; 16 | } 17 | .html_text_with_imgs img { 18 | margin: 6px 17px 6px 17px; 19 | } 20 | 21 | .icon-home { 22 | color:#444 !important; 23 | } 24 | .icon-cogs, .icon-cog { 25 | color:#0d9434 !important; 26 | } 27 | .icon-bullseye { 28 | color:#875513 !important; 29 | } 30 | .icon-question-sign { 31 | color: #941bbf !important; 32 | } 33 | .icon-group { 34 | color:#3e3ec7 !important; 35 | } 36 | .icon-user { 37 | color:#3e3ec7 !important; 38 | } 39 | .icon-time { 40 | color:#c91a1a !important; 41 | } 42 | .icon-inbox { 43 | color:#b88f00 !important; 44 | } 45 | .section_header { 46 | margin-bottom: 5px; 47 | } 48 | .sh_title { 49 | display: inline-block; 50 | height: 14px; 51 | background-color: #e0e0e0; 52 | color: #555; 53 | font-size: 14px; 54 | font-weight: bold; 55 | padding: 8px 12px 8px 12px; 56 | } 57 | .sh_url { 58 | float: right; 59 | height: 14px; 60 | background-color: #e0e0e0; 61 | padding: 8px 12px 8px 12px; 62 | } 63 | .section { 64 | clear: both; 65 | margin-bottom: 30px; 66 | } 67 | .simple_box { 68 | clear: both; 69 | } 70 | .info_box { 71 | clear: both; 72 | color: #555; 73 | margin-bottom:5px; 74 | } 75 | .ib_text { 76 | background-color:#f6f6f6; 77 | padding:15px; 78 | } 79 | .info_box_header { 80 | margin-bottom: 5px; 81 | color: #555; 82 | font-size: 14px; 83 | font-weight: bold; 84 | } 85 | .info_box_header a { 86 | font-size: 14px !important; 87 | font-weight: bold; 88 | } 89 | .info_box_content { 90 | 91 | } 92 | 93 | .info_box table { 94 | width: 100%; 95 | padding: 7px; 96 | font-size: 12px; 97 | } 98 | .info_box td { 99 | padding-top: 3px; 100 | padding-bottom: 3px; 101 | padding-left:6px; 102 | padding-right: 6px; 103 | } 104 | 105 | #footer { 106 | font-size: 12px; 107 | margin-top:20px; 108 | border-top:1px solid #999; 109 | padding-top:15px; 110 | padding-bottom: 15px; 111 | color: #666; 112 | } 113 | 114 | /* Bootstrap Overrides */ 115 | .carousel-caption { 116 | position: absolute !important; 117 | right: 0 !important; 118 | bottom: 0 !important; 119 | left: 0 !important; 120 | padding: 15px !important; 121 | background: #333 !important; 122 | background: rgba(0, 0, 0, 0.75) !important; 123 | } 124 | .carousel-control { 125 | background: #222 none repeat scroll 0 0 !important; 126 | border: 3px solid #fff !important; 127 | border-radius: 23px !important; 128 | color: #fff !important; 129 | font-size: 60px !important; 130 | font-weight: 100 !important; 131 | height: 40px !important; 132 | left: 15px !important; 133 | line-height: 30px !important; 134 | margin-top: -20px !important; 135 | opacity: 0.5 !important; 136 | position: absolute !important; 137 | text-align: center !important; 138 | top: 40% !important; 139 | width: 40px !important; 140 | } 141 | .carousel-control.right { 142 | left: auto !important; 143 | right: 15px !important; 144 | } 145 | .carousel-control:hover, .carousel-control:focus { 146 | color: #fff !important; 147 | opacity: 0.9 !important; 148 | text-decoration: none !important; 149 | } 150 | -------------------------------------------------------------------------------- /public_project/static/css/tinymce_editor-0.1.0.css: -------------------------------------------------------------------------------- 1 | img { 2 | margin: 6px 17px 6px 17px; 3 | } 4 | -------------------------------------------------------------------------------- /public_project/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/favicon.ico -------------------------------------------------------------------------------- /public_project/static/font/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/font/FontAwesome.otf -------------------------------------------------------------------------------- /public_project/static/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public_project/static/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public_project/static/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public_project/static/img/icon-app-net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/img/icon-app-net.png -------------------------------------------------------------------------------- /public_project/static/js/custom-0.5.0.js: -------------------------------------------------------------------------------- 1 | 2 | function remove_contenttype_model_selectbox_empty_choices(contenttype_field) { 3 | type_field_id = "#id_" + contenttype_field + "_type"; 4 | $(type_field_id).find("option").each(function() { 5 | choices_field_id = "#id_" + contenttype_field + "_id_" + $(this).val(); 6 | $(choices_field_id).children(":first").remove(); 7 | }); 8 | } 9 | 10 | function change_contenttype_selectbox_choices(contenttype_field) { 11 | type_field_id = "#id_" + contenttype_field + "_type"; 12 | id_field_id = "#id_" + contenttype_field + "_id"; 13 | choices_field_id = "#id_" + contenttype_field + "_id_" + $(type_field_id).val(); 14 | 15 | $(id_field_id).html($(choices_field_id).html()); 16 | } 17 | -------------------------------------------------------------------------------- /public_project/static/js/lib/bootstrap-hover-dropdown.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Project: Twitter Bootstrap Hover Dropdown 3 | * Author: Cameron Spear 4 | * Contributors: Mattia Larentis 5 | * 6 | * Dependencies?: Twitter Bootstrap's Dropdown plugin 7 | * 8 | * A simple plugin to enable twitter bootstrap dropdowns to active on hover and provide a nice user experience. 9 | * 10 | * No license, do what you want. I'd love credit or a shoutout, though. 11 | * 12 | * http://cameronspear.com/blog/twitter-bootstrap-dropdown-on-hover-plugin/ 13 | */(function(e,t,n){var r=e();e.fn.dropdownHover=function(n){r=r.add(this.parent());return this.each(function(){var s=e(this),o=s.parent(),u={delay:500,instantlyCloseOthers:!0},a={delay:e(this).data("delay"),instantlyCloseOthers:e(this).data("close-others")},f=e.extend(!0,{},u,n,a),l;o.hover(function(e){if(!o.hasClass("open")&&!s.is(e.target))return!0;if(i){f.instantlyCloseOthers===!0&&r.removeClass("open");t.clearTimeout(l);o.addClass("open")}},function(){i&&(l=t.setTimeout(function(){o.removeClass("open")},f.delay))});s.hover(function(){if(i){f.instantlyCloseOthers===!0&&r.removeClass("open");t.clearTimeout(l);o.addClass("open")}});o.find(".dropdown-submenu").each(function(){var n=e(this),r;n.hover(function(){if(i){t.clearTimeout(r);n.children(".dropdown-menu").show();n.siblings().children(".dropdown-menu").hide()}},function(){var e=n.children(".dropdown-menu");i?r=t.setTimeout(function(){e.hide()},f.delay):e.hide()})})})};var i=!1,s={hits:0,x:null,y:null};e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover();e(document).mousemove(function(t){s.hits++;if(s.hits>20||Math.abs(t.pageX-s.x)+Math.abs(t.pageY-s.y)<4){e(this).unbind(t);i=!0}else{s.x=t.pageX;s.y=t.pageY}})});var o=".dropdown-submenu:hover>.dropdown-menu{display:none}",u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=o:u.appendChild(document.createTextNode(o));e("head")[0].appendChild(u)})(jQuery,this); -------------------------------------------------------------------------------- /public_project/static/js/lib/pdfjs_viewer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This script is based on the web viewer of the pdf.js project and uses various parts 3 | * of its code base 4 | * https://github.com/mozilla/pdf.js/blob/master/web/viewer.js 5 | */ 6 | 7 | /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 8 | /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ 9 | /* Copyright 2012 Mozilla Foundation 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | 25 | var textDivs = []; 26 | 27 | var CustomTextLayer = { 28 | 29 | beginLayout: function() { 30 | }, 31 | 32 | endLayout: function() { 33 | }, 34 | 35 | appendText: function(geom) { 36 | var textDiv = document.createElement('div'); 37 | 38 | // vScale and hScale already contain the scaling to pixel units 39 | var fontHeight = geom.fontSize * geom.vScale; 40 | textDiv.dataset.canvasWidth = geom.canvasWidth * geom.hScale; 41 | textDiv.dataset.fontName = geom.fontName; 42 | 43 | textDiv.style.fontSize = fontHeight + 'px'; 44 | textDiv.style.fontFamily = geom.fontFamily; 45 | textDiv.style.left = geom.x + 'px'; 46 | textDiv.style.top = (geom.y - fontHeight + 2) + 'px'; 47 | 48 | // The content of the div is set in the `setTextContent` function. 49 | 50 | textDivs.push(textDiv); 51 | }, 52 | 53 | insertDivContent: function(data) { 54 | var bidiTexts = data.bidiTexts; 55 | 56 | for (var i = 0; i < bidiTexts.length; i++) { 57 | var bidiText = bidiTexts[i]; 58 | var textDiv = textDivs[i]; 59 | textDiv.textContent = bidiText.str; 60 | } 61 | }, 62 | 63 | renderLayer: function() { 64 | var textLayerDiv = document.getElementById('text-layer'); 65 | var canvas = document.getElementById('the-canvas'); 66 | var ctx = canvas.getContext('2d'); 67 | 68 | // No point in rendering so many divs as it'd make the browser unusable 69 | // even after the divs are rendered 70 | var MAX_TEXT_DIVS_TO_RENDER = 100000; 71 | if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER) 72 | return; 73 | 74 | for (var i = 0, ii = textDivs.length; i < ii; i++) { 75 | var textDiv = textDivs[i]; 76 | 77 | ctx.font = textDiv.style.fontSize + ' ' + textDiv.style.fontFamily; 78 | var width = ctx.measureText(textDiv.textContent).width; 79 | 80 | if (width > 0) { 81 | var textScale = textDiv.dataset.canvasWidth / width; 82 | 83 | //CustomStyle.setProp('transform' , textDiv, 84 | // 'scale(' + textScale + ', 1)'); 85 | //CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%'); 86 | 87 | textLayerDiv.appendChild(textDiv); 88 | } 89 | } 90 | } 91 | 92 | }; -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("advlist",function(e){function t(e,t){var n=[];return tinymce.each(t.split(/[ ,]/),function(e){n.push({text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"==e?"":e})}),n}function n(t,n){var i,a=e.dom,o=e.selection;i=a.getParent(o.getNode(),"ol,ul"),i&&i.nodeName==t&&n!==!1||e.execCommand("UL"==t?"InsertUnorderedList":"InsertOrderedList"),n=n===!1?r[t]:n,r[t]=n,i=a.getParent(o.getNode(),"ol,ul"),i&&(a.setStyle(i,"listStyleType",n),i.removeAttribute("data-mce-style")),e.focus()}function i(t){var n=e.dom.getStyle(e.dom.getParent(e.selection.getNode(),"ol,ul"),"listStyleType")||"";t.control.items().each(function(e){e.active(e.settings.data===n)})}var a,o,r={};a=t("OL",e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),o=t("UL",e.getParam("advlist_bullet_styles","default,circle,disc,square")),e.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:a,onshow:i,onselect:function(e){n("OL",e.control.settings.data)},onclick:function(){n("OL",!1)}}),e.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:o,onshow:i,onselect:function(e){n("UL",e.control.settings.data)},onclick:function(){n("UL",!1)}})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("anchor",function(e){function t(){e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.selection.getNode().id},onsubmit:function(t){e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t.data.name}))}})}e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:t,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:t})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/autolink/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autolink",function(t){function e(t){o(t,-1,"(",!0)}function n(t){o(t,0,"",!0)}function i(t){o(t,-1,"",!1)}function o(t,e,n){var i,o,r,a,s,l,c,u,d;if(i=t.selection.getRng(!0).cloneRange(),i.startOffset<5){if(u=i.endContainer.previousSibling,!u){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;u=i.endContainer.firstChild.nextSibling}if(d=u.length,i.setStart(u,d),i.setEnd(u,d),i.endOffset<5)return;o=i.endOffset,a=u}else{if(a=i.endContainer,3!=a.nodeType&&a.firstChild){for(;3!=a.nodeType&&a.firstChild;)a=a.firstChild;3==a.nodeType&&(i.setStart(a,0),i.setEnd(a,a.nodeValue.length))}o=1==i.endOffset?2:i.endOffset-1-e}r=o;do i.setStart(a,o>=2?o-2:0),i.setEnd(a,o>=1?o-1:0),o-=1;while(" "!=i.toString()&&""!==i.toString()&&160!=i.toString().charCodeAt(0)&&o-2>=0&&i.toString()!=n);if(i.toString()==n||160==i.toString().charCodeAt(0)?(i.setStart(a,o),i.setEnd(a,r),o+=1):0===i.startOffset?(i.setStart(a,0),i.setEnd(a,r)):(i.setStart(a,o),i.setEnd(a,r)),l=i.toString(),"."==l.charAt(l.length-1)&&i.setEnd(a,r-1),l=i.toString(),c=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),c&&("www."==c[1]?c[1]="http://www.":/@$/.test(c[1])&&!/^mailto:/.test(c[1])&&(c[1]="mailto:"+c[1]),s=t.selection.getBookmark(),t.selection.setRng(i),t.execCommand("createlink",!1,c[1]+c[2]),t.selection.moveToBookmark(s),t.nodeChanged(),tinymce.Env.webkit)){t.selection.collapse(!1);var m=Math.min(a.length,r+1);i.setStart(a,m),i.setEnd(a,m),t.selection.setRng(i)}}t.on("keydown",function(e){return 13==e.keyCode?i(t):void 0}),tinymce.Env.ie||(t.on("keypress",function(n){return 41==n.which?e(t):void 0}),t.on("keyup",function(e){return 32==e.keyCode?n(t):void 0}))}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autoresize",function(e){function t(o){var a,r,s=e.getDoc(),l=s.body,c=s.documentElement,u=tinymce.DOM,d=n.autoresize_min_height;"setcontent"==o.type&&o.initial||e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()||(r=tinymce.Env.ie?l.scrollHeight:tinymce.Env.webkit&&0===l.clientHeight?0:l.offsetHeight,r>n.autoresize_min_height&&(d=r),n.autoresize_max_height&&r>n.autoresize_max_height?(d=n.autoresize_max_height,l.style.overflowY="auto",c.style.overflowY="auto"):(l.style.overflowY="hidden",c.style.overflowY="hidden",l.scrollTop=0),d!==i&&(a=d-i,u.setStyle(u.get(e.id+"_ifr"),"height",d+"px"),i=d,tinymce.isWebKit&&0>a&&t(o)))}var n=e.settings,i=0;e.settings.inline||(n.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),n.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){e.dom.setStyle(e.getBody(),"paddingBottom",e.getParam("autoresize_bottom_margin",50)+"px")}),e.on("change setcontent paste keyup",t),e.getParam("autoresize_on_init",!0)&&e.on("load",t),e.addCommand("mceAutoResize",t))}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(m.getItem(f+"autosave.time"),10)||0;return(new Date).getTime()-e>d.autosave_retention?(i(),!1):!0}function i(){m.removeItem(f+"autosave.draft"),m.removeItem(f+"autosave.time")}function o(){u&&e.isDirty()&&(m.setItem(f+"autosave.draft",e.getContent({format:"raw",no_events:!0})),m.setItem(f+"autosave.time",(new Date).getTime()),e.fire("StoreDraft"))}function a(){n()&&(e.setContent(m.getItem(f+"autosave.draft"),{format:"raw"}),i(),e.fire("RestoreDraft"))}function r(){u||(setInterval(function(){e.removed||o()},d.autosave_interval),u=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft",function(){t.disabled(!n())}),r()}function l(){e.undoManager.beforeChange(),a(),e.undoManager.add()}function c(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}var u,d=e.settings,m=tinymce.util.LocalStorage,f=e.id;d.autosave_interval=t(d.autosave_interval,"30s"),d.autosave_retention=t(d.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),this.storeDraft=o,window.onbeforeunload=c}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(e){var t=this,n=e.getParam("bbcode_dialect","punbb").toLowerCase();e.on("beforeSetContent",function(e){e.content=t["_"+n+"_bbcode2html"](e.content)}),e.on("postProcess",function(e){e.set&&(e.content=t["_"+n+"_bbcode2html"](e.content)),e.get&&(e.content=t["_"+n+"_html2bbcode"](e.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),t(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),t(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),t(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),t(/(.*?)<\/font>/gi,"$1"),t(//gi,"[img]$1[/img]"),t(/(.*?)<\/span>/gi,"[code]$1[/code]"),t(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),t(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),t(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),t(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),t(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),t(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),t(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),t(/<\/(strong|b)>/gi,"[/b]"),t(/<(strong|b)>/gi,"[b]"),t(/<\/(em|i)>/gi,"[/i]"),t(/<(em|i)>/gi,"[i]"),t(/<\/u>/gi,"[/u]"),t(/(.*?)<\/span>/gi,"[u]$1[/u]"),t(//gi,"[u]"),t(/]*>/gi,"[quote]"),t(/<\/blockquote>/gi,"[/quote]"),t(/
/gi,"\n"),t(//gi,"\n"),t(/
/gi,"\n"),t(/

/gi,""),t(/<\/p>/gi,"\n"),t(/ |\u00a0/gi," "),t(/"/gi,'"'),t(/</gi,"<"),t(/>/gi,">"),t(/&/gi,"&"),e},_punbb_bbcode2html:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/\n/gi,"
"),t(/\[b\]/gi,""),t(/\[\/b\]/gi,""),t(/\[i\]/gi,""),t(/\[\/i\]/gi,""),t(/\[u\]/gi,""),t(/\[\/u\]/gi,""),t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),t(/\[url\](.*?)\[\/url\]/gi,'$1'),t(/\[img\](.*?)\[\/img\]/gi,''),t(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),t(/\[code\](.*?)\[\/code\]/gi,'$1 '),t(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),e}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}(); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("code",function(e){function t(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:600,minHeight:500,value:e.getContent({source_view:!0}),spellcheck:!1},onSubmit:function(t){e.setContent(t.data.code)}})}e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/compat3x/editable_selects.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editable_selects.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | var TinyMCE_EditableSelects = { 12 | editSelectElm : null, 13 | 14 | init : function() { 15 | var nl = document.getElementsByTagName("select"), i, d = document, o; 16 | 17 | for (i=0; i'}),e+=""}),e+=""}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];e.addButton("emoticons",{type:"panelbutton",popoverAlign:"bc-tl",panel:{autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(e.insertContent(''),this.hide())}},tooltip:"Emoticons"})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/example/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example",function(e){e.addButton("example",{text:"My button",icon:!1,onclick:function(){e.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(t){e.insertContent("Title: "+t.data.title)}})}}),e.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){e.windowManager.open({title:"TinyMCE site",url:"http://www.tinymce.com",width:800,height:600,buttons:[{text:"Close",onclick:"close"}]})}})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/example_dependency/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example_dependency",function(){},["example"]); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,o=i.body;return o.offsetWidth&&(e=o.offsetWidth,t=o.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){l.setStyle(c,"height",t().h-(s.clientHeight-c.clientHeight))}var s,c,u,d=document.body,m=document.documentElement;r=!r,s=e.getContainer().firstChild,c=e.getContentAreaContainer().firstChild,u=c.style,r?(i=u.width,o=u.height,u.width=u.height="100%",l.addClass(d,"mce-fullscreen"),l.addClass(m,"mce-fullscreen"),l.addClass(s,"mce-fullscreen"),l.bind(window,"resize",n),n(),a=n):(u.width=i,u.height=o,l.removeClass(d,"mce-fullscreen"),l.removeClass(m,"mce-fullscreen"),l.removeClass(s,"mce-fullscreen"),l.unbind(window,"resize",a)),e.fire("FullscreenStateChanged",{state:r})}var i,o,a,r=!1,l=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){a&&l.unbind(window,"resize",a)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return r}}}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"


")}),e.addButton("hr",{icon:"hr",tooltip:"Insert horizontal ruler",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/image/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("image",function(e){function t(t){return function(){var n=e.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(){var e=[{text:"None",value:""}];return tinymce.each(t,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function i(e){var t,n,i,o;t=l.find("#width")[0],n=l.find("#height")[0],i=t.value(),o=n.value(),l.find("#constrain")[0].checked()&&c&&u&&i&&o&&(e.control==t?(o=Math.round(i/c*o),n.value(o)):(i=Math.round(o/u*i),t.value(i))),c=i,u=o}function o(){function t(t){t.onload=t.onerror=function(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}}var n=l.toJSON();""===n.width&&(n.width=null),""===n.height&&(n.height=null),""===n.style&&(n.style=null),n={src:n.src,alt:n.alt,width:n.width,height:n.height,style:n.style},g?m.setAttribs(g,n):(n.id="__mcenew",e.insertContent(m.createHTML("img",n)),g=m.get("__mcenew"),m.setAttrib(g,"id",null)),t(g)}function a(e){return e&&(e=e.replace(/px$/,"")),e}function r(){function e(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}var t=l.toJSON(),n=m.parseStyle(t.style);delete n.margin,n["margin-top"]=n["margin-bottom"]=e(t.vspace),n["margin-left"]=n["margin-right"]=e(t.hspace),n["border-width"]=e(t.border),l.find("#style").value(m.serializeStyle(m.parseStyle(m.serializeStyle(n))))}var l,s,c,u,d,m=e.dom,g=e.selection.getNode();c=m.getAttrib(g,"width"),u=m.getAttrib(g,"height"),"IMG"!=g.nodeName||g.getAttribute("data-mce-object")?g=null:s={src:m.getAttrib(g,"src"),alt:m.getAttrib(g,"alt"),width:c,height:u},t&&(d={name:"target",type:"listbox",label:"Image list",values:n(),onselect:function(e){var t=l.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),l.find("#src").value(e.control.value())}});var f=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0},d,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:i},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:i},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}];e.settings.image_advtab?(g&&(s.hspace=a(g.style.marginLeft||g.style.marginRight),s.vspace=a(g.style.marginTop||g.style.marginBottom),s.border=a(g.style.borderWidth),s.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(g,"style")))),l=e.windowManager.open({title:"Edit image",data:s,bodyType:"tabpanel",body:[{title:"General",type:"form",items:f},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:r},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:o})):l=e.windowManager.open({title:"Edit image",data:s,body:f,onSubmit:o})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:t(n),stateSelector:"img:not([data-mce-object])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:t(n),context:"insert",prependToContext:!0})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function l(e,t){if(e=""+e,e.lengthl&&o[i]==r&&(l=i);if(0>n){for(i=0;i-1?(o[l].style.zIndex=a[s],o[s].style.zIndex=a[l]):a[l]>0&&(o[l].style.zIndex=a[l]-1)}else{for(i=0;ia[l]){s=i;break}s>-1?(o[l].style.zIndex=a[s],o[s].style.zIndex=a[l]):o[l].style.zIndex=a[l]+1}e.execCommand("mceRepaint")}function o(){var t=e.dom,n=t.getPos(t.getParent(e.selection.getNode(),"*")),i=e.getBody();e.dom.add(i,"div",{style:{position:"absolute",left:n.x,top:n.y>20?n.y:20,width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},e.selection.getContent()||e.getLang("layer.content")),tinymce.Env.ie&&t.setHTML(i,i.innerHTML)}function a(){var n=t(e.selection.getNode());n||(n=e.dom.getParent(e.selection.getNode(),"DIV,P,IMG")),n&&("absolute"==n.style.position.toLowerCase()?(e.dom.setStyles(n,{position:"",left:"",top:"",width:"",height:""}),e.dom.removeClass(n,"mceItemVisualAid"),e.dom.removeClass(n,"mceItemLayer")):(n.style.left||(n.style.left="20px"),n.style.top||(n.style.top="20px"),n.style.width||(n.style.width=n.width?n.width+"px":"100px"),n.style.height||(n.style.height=n.height?n.height+"px":"100px"),n.style.position="absolute",e.dom.setAttrib(n,"data-mce-style",""),e.addVisual(e.getBody())),e.execCommand("mceRepaint"),e.nodeChanged())}e.addCommand("mceInsertLayer",o),e.addCommand("mceMoveForward",function(){i(1)}),e.addCommand("mceMoveBackward",function(){i(-1)}),e.addCommand("mceMakeAbsolute",function(){a()}),e.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"}),e.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"}),e.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"}),e.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"}),e.on("init",function(){tinymce.Env.ie&&e.getDoc().execCommand("2D-Position",!1,!0)}),e.on("mouseup",function(n){var i=t(n.target);i&&e.dom.setAttrib(i,"data-mce-style","")}),e.on("mousedown",function(n){var i,o=n.target,a=e.getDoc();tinymce.Env.gecko&&(t(o)?"on"!==a.designMode&&(a.designMode="on",o=a.body,i=o.parentNode,i.removeChild(o),i.appendChild(o)):"on"==a.designMode&&(a.designMode="off"))}),e.on("NodeChange",n)}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e.on("AddEditor",function(e){e.editor.settings.inline_styles=!1}),e.PluginManager.add("legacyoutput",function(t){t.on("init",function(){var n="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",i=e.explode(t.settings.font_size_style_values),o=t.schema;t.formatter.register({alignleft:{selector:n,attributes:{align:"left"}},aligncenter:{selector:n,attributes:{align:"center"}},alignright:{selector:n,attributes:{align:"right"}},alignjustify:{selector:n,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(i,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){o.addValidElements(e+"[*]")}),o.getElementRule("font")||o.addValidElements("font[face|size|color|style]"),e.each(n.split(","),function(e){var t=o.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}(tinymce); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/link/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("link",function(e){function t(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(){var e=[{text:"None",value:""}];return tinymce.each(t,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function i(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function o(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function a(){s||0!==g.text.length||this.parent().parent().find("#text")[0].value(this.value())}var r,l,s,c,u,d,m,g={},f=e.selection,h=e.dom;e.focus(),r=f.getNode(),l=h.getParent(r,"a[href]"),l&&f.select(l),g.text=s=f.getContent({format:"text"}),g.href=l?h.getAttrib(l,"href"):"",g.target=l?h.getAttrib(l,"target"):"",g.rel=l?h.getAttrib(l,"rel"):"","IMG"==r.nodeName&&(g.text=s=" "),t&&(u={type:"listbox",label:"Link list",values:n(),onselect:function(e){var t=c.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),c.find("#href").value(e.control.value())}}),e.settings.target_list!==!1&&(m={name:"target",type:"listbox",label:"Target",values:o(g.target)}),e.settings.rel_list&&(d={name:"rel",type:"listbox",label:"Rel",values:i(g.rel)}),c=e.windowManager.open({title:"Insert link",data:g,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:a,onkeyup:a},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){g.text=this.value()}},u,d,m],onSubmit:function(t){function n(t,n){window.setTimeout(function(){e.windowManager.confirm(t,n)},0)}function i(){o.text!=s?l?(e.focus(),l.innerHTML=o.text,h.setAttribs(l,{href:a,target:o.target?o.target:null,rel:o.rel?o.rel:null}),f.select(l)):e.insertContent(h.createHTML("a",{href:a,target:o.target?o.target:null,rel:o.rel?o.rel:null},o.text)):e.execCommand("mceInsertLink",!1,{href:a,target:o.target,rel:o.rel?o.rel:null})}var o=t.data,a=o.href;return a?a.indexOf("@")>0&&-1==a.indexOf("//")?(n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(a="mailto:"+a),i()}),void 0):/^\s*www\./i.test(a)?(n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(a="http://"+a),i()}),void 0):(i(),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link(s)",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",n),this.showDialog=n,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/media/moxieplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/plugins/media/moxieplayer.swf -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("nonbreaking",function(e){e.addCommand("mceNonBreaking",function(){e.insertContent(e.plugins.visualchars&&e.plugins.visualchars.state?' ':" ")}),e.addButton("nonbreaking",{title:"Insert nonbreaking space",cmd:"mceNonBreaking"}),e.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),e.getParam("nonbreaking_force_tab")&&e.on("keydown",function(t){9==t.keyCode&&(t.preventDefault(),e.execCommand("mceNonBreaking"),e.execCommand("mceNonBreaking"),e.execCommand("mceNonBreaking"))})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("pagebreak",function(e){var t,n="mce-pagebreak",i=e.getParam("pagebreak_separator",""),a='';t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),e.addCommand("mcePageBreak",function(){e.execCommand("mceInsertContent",0,a)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,n)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,n)&&e.selection.select(t)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(t,a)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(e){for(var t,n,a=e.length;a--;)t=e[a],n=t.attr("class"),n&&-1!==n.indexOf("mce-pagebreak")&&(t.type=3,t.value=i,t.raw=!0)})})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("preview",function(e){var t=e.settings;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'',buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var n,i=this.getEl("body").firstChild.contentWindow.document,a="";tinymce.each(e.contentCSS,function(t){a+=''});var o=t.body_id||"tinymce";-1!=o.indexOf("=")&&(o=e.getParam("body_id","","hash"),o=o[e.id]||o);var r=t.body_class||"";-1!=r.indexOf("=")&&(r=e.getParam("body_class","","hash"),r=r[e.id]||""),n=""+a+""+''+e.getContent()+""+"",i.open(),i.write(n),i.close()}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("print",function(e){e.addCommand("mcePrint",function(){e.getWin().print()}),e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("save",function(e){function t(){var t,n;return t=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty")||e.isDirty()?(tinymce.triggerSave(),(n=e.getParam("save_onsavecallback"))?(e.execCallback("save_onsavecallback",e)&&(e.startContent=tinymce.trim(e.getContent({format:"raw"})),e.nodeChanged()),void 0):(t?(e.isNotDirty=!0,(!t.onsubmit||t.onsubmit())&&("function"==typeof t.submit?t.submit():e.windowManager.alert("Error: Form submit field collision.")),e.nodeChanged()):e.windowManager.alert("Error: No form element found."),void 0)):void 0}function n(){var t,n=tinymce.trim(e.startContent);return(t=e.getParam("save_oncancelcallback"))?(e.execCallback("save_oncancelcallback",e),void 0):(e.setContent(n),e.undoManager.clear(),e.nodeChanged(),void 0)}function i(){var t=this;e.on("nodeChange",function(){t.disabled(!e.isDirty())})}e.addCommand("mceSave",t),e.addCommand("mceCancel",n),e.addButton("save",{text:"Save",cmd:"mceSave",disabled:!0,onPostRender:i}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:i}),e.addShortcut("ctrl+s","","mceSave")}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("tabfocus",function(e){function t(e){9===e.keyCode&&e.preventDefault()}function n(t){function n(t){function n(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&n(e.parentNode)}function o(e){return e.attributes.tabIndex.specified||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function c(e){return!o(e)&&"-1"!=e.getAttribute("tabindex")&&n(e)}if(l=i.select(":input:enabled,*[tabindex]:not(iframe)"),a(l,function(t,n){return t.id==e.id?(r=n,!1):void 0}),t>0){for(s=r+1;s=0;s--)if(c(l[s]))return l[s];return null}var r,l,c,s;9===t.keyCode&&(c=o(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==c.length&&(c[1]=c[0],c[0]=":prev"),l=t.shiftKey?":prev"==c[0]?n(-1):i.get(c[0]):":next"==c[1]?n(1):i.get(c[1]),l&&(l.id&&(e=tinymce.get(l.id||l.name))?e.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),l.focus()},10),t.preventDefault()))}var i=tinymce.DOM,a=tinymce.each,o=tinymce.explode;e.on("keyup",t),tinymce.Env.gecko?e.on("keypress keydown",n):e.on("keydown",n)}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/template/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("template",function(e){function t(){function t(e){var t=e.control.value();t.url?tinymce.util.XHR.send({url:t.url,success:function(e){i=e,n.find("iframe")[0].html(e)}}):(i=t.content,n.find("iframe")[0].html(t.content)),n.find("#description")[0].text(e.control.value().description)}var n,i,r=[];return e.settings.templates?(tinymce.each(e.settings.templates,function(e){r.push({selected:!r.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),n=e.windowManager.open({title:"Insert template",body:[{type:"listbox",name:"template",flex:0,label:"Templates",values:r,onselect:t},{type:"label",name:"description",label:"Description",text:" "},{type:"iframe",minWidth:600,minHeight:400,border:1}],onsubmit:function(){a(!1,i)}}),n.find("listbox")[0].fire("select"),void 0):(e.windowManager.alert("No templates defined"),void 0)}function n(t,n){function i(e,t){if(e=""+e,e.length0&&(l=s.create("div",null),l.appendChild(c[0].cloneNode(!0))),r(s.select("*",l),function(t){o(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),o(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),o(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=d)}),i(l),e.execCommand("mceInsertContent",!1,l.innerHTML),e.addVisual()}var r=tinymce.each;e.addCommand("mceInsertTemplate",a),e.addButton("template",{title:"Insert template",onclick:t}),e.addMenuItem("template",{text:"Insert template",onclick:t,context:"insert"}),e.on("PreProcess",function(t){var a=e.dom;r(a.select("div",t.node),function(t){a.hasClass(t,"mceTmpl")&&(r(a.select("*",t),function(t){a.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),i(t))})})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("textcolor",function(e){function t(){var t,n,i=[];for(n=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Brown","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],t=0;t',o=n.length-1,r=e.settings.textcolor_rows||5,l=e.settings.textcolor_cols||8,s=0;r>s;s++){for(a+="",c=0;l>c;c++)d=s*l+c,d>o?a+="":(i=n[d],a+='
'+"
"+"");a+=""}return a+=""}function i(t){var n,i=this.parent();(n=t.target.getAttribute("data-mce-color"))&&(i.hidePanel(),n="#"+n,i.color(n),e.execCommand(i.settings.selectcmd,!1,n))}function a(){var t=this;t._color&&e.execCommand(t.settings.selectcmd,!1,t._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",popoverAlign:"bc-tl",selectcmd:"ForeColor",panel:{html:n,onclick:i},onclick:a}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",popoverAlign:"bc-tl",selectcmd:"HiliteColor",panel:{html:n,onclick:i},onclick:a})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualblocks",function(e,t){var n,i,a;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var o,r=e.dom;n||(n=r.uniqueId(),o=r.create("link",{id:n,rel:"stylesheet",href:t+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(o)),e.on("PreviewFormats AfterPreviewFormats",function(t){a&&r.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==t.type)}),r.toggleClass(e.getBody(),"mce-visualblocks"),a=e.dom.hasClass(e.getBody(),"mce-visualblocks"),i&&i.active(r.hasClass(e.getBody(),"mce-visualblocks"))}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks"}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:function(){i=this,i.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))},selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/visualchars/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualchars",function(e){function t(t){var a,o,r,l,c,s,d=e.getBody(),u=e.selection;if(n=!n,i.active(n),t&&(s=u.getBookmark()),n)for(o=[],tinymce.walk(d,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&o.push(e)},"childNodes"),r=0;r$1
'),c=e.dom.create("div",null,l);a=c.lastChild;)e.dom.insertAfter(a,o[r]);e.dom.remove(o[r])}else for(o=e.dom.select("span.mce-nbsp",d),r=o.length-1;r>=0;r--)e.dom.remove(o[r],1);u.moveToBookmark(s)}var n,i;e.addCommand("mceVisualChars",t),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars"}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:function(){i=this},selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,t(!1))})}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/plugins/wordcount/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,i,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-]+/g),i=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount"},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),t=t.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," "),t=t.replace(i,"");var o=t.match(n);o&&(a=o.length)}return a}}); -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:green;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/content.min.css: -------------------------------------------------------------------------------- 1 | body{background-color:#fff;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#f0f0ee;scrollbar-arrow-color:#676662;scrollbar-base-color:#f0f0ee;scrollbar-darkshadow-color:#ddd;scrollbar-face-color:#e0e0dd;scrollbar-highlight-color:#f0f0ee;scrollbar-shadow-color:#f0f0ee;scrollbar-track-color:#f5f5f5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:green;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon-small.eot -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon-small.ttf -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon-small.woff -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon.eot -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon.ttf -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/icomoon.woff -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/fonts/readme.md: -------------------------------------------------------------------------------- 1 | Icons are generated and provided by the http://icomoon.io service. 2 | -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/wline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/static/js/lib/tinymce-4.0.0/skins/lightgray/img/wline.gif -------------------------------------------------------------------------------- /public_project/static/js/tag_cloud-0.5.2.js: -------------------------------------------------------------------------------- 1 | var tc_div_id = null; 2 | var tc_document_id = null; 3 | var tc_base_url = null; 4 | var tc_height = null; 5 | 6 | 7 | function load_tag_cloud(div_id, document_id, content_type, base_url, height) { 8 | tc_div_id = div_id; 9 | tc_document_id = document_id; 10 | tc_content_type = content_type; 11 | tc_base_url = base_url; 12 | tc_height = height; 13 | 14 | $(div_id).empty(); 15 | 16 | var width = $(div_id).width(); 17 | var half_width = Math.round(width/2); 18 | var half_height = Math.round(height/2) + 5; 19 | 20 | function draw_tag_cloud(words) { 21 | d3.select(div_id).append("svg") 22 | .attr("width", width) 23 | .attr("height", height) 24 | .append("g") 25 | .attr("transform", "translate(" + half_width + "," + half_height + ")") 26 | .selectAll("text") 27 | .data(words) 28 | .enter().append("text") 29 | .style("font-size", function(d) { return d.size + "px"; }) 30 | .style("font-family", "Arial") 31 | .style("fill", function(d, i) { return d.color; }) 32 | .attr("text-anchor", "middle") 33 | .attr("transform", function(d) { 34 | return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; 35 | }) 36 | .text(function(d) { return d.text; }) 37 | .on("click", function(d) { 38 | window.location = base_url + "?q=" + encodeURIComponent(d.text); 39 | }); 40 | } 41 | 42 | $.ajax({ 43 | type: 'POST', 44 | url: '/xhr/document_tags/', 45 | dataType: 'json', 46 | data: { 47 | csrfmiddlewaretoken: csrf_token, 48 | document_id: document_id, 49 | content_type: content_type, 50 | }, 51 | success: function(data) { 52 | if (data.length < 1) { 53 | $(div_id).append('
' + tag_cloud_not_available_msg + '
'); 54 | } else { 55 | d3.layout.cloud() 56 | .size([width, height]) 57 | .words(data.map(function(d) { 58 | return { text: d.text, size:d.size, color: d.color } 59 | })) 60 | .rotate(0) 61 | .font("Arial") 62 | .fontSize(function(d) { return d.size; }) 63 | .startPoint([150, 70]) 64 | .on("end", draw_tag_cloud) 65 | .start(); 66 | } 67 | }, 68 | error: function() { 69 | $(div_id).append('
' + tag_cloud_error_msg + '
'); 70 | } 71 | }) 72 | } 73 | 74 | 75 | var tc_rtime = new Date(1, 1, 2000, 12,00,00); 76 | var tc_timeout = false; 77 | var tc_delta = 200; 78 | $(window).resize(function() { 79 | tc_rtime = new Date(); 80 | if (tc_timeout === false) { 81 | tc_timeout = true; 82 | setTimeout(tc_resizeend, tc_delta); 83 | } 84 | }); 85 | 86 | function tc_resizeend() { 87 | if (new Date() - tc_rtime < tc_delta) { 88 | setTimeout(tc_resizeend, tc_delta); 89 | } else { 90 | tc_timeout = false; 91 | if(tc_div_id) { 92 | load_tag_cloud(tc_div_id, tc_document_id, tc_content_type, tc_base_url, tc_height); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /public_project/tag_cache_creator.py: -------------------------------------------------------------------------------- 1 | from public_project.models import Document, Page, SearchTag, SearchTagCacheEntry 2 | from public_project.search import get_query 3 | 4 | 5 | 6 | def create_cache_entry(tag, document): 7 | entry_query = get_query(tag.name, ['document__title', 'content',]) 8 | num_results = Page.objects.select_related().filter(document=document).filter(entry_query).count() 9 | 10 | if num_results > 0: 11 | ce = SearchTagCacheEntry() 12 | if SearchTagCacheEntry.objects.filter(document=document).filter(tag__name=tag.name).count() == 0 and \ 13 | SearchTagCacheEntry.objects.filter(document=document).filter(tag__name=tag.name.title()).count() == 0 and \ 14 | SearchTagCacheEntry.objects.filter(document=document).filter(tag__name=tag.name.upper()).count() == 0: 15 | ce.tag = tag 16 | ce.document = document 17 | ce.num_results = num_results 18 | ce.save() 19 | 20 | 21 | def rebuild_cache_for_tag(tag): 22 | tag.searchtagcacheentry_set.all().delete() 23 | docs = Document.objects.all() 24 | for doc in docs: 25 | create_cache_entry(tag, doc) 26 | 27 | def rebuild_cache_for_object(object): 28 | for tag in object.search_tags.all(): 29 | rebuild_cache_for_tag(tag) 30 | 31 | 32 | def rebuild_cache_for_document(document): 33 | SearchTagCacheEntry.objects.filter(document=document).delete() 34 | 35 | for tag in SearchTag.objects.all(): 36 | create_cache_entry(tag, document) 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /public_project/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - 404{% endblock %} 5 | 6 | {% block content %} 7 | 8 | 9 |
10 | 11 |
12 | 13 | {% trans "The page you requested could not be found." %} 14 |
15 | 16 |
17 | 18 | 19 | {% endblock %} -------------------------------------------------------------------------------- /public_project/templates/api.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - Content API{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% with ch_icon="icon-exchange" ch_title="Content API" ch_bc1="Content API" %} 9 | {% include "layout_elements/category_header.html" %} 10 | {% endwith %} 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |
20 |
21 | Developers can access the content of this website through a public API 22 | delivering JSON feeds for various object types of this website like 23 | events, participants or documents. 24 |
25 |
26 |
27 | 28 | {% with sh_title="API Access" sh_icon="" sh_url_title="" %} 29 | {% include "layout_elements/section_header.html" %} 30 | {% endwith %} 31 | 32 |
33 |
34 |
35 |

36 | The API content can be accessed by using an API endpoint and adding 37 | ?format=json as a parameter, e.g.: 38 |

39 |
/api/v0.1/events/?format=json
40 |
41 |
42 |
43 | 44 | {% with sh_title="Accessing Single Objects" sh_icon="" sh_url_title="" %} 45 | {% include "layout_elements/section_header.html" %} 46 | {% endwith %} 47 | 48 |
49 |
50 |
51 |

52 | Single objects can be accessed like this: 53 |

54 |
/api/v0.1/events/{id}/?format=json
55 |
/api/v0.1/events/set/{id};{id}/?format=json
56 |
57 |
58 |
59 | 60 |
61 | 62 |
63 |
Current version of the API: v0.1
64 | 65 | {% with sh_title="Entry Points" sh_icon="" sh_url_title="" %} 66 | {% include "layout_elements/section_header.html" %} 67 | {% endwith %} 68 |
69 | 70 | 88 | 89 | 90 |
91 | 92 | {% endblock %} -------------------------------------------------------------------------------- /public_project/templates/comments.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Comments" %}{% endblock %} 5 | 6 | {% block rss_url %} 7 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | {% if content_type == 'project_part' %} 14 | {% trans "Project" as ph_bc1 %} 15 | {% trans "project_url" as ph_bc1_url %} 16 | {% trans "Project Part" as ph_bc2 %} 17 | {% endif %} 18 | 19 | {% if content_type == 'question' %} 20 | {% trans "Questions" as ph_bc1 %} 21 | {% trans "questions_url" as ph_bc1_url %} 22 | {% trans "Question" as ph_bc2 %} 23 | {% endif %} 24 | 25 | {% if content_type == 'participant' %} 26 | {% trans "Participants" as ph_bc1 %} 27 | {% trans "participants_url" as ph_bc1_url %} 28 | {% trans "Participant" as ph_bc2 %} 29 | {% endif %} 30 | 31 | {% if content_type == 'event' %} 32 | {% trans "Events" as ph_bc1 %} 33 | {% trans "events_url" as ph_bc1_url %} 34 | {% trans "Event" as ph_bc2 %} 35 | {% endif %} 36 | 37 | {% if content_type == 'document' %} 38 | {% trans "Documents" as ph_bc1 %} 39 | {% trans "documents_url" as ph_bc1_url %} 40 | {% trans "Document" as ph_bc2 %} 41 | {% endif %} 42 | 43 | {% if not content_type %} 44 | {% with ph_icon='icon-home' ph_title='Home' ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 ph_bc2_url=commented_object.get_absolute_url %} 45 | {% include "layout_elements/comments_header.html" %} 46 | {% endwith %} 47 | {% else %} 48 | {% with ph_icon=commented_object.get_icon_class ph_title=ph_title ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 ph_bc2_url=commented_object.get_absolute_url %} 49 | {% include "layout_elements/comments_header.html" %} 50 | {% endwith %} 51 | {% endif %} 52 | 53 |
54 | 55 |
56 | 57 |
58 | 59 | {% trans "All Comments" as sh_title %} 60 | {% with sh_title=sh_title sh_icon="icon-comments" sh_url_title="" sh_url="#CommentModal" modal_url="yes" rss_url="rss/" %} 61 | {% include "layout_elements/section_header.html" %} 62 | {% endwith %} 63 | 64 | {% include "info_box/comments.html" %} 65 | 66 |
67 | 68 |
69 | 70 |
71 | 72 | {% endblock %} -------------------------------------------------------------------------------- /public_project/templates/contact.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Contact" %}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Contact" as ch_title %} 9 | {% with ch_icon="icon-pushpin" ch_title=ch_title ch_bc1=ch_title %} 10 | {% include "layout_elements/category_header.html" %} 11 | {% endwith %} 12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 |
21 |
22 | {{ site_config.contact_text|safe }} 23 |
24 |
25 |
26 |
27 | 28 | {% trans "Disclaimer" as sh_title %} 29 | {% with sh_title=sh_title sh_icon="icon-warning-sign" sh_url_title="" %} 30 | {% include "layout_elements/section_header.html" %} 31 | {% endwith %} 32 | 33 |
34 |
35 |
36 | {% trans "disclaimer_text" %} 37 |
38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 | {% trans "Credits" as sh_title %} 46 | {% with sh_title=sh_title sh_icon="icon-heart" sh_url_title="" %} 47 | {% include "layout_elements/section_header.html" %} 48 | {% endwith %} 49 | 50 |
51 |
52 |
53 | {% trans "credits_opensource_text" %} 54 | 55 | 75 |
76 |
77 |
78 | 79 | {% trans "Pictures" as sh_title %} 80 | {% with sh_title=sh_title sh_icon="icon-picture" sh_url_title="" %} 81 | {% include "layout_elements/section_header.html" %} 82 | {% endwith %} 83 | 84 |
85 |
86 |
87 |
88 | {% trans "credits_pictures_text" %} 89 |
90 | 91 | 92 | {% for image in image_list %} 93 | 94 | 95 | 104 | 105 | {% endfor %} 106 |
{{ image.title }} 96 | {% if image.attribution_url %} 97 | 98 | {% endif %} 99 | {{ image.attribution }} 100 | {% if image.attribution_url %} 101 | 102 | {% endif %} 103 |
107 |
108 |
109 |
110 | 111 |
112 | 113 | {% endblock %} 114 | -------------------------------------------------------------------------------- /public_project/templates/dev/logo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DPP DEV - Logos 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 34 | 35 | 36 | 37 |
38 | 39 |
40 | 41 |

Django Public Project (DEV) - Logo Template

42 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 |
58 |
59 |

DJANGO

60 |

Public Project

61 |
62 |
63 | 64 |
65 | 66 |
67 | 68 | 69 | -------------------------------------------------------------------------------- /public_project/templates/dialogs/generic_confirm.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 15 | 16 | -------------------------------------------------------------------------------- /public_project/templates/documents.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Documents" %}{% endblock %} 5 | 6 | {% block rss_url %} 7 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | {% trans "Documents" as ch_title %} 14 | {% with ch_icon="icon-inbox" ch_title=ch_title ch_bc1=ch_title %} 15 | {% include "layout_elements/category_header.html" %} 16 | {% endwith %} 17 | 18 |
19 | 20 |
21 | 22 |
23 |
24 | {% include "info_box/site_category_detail.html" %} 25 |
26 | 27 | {% include "layout_elements/ec_button_group.html" %} 28 | 29 | {% for mpp in main_project_part_list_left %} 30 | {% with ec_title=mpp ec_id=mpp.id ec_url="" ec_count=mpp.get_num_documents document_list=mpp.get_documents ec_box_include="info_box/documents.html" %} 31 | {% include "layout_elements/ec_header_box.html" %} 32 | {% endwith %} 33 | {% endfor %} 34 | 35 |
36 | 37 |
38 | 39 | {% if latest_document_list %} 40 | {% trans "New Documents" as sh_title %} 41 | {% with sh_title=sh_title rss_url="rss/" %} 42 | {% include "layout_elements/section_header.html" %} 43 | {% endwith %} 44 | 45 |
46 | {% with dd_with_header="yes" %} 47 | {% for document in latest_document_list %} 48 |
49 | {% include "info_box/document_detail.html" %} 50 |
51 | {% endfor %} 52 | {% endwith %} 53 |
54 | {% endif %} 55 | 56 | {% for mpp in main_project_part_list_right %} 57 | {% with ec_title=mpp ec_id=mpp.id ec_url="" ec_count=mpp.get_num_documents document_list=mpp.get_documents ec_box_include="info_box/documents.html" %} 58 | {% include "layout_elements/ec_header_box.html" %} 59 | {% endwith %} 60 | {% endfor %} 61 |
62 | 63 | {% endblock %} 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /public_project/templates/event.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {{ event }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Events" as ph_bc1 %} 9 | {% trans "events_url" as ph_bc1_url %} 10 | {% trans "Event" as ph_bc2 %} 11 | {% with ph_icon="icon-time" ph_title=event.title ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 %} 12 | {% include "layout_elements/page_header.html" %} 13 | {% endwith %} 14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | {% include "info_box/event_detail.html" %} 23 |
24 | 25 | {% if document_list %} 26 | {% trans "Documents" as sh_title %} 27 | {% with sh_title=sh_title sh_ec_id="d_1" document_list=document_list %} 28 | {% include "info_box/documents.html" %} 29 | {% endwith %} 30 | {% endif %} 31 | 32 | {% with web_source_list=event.web_sources.all %} 33 | {% include "info_box/web_sources.html" %} 34 | {% endwith %} 35 | 36 | 37 | 38 |
39 | 40 |
41 | 42 | {% if site_config.show_questions_category and question_list.count > 0 %} 43 | 44 | {% include "info_box/questions.html" %} 45 | {% endif %} 46 | 47 | {% if content_document_list %} 48 | {% trans "Document Contents" as sh_title %} 49 | {% with sh_title=sh_title sh_ec_id="d_2" document_list=content_document_list %} 50 | {% include "info_box/documents.html" %} 51 | {% endwith %} 52 | {% endif %} 53 | 54 | {% if site_config.activate_comments %} 55 | {% trans "Comments" as sh_title %} 56 | {% trans "New" as sh_url_title %} 57 | {% trans "comments_url" as comments_url %} 58 | {% with sh_title=sh_title sh_icon="icon-comments" sh_url_title=sh_url_title sh_url="#CommentModal" modal_url="yes" rss_url=comments_url|add:"rss/" %} 59 | {% include "layout_elements/section_header.html" %} 60 | {% endwith %} 61 | {% with form=comment_form form_valid=comment_form_valid commented_object1=event %} 62 | {% include "dialogs/comment.html" %} 63 | {% endwith %} 64 | 65 | {% include "info_box/comments.html" %} 66 | {% endif %} 67 | 68 |
69 | 70 | {% endblock %} 71 | -------------------------------------------------------------------------------- /public_project/templates/events.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Events" %}{% endblock %} 5 | 6 | {% block rss_url %} 7 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | {% trans "Events" as ch_title %} 14 | {% with ch_icon="icon-time" ch_title=ch_title ch_bc1=ch_title %} 15 | {% include "layout_elements/category_header.html" %} 16 | {% endwith %} 17 | 18 |
19 | 20 |
21 | 22 |
23 | 24 |
25 | {% include "info_box/site_category_detail.html" %} 26 |
27 | 28 | {% trans "Chronology" as sh_title %} 29 | {% with sh_title=sh_title only_main="yes" id_addon="1" %} 30 | {% include "layout_elements/event_section_header.html" %} 31 | {% endwith %} 32 | 33 | {% with event_list=chronology_list class_addon="1" id_addon="1" %} 34 |
35 | {% for event in event_list %} 36 | {% include "info_box/event_compact.html" %} 37 | {% endfor %} 38 | 41 |
42 | {% endwith %} 43 | 44 |
45 | 46 |
47 | {% trans "Sorted by Topics" as sh_title %} 48 | {% with sh_title=sh_title id_addon="2" %} 49 | {% include "layout_elements/event_section_header.html" %} 50 | {% endwith %} 51 | 52 |
53 | 58 |
59 |
60 | 61 | {% for mpp in main_project_part_list %} 62 | {% with event_list=mpp.related_events.all id_addon=mpp.id class_addon="2" %} 63 |
64 | {% for event in mpp.get_events %} 65 | {% include "info_box/event_compact.html" %} 66 | {% endfor %} 67 | 70 |
71 | {% endwith %} 72 | {% endfor %} 73 | 74 | 88 | 89 |
90 | 91 | {% endblock %} 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /public_project/templates/goals.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Goals" %}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Goals" as ch_title %} 9 | {% with ch_icon="icon-bullseye" ch_title=ch_title ch_bc1=ch_title %} 10 | {% include "layout_elements/category_header.html" %} 11 | {% endwith %} 12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 | {% include "info_box/site_category_detail.html" %} 21 |
22 | 23 | {% if common_goal_group_list %} 24 | {% trans "Common" as common_title %} 25 | {% with sh_title=common_title sh_url_title="" %} 26 | {% include "layout_elements/section_header.html" %} 27 | {% endwith %} 28 | {% for pgg in common_goal_group_list %} 29 | {% include "info_box/project_goal_group.html" with with_details="yes" %} 30 | {% endfor %} 31 | {% endif %} 32 | 33 | {% for main_pp in main_project_part_list_left %} 34 | {% with sh_title=main_pp.name sh_url_title="" %} 35 | {% include "layout_elements/section_header.html" %} 36 | {% endwith %} 37 | {% for pgg in main_pp.projectgoalgroup_set.all %} 38 | {% include "info_box/project_goal_group.html" with with_details="yes" %} 39 | {% endfor %} 40 | {% endfor %} 41 | 42 |
43 | 44 |
45 | 46 | {% for main_pp in main_project_part_list_right %} 47 | {% with sh_title=main_pp.name sh_url_title="" %} 48 | {% include "layout_elements/section_header.html" %} 49 | {% endwith %} 50 | {% for pgg in main_pp.projectgoalgroup_set.all %} 51 | {% include "info_box/project_goal_group.html" with with_details="yes" %} 52 | {% endfor %} 53 | {% endfor %} 54 | 55 |
56 | 57 | {% endblock %} 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /public_project/templates/info_box/activities.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 |
6 |
7 |

8 | {% if activity_list %} 9 | {% for activity in activity_list %} 10 | 11 |

12 |
13 |
14 | {{ activity.get_type_display }}  15 | {{ activity.date|date }} 16 |
17 | 18 | {{ activity.content_object }} 19 |
20 | 21 |
22 |
23 | 24 | {% endfor %} 25 | {% else %} 26 | 27 | {% trans "No events available." %} 28 | 29 | {% endif %} 30 |

31 |
32 |
33 | 34 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/document_detail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | {% if dd_with_header %} 6 |

7 |   8 | {{ document.title }}   9 | 10 |

11 | {% endif %} 12 |

13 | {{ document.date }} 14 |

15 | 16 | {{ document.description|safe }} 17 |
18 | 19 | {% with project_part_list=document.project_parts.all size="small" %} 20 | {% if project_part_list %} 21 |

22 | {% if project_part_list|length <= 4 %} 23 | {% for pp in project_part_list %}{{ pp.get_simple_entry|safe }}
{% endfor %} 24 | {% else %} 25 | {% include "layout_elements/menu_project_parts.html" %} 26 | {% endif %} 27 |

28 | {% endif %} 29 | {% endwith %} 30 | 31 | {% with participant_list=document.participants.all size="small" %} 32 | {% if participant_list %} 33 |

34 | {% if participant_list|length <= 4 %} 35 | {% for p in participant_list %}{{ p.get_simple_entry|safe }}
{% endfor %} 36 | {% else %} 37 | {% include "layout_elements/menu_participants.html" %} 38 | {% endif %} 39 |

40 | {% endif %} 41 | {% endwith %} 42 | 43 | {% with event_list=document.events.all size="small" %} 44 | {% if event_list %} 45 |

46 | {% if event_list|length <= 4 %} 47 | {% for e in event_list %}{{ e.get_simple_entry|safe }}
{% endfor %} 48 | {% else %} 49 | {% include "layout_elements/menu_events.html" %} 50 | {% endif %} 51 |

52 | {% endif %} 53 | {% endwith %} 54 | 55 |
56 | 57 | 62 | 63 |
64 | -------------------------------------------------------------------------------- /public_project/templates/info_box/documents.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% if sh_title %} 4 | {% with sh_title=sh_title sh_ec_id=sh_ec_id sh_icon="icon-inbox" sh_url_title="" %} 5 | {% include "layout_elements/section_header.html" %} 6 | {% endwith %} 7 | {% endif %} 8 | 9 |
10 |
11 |
12 | {% if document_list %} 13 | 14 | 15 | 16 | 17 | 18 | {% for doc in document_list %} 19 | 20 | 33 | 34 | 35 | {% endfor %} 36 |
{% trans "Document" %}{% trans "Added" %}
{{ doc }} 21 |
22 | {{ doc.page_set.count }} {% trans "Pages" %} 23 | {% if doc.search_tags %} 24 | {% for tag in doc.search_tags %} 25 | 26 | {{ tag }} 27 | {% endfor %} 28 |
29 | {% endif %} 30 | 31 | 32 |
{{ doc.date_added|date }}
37 | {% else %} 38 | 39 | {% trans "No documents available." %} 40 | 41 | {% endif %} 42 |
43 |
44 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/event_compact.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 | 6 | 7 | 10 | 13 | 17 |
8 | {% if event.not_exact %}({% endif %}{{ event.date|date:"m/d/Y" }}{% if event.not_exact %}){% endif %} 9 | 11 | 12 | 14 | {{ event.title }} 15 | 16 |
18 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/event_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 |
5 |
6 | {% if ed_with_header %} 7 |

8 |   9 | {{ event.title }}   10 | 11 |

12 | {% endif %} 13 |

14 | {% if event.not_exact %}({% endif %}{{ event.date }}{% if event.not_exact %}){% endif %} 15 |

16 | {{ event.description|safe }} 17 |
18 | 19 | {% with project_part_list=event.project_parts.all size="small" %} 20 | {% if project_part_list %} 21 |

22 | {% if project_part_list|length <= 4 %} 23 | {% for pp in project_part_list %}{{ pp.get_simple_entry|safe }}
{% endfor %} 24 | {% else %} 25 | {% include "layout_elements/menu_project_parts.html" %} 26 | {% endif %} 27 |

28 | {% endif %} 29 | {% endwith %} 30 | 31 | {% with participant_list=event.participants.all size="small" %} 32 | {% if participant_list %} 33 |

34 | {% if participant_list|length <= 4 %} 35 | {% for p in participant_list %}{{ p.get_simple_entry|safe }}
{% endfor %} 36 | {% else %} 37 | {% include "layout_elements/menu_participants.html" %} 38 | {% endif %} 39 |

40 | {% endif %} 41 | {% endwith %} 42 | 43 |
44 |
45 | -------------------------------------------------------------------------------- /public_project/templates/info_box/events.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 |
6 |
7 |

8 | {% if event_list %} 9 | 10 | {% for event in event_list %} 11 | 12 | 16 | 19 | 22 | 23 | {% endfor %} 24 | 25 | 28 | 29 |
14 | {% if event.not_exact %}({% endif %}{{ event.date|date:"m/d/Y" }}{% if event.not_exact %}){% endif %} 15 | 17 | 18 | 20 | {{ event.title }} 21 |
30 | {% else %} 31 | 32 | {% trans "No events available." %} 33 | 34 | {% endif %} 35 |

36 |
37 |
38 | 39 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/generic.html: -------------------------------------------------------------------------------- 1 |
2 | {% if ib_title %} 3 |
4 | {{ ib_title }} 5 |
6 | {% endif %} 7 |
8 |

{{ ib_content|linebreaksbr }}

9 |
10 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/generic_html.html: -------------------------------------------------------------------------------- 1 |
2 | {% if ib_title %} 3 |
4 | {{ ib_title }} 5 |
6 | {% endif %} 7 |
8 |

9 | {{ ib_content|safe }} 10 |

11 |

12 |
13 |
14 | -------------------------------------------------------------------------------- /public_project/templates/info_box/memberships.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 | {% if membership_list %} 5 |
6 | 7 | {% for m in membership_list %} 8 | 9 | 12 | 13 | {% if 0 %} 14 | 24 | {% endif %} 25 | 26 | {% endfor %} 27 |
10 | {{ m.from_participant.name }} 11 | {{ m.function }} {% if not m.active %}({% trans "former" %}){% endif %} 15 | {% with web_source_list=m.from_participant.web_sources.all %} 16 | {% include "layout_elements/menu_web_sources.html" %} 17 | {% endwith %} 18 | {% if m.from_participant.get_num_active_user_comments %} 19 | 20 | {{ m.from_participant.get_num_active_user_comments }} 21 | 22 | {% endif %} 23 |
28 |
29 | {% else %} 30 | 31 | {% trans "No participants available." %} 32 | 33 | {% endif %} 34 | 35 | -------------------------------------------------------------------------------- /public_project/templates/info_box/participant_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 |
5 |
6 | {% if pd_with_header %} 7 |

8 |   9 | {{ participant.name }}   10 | 11 |

12 | {% endif %} 13 | {% if participant.belongs_to.count > 0 %} 14 |

15 | {% trans "Belongs to" %}:
16 | {% for bt_participant in participant.belongs_to.all %} 17 | {{ bt_participant }}
18 | {% endfor %} 19 |

20 | {% endif %} 21 | 22 | {{ participant.description|safe }} 23 |
24 | 25 |
26 |
27 | -------------------------------------------------------------------------------- /public_project/templates/info_box/participants.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 | {% if participant_list %} 5 |
6 | 7 | {% for p in participant_list %} 8 | 9 | 10 | 11 | {% endfor %} 12 |
{{ p.name }}
13 |
14 | {% else %} 15 | 16 | {% trans "No participants available." %} 17 | 18 | {% endif %} 19 | 20 | -------------------------------------------------------------------------------- /public_project/templates/info_box/pdf_navi.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | -------------------------------------------------------------------------------- /public_project/templates/info_box/pdf_viewer.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /public_project/templates/info_box/project_goal_group.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 |
6 |
7 | 8 | 9 | 19 | 20 | {% for pg in pgg.projectgoal_set.all %} 21 | 22 | 23 | 24 | 25 | {% endfor %} 26 | 27 | {% if with_details %} 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | {% endif %} 39 |
10 |
11 | {% if pgg.is_current %} 12 | {% trans "Current" %} 13 | {% else %} 14 | {% trans "Not current" %} 15 | {% endif %} 16 |
17 | {{ pgg.title }} 18 |
{{ pg.name }}{{ pg.performance_figure }}
{% trans "Agreement at" %}{{ pgg.event.title }} ({{ pgg.event.date }})
34 | {{ pgg.description }} 35 |
40 | 41 | 42 |
43 |
44 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/project_part_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 |
5 |
6 | {% if ppd_with_header %} 7 |

8 |   9 | {{ project_part.name }}   10 | 11 |

12 | {% endif %} 13 | {% if project_part.main_project_parts.count > 0 %} 14 |

15 | {% trans "Main Topics" %}:
16 | {% for main_pp in project_part.main_project_parts.all %} 17 | {{ main_pp }}
18 | {% endfor %} 19 |

20 | {% endif %} 21 | 22 | {{ project_part.description|safe }} 23 |
24 | 25 |
26 |
27 | -------------------------------------------------------------------------------- /public_project/templates/info_box/project_parts.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 | {% if project_part_list %} 5 |
6 | 7 | {% for pp in project_part_list %} 8 | 9 | 12 | 13 | {% endfor %} 14 |
10 | {{ pp.name }} 11 |
15 |
16 | {% else %} 17 | 18 | {% trans "No project_parts available." %} 19 | 20 | {% endif %} -------------------------------------------------------------------------------- /public_project/templates/info_box/question_detail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 | {% if qd_with_header %} 7 |

8 |   9 | {{ question.title }}   10 | 11 |

12 | {% endif %} 13 |

14 | {{ question.description|linebreaksbr }} 15 |

16 | 17 | {% with project_part_list=question.project_parts.all size="small" %} 18 | {% if project_part_list %} 19 |

20 | {% if project_part_list|length <= 4 %} 21 | {% for pp in project_part_list %}{{ pp.get_simple_entry|safe }}
{% endfor %} 22 | {% else %} 23 | {% include "layout_elements/menu_project_parts.html" %} 24 | {% endif %} 25 |

26 | {% endif %} 27 | {% endwith %} 28 | 29 | {% with participant_list=question.participants.all size="small" %} 30 | {% if participant_list %} 31 |

32 | {% if participant_list|length <= 4 %} 33 | {% for p in participant_list %}{{ p.get_simple_entry|safe }}
{% endfor %} 34 | {% else %} 35 | {% include "layout_elements/menu_participants.html" %} 36 | {% endif %} 37 |

38 | {% endif %} 39 | {% endwith %} 40 | 41 | {% with event_list=question.events.all size="small" %} 42 | {% if event_list %} 43 |

44 | {% if event_list|length <= 4 %} 45 | {% for e in event_list %}{{ e.get_simple_entry|safe }}
{% endfor %} 46 | {% else %} 47 | {% include "layout_elements/menu_events.html" %} 48 | {% endif %} 49 |

50 | {% endif %} 51 | {% endwith %} 52 | 53 |
54 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/questions.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% if sh_title %} 4 | {% trans "Questions" as sh_title %} 5 | {% with sh_title=sh_title sh_ec_id="q_1" sh_icon="icon-question-sign" sh_url_title="" %} 6 | {% include "layout_elements/section_header.html" %} 7 | {% endwith %} 8 | {% endif %} 9 | 10 |
11 | 12 | {% if question_list %} 13 |
14 | 15 | {% for q in question_list %} 16 | 17 | 29 | 30 |
31 |
32 |

33 | {{ q.description|linebreaksbr }} 34 |

35 | 36 |

37 | {% with project_part_list=q.project_parts.all %} 38 | {% if project_part_list %} 39 |

40 | {% for pp in project_part_list %} 41 | 42 | {{ pp }}
43 | {% endfor %} 44 |

45 | {% endif %} 46 | {% endwith %} 47 | 48 | {% with participant_list=q.participants.all %} 49 | {% if participant_list %} 50 |

51 | {% for p in participant_list %} 52 | 53 | {{ p }}
54 | {% endfor %} 55 |

56 | {% endif %} 57 | {% endwith %} 58 | 59 | {% with event_list=q.events.all %} 60 | {% if event_list %} 61 |

62 | {% for e in event_list %} 63 | 64 | {{ e }}
65 | {% endfor %} 66 |

67 | {% endif %} 68 | {% endwith %} 69 |

70 |
71 |
72 | 73 | {% endfor %} 74 |
75 | 76 | {% else %} 77 |
78 |
79 |

80 | 81 | {% trans "No questions available." %} 82 | 83 |

84 |
85 |
86 | {% endif %} 87 | 88 |
-------------------------------------------------------------------------------- /public_project/templates/info_box/site_category_detail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |

7 | {{ site_category.intro_text|safe }} 8 |

9 |

10 | 11 |

12 | {% for doc in site_category.documents.all %} 13 | {{ doc }}
14 | {% endfor %} 15 |

16 |

17 | {% for ws in site_category.web_sources.all %} 18 | {{ ws }}
19 | {% endfor %} 20 |

21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /public_project/templates/info_box/web_sources.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% if web_source_list %} 4 | {% trans "Web-Sources" as sh_title %} 5 | {% with sh_title=sh_title sh_ec_id="ws_1" sh_icon="icon-globe" sh_url_title="" %} 6 | {% include "layout_elements/section_header.html" %} 7 | {% endwith %} 8 | 9 |
10 |
11 |
12 | {% if web_source_list %} 13 | 14 | {% for ws in web_source_list %} 15 | 16 | 19 | 20 | {% if user.is_authenticated %} 21 | 22 | {% endif %} 23 | 24 | {% endfor %} 25 |
17 | {{ ws.title }} 18 | {% if ws.date %}{{ ws.date }}{% endif %}A
26 | {% else %} 27 | 28 | {% trans "No web sources available." %} 29 | 30 | {% endif %} 31 |
32 |
33 |
34 | {% endif %} 35 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/category_header.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |

{{ ch_title }}

5 | 9 |
-------------------------------------------------------------------------------- /public_project/templates/layout_elements/comments_header.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |

{{ ph_title }}

5 | 15 |
-------------------------------------------------------------------------------- /public_project/templates/layout_elements/ec_button_group.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 | 6 | 7 |
8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/ec_header_box.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 | 6 | 11 | 17 | 18 | 19 |
7 | {% if ec_url %}{% endif %} 8 | {{ ec_title }} 9 | {% if ec_url %}{% endif %} 10 | 12 | {% if ec_count > 0 %} 13 | 14 | {{ ec_count }} 15 | {% endif %} 16 |
20 | {% if ec_count > 0 %} 21 | 24 | {% endif %} 25 | 26 | 36 | 37 |
-------------------------------------------------------------------------------- /public_project/templates/layout_elements/event_section_header.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 28 | 29 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/menu_documents.html: -------------------------------------------------------------------------------- 1 | 2 | {% if document_list %} 3 |
4 | 5 | {{ document_list|length }} 6 | 7 | 14 |
15 | {% endif %} 16 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/menu_events.html: -------------------------------------------------------------------------------- 1 | 2 | {% if event_list %} 3 |
4 | 5 | {{ event_list|length }} 6 | 7 | 14 |
15 | {% endif %} 16 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/menu_participants.html: -------------------------------------------------------------------------------- 1 | 2 | {% if participant_list %} 3 |
4 | 5 | {{ participant_list|length }} 6 | 7 | 14 |
15 | {% endif %} 16 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/menu_project_parts.html: -------------------------------------------------------------------------------- 1 | 2 | {% if project_part_list %} 3 |
4 | 5 | {{ project_part_list|length }} 6 | 7 | 14 |
15 | {% endif %} 16 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/menu_web_sources.html: -------------------------------------------------------------------------------- 1 | 2 | {% if web_source_list %} 3 |
4 | 5 | {{ web_source_list|length }} {% if size %} {% endif %} 6 | 7 | 15 |
   16 | {% endif %} 17 | -------------------------------------------------------------------------------- /public_project/templates/layout_elements/page_header.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |

{{ ph_title }}

5 | 10 |
-------------------------------------------------------------------------------- /public_project/templates/layout_elements/research_requests_header.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |

{{ ph_title }}

5 | 15 |
-------------------------------------------------------------------------------- /public_project/templates/layout_elements/section_header.html: -------------------------------------------------------------------------------- 1 | 2 | 33 | 34 | 42 | -------------------------------------------------------------------------------- /public_project/templates/participant.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {{ participant }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Participants" as ph_bc1 %} 9 | {% trans "participants_url" as ph_bc1_url %} 10 | {% trans "Participant" as ph_bc2 %} 11 | {% with ph_icon="icon-group" ph_title=participant.name ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 %} 12 | {% include "layout_elements/page_header.html" %} 13 | {% endwith %} 14 | 15 |
16 | 17 |
18 |
19 | 20 |
21 | {% include "info_box/participant_detail.html" %} 22 |
23 | 24 | {% if document_list %} 25 | {% trans "Documents" as sh_title %} 26 | {% with sh_title=sh_title sh_ec_id="d_1" document_list=document_list %} 27 | {% include "info_box/documents.html" %} 28 | {% endwith %} 29 | {% endif %} 30 | 31 | {% with web_source_list=participant.web_sources.all %} 32 | {% include "info_box/web_sources.html" %} 33 | {% endwith %} 34 | 35 | {% if participant.to_memberships.count > 0 %} 36 | {% trans "Associated Participants" as sh_title %} 37 | {% with sh_title=sh_title sh_ec_id="ap_1" sh_icon="icon-user" sh_url_title="" %} 38 | {% include "layout_elements/section_header.html" %} 39 | {% endwith %} 40 |
41 | {% with membership_list=participant.to_memberships.all %} 42 | {% include "info_box/memberships.html" %} 43 | {% endwith %} 44 |
45 | {% endif %} 46 | 47 | {% if event_list.count > 0 %} 48 | {% trans "Events" as sh_title %} 49 | {% with sh_title=sh_title sh_icon="icon-time" sh_url_title="" %} 50 | {% include "layout_elements/event_section_header.html" %} 51 | {% endwith %} 52 | 53 | {% include "info_box/events.html" %} 54 | {% endif %} 55 | 56 |
57 | 58 |
59 | 60 | {% if site_config.show_questions_category and question_list.count > 0 %} 61 | {% include "info_box/questions.html" %} 62 | {% endif %} 63 | 64 | {% if content_document_list %} 65 | {% trans "Document Contents" as sh_title %} 66 | {% with sh_title=sh_title sh_ec_id="d_2" document_list=content_document_list %} 67 | {% include "info_box/documents.html" %} 68 | {% endwith %} 69 | {% endif %} 70 | 71 | {% if site_config.activate_comments %} 72 | {% trans "Comments" as sh_title %} 73 | {% trans "New" as sh_url_title %} 74 | {% trans "comments_url" as comments_url %} 75 | {% with sh_title=sh_title sh_icon="icon-comments" sh_url_title=sh_url_title sh_url="#CommentModal" modal_url="yes" rss_url=comments_url|add:"rss/" %} 76 | {% include "layout_elements/section_header.html" %} 77 | {% endwith %} 78 | {% with form=comment_form form_valid=comment_form_valid commented_object1=participant %} 79 | {% include "dialogs/comment.html" %} 80 | {% endwith %} 81 | 82 | {% include "info_box/comments.html" %} 83 | {% endif %} 84 | 85 |
86 | 87 | {% endblock %} 88 | -------------------------------------------------------------------------------- /public_project/templates/project_part.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {{ project_part }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Project" as ph_bc1 %} 9 | {% trans "project_url" as ph_bc1_url %} 10 | {% trans "Project Part" as ph_bc2 %} 11 | {% with ph_icon="icon-cogs" ph_title=project_part.name ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 %} 12 | {% include "layout_elements/page_header.html" %} 13 | {% endwith %} 14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | {% include "info_box/project_part_detail.html" %} 23 |
24 | 25 | {% if document_list %} 26 | {% trans "Documents" as sh_title %} 27 | {% with sh_title=sh_title sh_ec_id="d_1" document_list=document_list %} 28 | {% include "info_box/documents.html" %} 29 | {% endwith %} 30 | {% endif %} 31 | 32 | {% with web_source_list=project_part.web_sources.all %} 33 | {% include "info_box/web_sources.html" %} 34 | {% endwith %} 35 | 36 | {% if project_part.projectpart_set.count > 0 %} 37 | {% trans "Subtopics" as sh_title %} 38 | {% with sh_title=sh_title sh_ec_id="st_1" sh_icon="icon-user" sh_url_title="" %} 39 | {% include "layout_elements/section_header.html" %} 40 | {% endwith %} 41 |
42 | {% with project_part_list=project_part.projectpart_set.all with_detail_page_url="yes" %} 43 | {% include "info_box/project_parts.html" %} 44 | {% endwith %} 45 |
46 | {% endif %} 47 | 48 | {% if event_list.count > 0 %} 49 | {% trans "Events" as sh_title %} 50 | {% with sh_title=sh_title sh_icon="icon-time" sh_url_title="" %} 51 | {% include "layout_elements/event_section_header.html" %} 52 | {% endwith %} 53 | 54 | {% include "info_box/events.html" %} 55 | {% endif %} 56 | 57 | 58 | 59 |
60 | 61 |
62 | 63 | {% if site_config.show_questions_category and question_list.count > 0 %} 64 | {% with sh_title="yes" %} 65 | {% include "info_box/questions.html" %} 66 | {% endwith %} 67 | {% endif %} 68 | 69 | {% if content_document_list %} 70 | {% trans "Document Contents" as sh_title %} 71 | {% with sh_title=sh_title sh_ec_id="d_2" document_list=content_document_list %} 72 | {% include "info_box/documents.html" %} 73 | {% endwith %} 74 | {% endif %} 75 | 76 | {% if site_config.activate_comments %} 77 | {% trans "Comments" as sh_title %} 78 | {% trans "New" as sh_url_title %} 79 | {% trans "comments_url" as comments_url %} 80 | {% with sh_title=sh_title sh_icon="icon-comments" sh_url_title=sh_url_title sh_url="#CommentModal" modal_url="yes" rss_url=comments_url|add:"rss/" %} 81 | {% include "layout_elements/section_header.html" %} 82 | {% endwith %} 83 | {% with form=comment_form form_valid=comment_form_valid commented_object1=project_part %} 84 | {% include "dialogs/comment.html" %} 85 | {% endwith %} 86 | 87 | {% include "info_box/comments.html" %} 88 | {% endif %} 89 | 90 |
91 | 92 | {% endblock %} 93 | -------------------------------------------------------------------------------- /public_project/templates/project_parts.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Topics" %}{% endblock %} 5 | 6 | {% block rss_url %} 7 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | 14 | {% trans "Topics" as ch_title %} 15 | {% with ch_icon="icon-cogs" ch_title=ch_title ch_bc1=ch_title %} 16 | {% include "layout_elements/category_header.html" %} 17 | {% endwith %} 18 | 19 |
20 | 21 |
22 | 23 |
24 | 25 |
26 | {% include "info_box/site_category_detail.html" %} 27 |
28 | 29 | {% if not only_mpps %} 30 | {% include "layout_elements/ec_button_group.html" %} 31 | {% endif %} 32 | 33 | {% for mpp in main_project_part_list_left %} 34 | {% with ec_title=mpp ec_id=mpp.id ec_url=mpp.get_absolute_url ec_count=mpp.projectpart_set.count project_part_list=mpp.projectpart_set.all with_detail_page_url="yes" ec_box_include="info_box/project_parts.html" %} 35 | {% include "layout_elements/ec_header_box.html" %} 36 | {% endwith %} 37 | {% endfor %} 38 | 39 |
40 | 41 |
42 | 43 | {% if latest_project_part_list %} 44 | {% trans "New Topics" as sh_title %} 45 | {% with sh_title=sh_title rss_url="rss/" %} 46 | {% include "layout_elements/section_header.html" %} 47 | {% endwith %} 48 | 49 |
50 | {% with ppd_with_header="yes" %} 51 | {% for project_part in latest_project_part_list %} 52 |
53 | {% include "info_box/project_part_detail.html" %} 54 |
55 | {% endfor %} 56 | {% endwith %} 57 |
58 | {% endif %} 59 | 60 | {% for mpp in main_project_part_list_right %} 61 | {% with ec_title=mpp ec_id=mpp.id ec_url=mpp.get_absolute_url ec_count=mpp.projectpart_set.count project_part_list=mpp.projectpart_set.all with_detail_page_url="yes" ec_box_include="info_box/project_parts.html" %} 62 | {% include "layout_elements/ec_header_box.html" %} 63 | {% endwith %} 64 | {% endfor %} 65 | 66 |
67 | 68 | {% endblock %} 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /public_project/templates/question.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {{ question }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Questions" as ph_bc1 %} 9 | {% trans "questions_url" as ph_bc1_url %} 10 | {% trans "Question" as ph_bc2 %} 11 | {% with ph_icon="icon-question-sign" ph_title=question.title ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 %} 12 | {% include "layout_elements/page_header.html" %} 13 | {% endwith %} 14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | {% include "info_box/question_detail.html" %} 23 | 24 | {% if document_list %} 25 | {% trans "Documents" as sh_title %} 26 | {% with sh_title=sh_title sh_ec_id="d_1" document_list=document_list %} 27 | {% include "info_box/documents.html" %} 28 | {% endwith %} 29 | {% endif %} 30 | 31 | {% with web_source_list=question.web_sources.all %} 32 | {% include "info_box/web_sources.html" %} 33 | {% endwith %} 34 | 35 | {% if question.explanations %} 36 |
37 |
38 | {% trans "Explanations" %} 39 |
40 |
41 |

{{ question.explanations|linebreaksbr }}

42 |
43 |
44 | {% endif %} 45 | 46 | {% if question.answer %} 47 |
48 |
49 | {% trans "Answer" %} 50 | {% if question.answered %} {% endif %} 51 |
52 |
53 |

{{ question.answer|linebreaksbr }}

54 |
55 |
56 | {% endif %} 57 |
58 | 59 |
60 | 61 |
62 | 63 | {% trans "Research Requests" as sh_title %} 64 | {% trans "research_requests_url" as research_requests_url %} 65 | 66 | {% if perms.public_project.can_add_research_request %} 67 | {% trans "New" as sh_url_title %} 68 | {% with sh_title=sh_title sh_icon="icon-eye-open" sh_url_title=sh_url_title|add:" ("|add:user.username|add:")" sh_url="#ResearchRequestModal" modal_url="yes" rss_url=research_requests_url|add:"rss/" rss_btn_id=2 %} 69 | {% include "layout_elements/section_header.html" %} 70 | {% endwith %} 71 | {% else %} 72 | {% with sh_title=sh_title sh_icon="icon-eye-open" rss_url=research_requests_url|add:"rss/" rss_btn_id=2 %} 73 | {% include "layout_elements/section_header.html" %} 74 | {% endwith %} 75 | {% endif %} 76 | {% with commented_object1=question %} 77 | {% include "dialogs/research_request.html" %} 78 | {% endwith %} 79 | 80 | {% with rr_with_ec="yes" %} 81 | {% include "info_box/research_requests.html" %} 82 | {% endwith %} 83 | 84 | {% trans "Comments" as sh_title %} 85 | {% trans "New" as sh_url_title %} 86 | {% trans "comments_url" as comments_url %} 87 | {% with sh_title=sh_title sh_icon="icon-comments" sh_url_title=sh_url_title sh_url="#CommentModal" modal_url="yes" rss_url=comments_url|add:"rss/" %} 88 | {% include "layout_elements/section_header.html" %} 89 | {% endwith %} 90 | {% with commented_object1=question %} 91 | {% include "dialogs/comment.html" %} 92 | {% endwith %} 93 | 94 | {% include "info_box/comments.html" %} 95 | 96 |
97 | 98 | {% endblock %} 99 | -------------------------------------------------------------------------------- /public_project/templates/questions.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Questions" %}{% endblock %} 5 | 6 | {% block rss_url %} 7 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | {% trans "Questions" as ch_title %} 14 | {% with ch_icon="icon-question-sign" ch_title=ch_title ch_bc1=ch_title %} 15 | {% include "layout_elements/category_header.html" %} 16 | {% endwith %} 17 | 18 |
19 | 20 |
21 | 22 |
23 | 24 |
25 | {% include "info_box/site_category_detail.html" %} 26 |
27 | 28 | {% include "layout_elements/ec_button_group.html" %} 29 | 30 | {% for mpp in main_project_part_list_left %} 31 | {% with ec_title=mpp ec_id=mpp.id ec_url="" ec_count=mpp.get_num_questions question_list=mpp.get_questions id_addon=mpp.id ec_box_include="info_box/questions.html" sh_title="" %} 32 | {% include "layout_elements/ec_header_box.html" %} 33 | {% endwith %} 34 | {% endfor %} 35 | 36 |
37 | 38 |
39 | 40 | {% trans "New Research Requests" as sh_title %} 41 | {% trans "research_requests_url" as rr_url %} 42 | {% with sh_title=sh_title sh_icon="icon-eye-open" sh_url_title="" rss_url=rr_url|add:"rss/" %} 43 | {% include "layout_elements/section_header.html" %} 44 | {% endwith %} 45 | 46 | {% with rr_with_ec="yes" %} 47 | {% include "info_box/research_requests.html" %} 48 | {% endwith %} 49 | 50 | {% for mpp in main_project_part_list_right %} 51 | {% with ec_title=mpp ec_id=mpp.id ec_url="" ec_count=mpp.get_num_questions question_list=mpp.get_questions id_addon=mpp.id ec_box_include="info_box/questions.html" sh_title="" %} 52 | {% include "layout_elements/ec_header_box.html" %} 53 | {% endwith %} 54 | {% endfor %} 55 | 56 |
57 | 58 | {% endblock %} 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /public_project/templates/research_requests.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Comments" %}{% endblock %} 5 | 6 | {% block rss_url %} 7 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | {% if content_type == 'question' %} 14 | {% trans "Questions" as ph_bc1 %} 15 | {% trans "questions_url" as ph_bc1_url %} 16 | {% trans "Question" as ph_bc2 %} 17 | {% endif %} 18 | 19 | {% if not content_type %} 20 | {% with ph_icon='icon-home' ph_title='Home' ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 ph_bc2_url=rr_object.get_absolute_url %} 21 | {% include "layout_elements/research_requests_header.html" %} 22 | {% endwith %} 23 | {% else %} 24 | {% with ph_icon=rr_object.get_icon_class ph_title=ph_title ph_bc1=ph_bc1 ph_bc1_url=ph_bc1_url ph_bc2=ph_bc2 ph_bc2_url=rr_object.get_absolute_url %} 25 | {% include "layout_elements/research_requests_header.html" %} 26 | {% endwith %} 27 | {% endif %} 28 | 29 |
30 | 31 |
32 | 33 |
34 | 35 | {% trans "All Research Requests" as sh_title %} 36 | {% with sh_title=sh_title sh_icon="icon-eye-open" rss_url="rss/" %} 37 | {% include "layout_elements/section_header.html" %} 38 | {% endwith %} 39 | 40 | {% with rr_with_ec="yes" %} 41 | {% include "info_box/research_requests.html" %} 42 | {% endwith %} 43 | 44 |
45 | 46 |
47 | 48 |
49 | 50 | {% endblock %} -------------------------------------------------------------------------------- /public_project/templates/search.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {% trans "Search" %}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% trans "Search for" as ch_title %} 9 | {% trans "Search" as ch_bc1 %} 10 | {% with ch_icon="icon-search" ch_title=ch_title|add:' "'|add:q|add:'"' ch_bc1=ch_bc1 %} 11 | {% include "layout_elements/category_header.html" %} 12 | {% endwith %} 13 | 14 |
15 | 16 |
17 |
18 | 19 | {% trans "Subject Areas" as sh_title %} 20 | {% with sh_title=sh_title sh_icon="icon-cogs" %} 21 | {% include "layout_elements/section_header.html" %} 22 | {% endwith %} 23 | 24 |
25 |
26 | {% include "info_box/project_parts.html" with with_detail_page_url="yes" %} 27 |
28 |
29 | 30 | {% trans "Participants" as sh_title %} 31 | {% with sh_title=sh_title sh_icon="icon-group" sh_url_title="" %} 32 | {% include "layout_elements/section_header.html" %} 33 | {% endwith %} 34 | 35 |
36 |
37 | {% include "info_box/participants.html" %} 38 |
39 |
40 | {% if site_config.show_questions_category %} 41 | {% include "info_box/questions.html" %} 42 | {% endif %} 43 | 44 | 45 | {% trans "Events" as sh_title %} 46 | {% with sh_title=sh_title sh_icon="icon-time" sh_url_title="" %} 47 | {% include "layout_elements/section_header.html" %} 48 | {% endwith %} 49 | 50 | {% include "info_box/events.html" %} 51 | 52 |
53 | 54 |
55 | {% trans "Document Contents" as sh_title %} 56 | {% with sh_title=sh_title %} 57 | {% include "info_box/documents.html" %} 58 | {% endwith %} 59 | 60 |
61 | 62 | {% endblock %} -------------------------------------------------------------------------------- /public_project/templates/web_source.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | 4 | {% block title %} - {{ web_source }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 | {% with ph_icon="icon-globe" ph_title=web_source.title %} 9 | {% include "layout_elements/page_header.html" %} 10 | {% endwith %} 11 | 12 |
13 | 14 |
15 | 16 |
17 |
18 |

19 | {{ web_source.url }} 20 |

21 | Associated with object: 22 | 23 | 24 | {{ web_source.content_object }} 25 | 26 |
27 | 28 |

Found search tags on web page:

29 | {% if found_search_tag_list %} 30 | 31 | {% for st in found_search_tag_list %} 32 | 33 | 34 | 40 | 41 | {% endfor %} 42 |
{{ st }} 35 | 36 | 37 | {{ st.content_object }} 38 | 39 |
43 | {% else %} 44 | No search tags found. 45 | {% endif %} 46 |
47 | 48 |
49 |
50 | Beta feature, only available to logged in users, not thoroughly tested! 51 |
52 | 53 |
54 | 55 | {% endblock %} -------------------------------------------------------------------------------- /public_project/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/templatetags/__init__.py -------------------------------------------------------------------------------- /public_project/templatetags/bpw.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | register = template.Library() 4 | 5 | @register.filter 6 | def modelname(object): 7 | if hasattr(object, '__class__'): 8 | return object.__class__.__name__.lower() 9 | else: 10 | return "" 11 | -------------------------------------------------------------------------------- /public_project/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /public_project/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/public_project/utils/__init__.py -------------------------------------------------------------------------------- /public_project/utils/test_utils.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | def build_test_suite_from(test_cases): 4 | """ 5 | Returns a single or group of unittest test suite(s) that's ready to be 6 | run. The function expects a list of classes that are subclasses of 7 | TestCase. 8 | 9 | The function will search the module where each class resides and 10 | build a test suite from that class and all subclasses of it. 11 | """ 12 | test_suites = [] 13 | for test_case in test_cases: 14 | mod = __import__(test_case.__module__) 15 | components = test_case.__module__.split('.') 16 | for comp in components[1:]: 17 | mod = getattr(mod, comp) 18 | tests = [] 19 | for item in mod.__dict__.values(): 20 | if type(item) is type and issubclass(item, test_case): 21 | tests.append(item) 22 | test_suites.append(unittest.TestSuite(map(unittest.TestLoader().loadTestsFromTestCase, tests))) 23 | return unittest.TestSuite(test_suites) -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django>=1.10,<1.11 2 | pdfminer==20110515 3 | Pillow 4 | django-tastypie>=0.13.3,<1.0 -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | Sphinx>=1.3 2 | selenium>=2.45 3 | django-dynamic-fixture>=1.8 4 | ipython 5 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | import os 4 | 5 | setup( 6 | name='django-public-project', 7 | version='0.7.5', 8 | description='Custom CMS for making public projects, political processes or enquiry commission work more transparent', 9 | author='Holger Drewes', 10 | author_email='Holger.Drewes@gmail.com', 11 | url='https://github.com/holgerd77/django-public-project', 12 | long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(), 13 | packages=[ 14 | 'public_project', 15 | 'public_project.management', 16 | 'public_project.management.commands', 17 | 'public_project.migrations', 18 | 'public_project.templatetags', 19 | 'public_project.utils', 20 | 'example_project', 21 | 'example_project.ep_setup_app', 22 | 'example_project.ep_setup_app.management', 23 | 'example_project.ep_setup_app.management.commands', 24 | 'example_project.example_project', 25 | ], 26 | include_package_data=True, 27 | install_requires=[ 28 | 'Django>=1.10,<1.11', 29 | 'pdfminer==20110515', 30 | 'Pillow', 31 | 'django-tastypie>=0.13.3,<1.0', 32 | ], 33 | classifiers=[ 34 | 'Development Status :: 4 - Beta', 35 | 'Environment :: Web Environment', 36 | 'Framework :: Django', 37 | 'Intended Audience :: Developers', 38 | 'License :: OSI Approved :: BSD License', 39 | 'Operating System :: OS Independent', 40 | 'Programming Language :: Python', 41 | 'Topic :: Scientific/Engineering :: Information Analysis', 42 | ], 43 | ) 44 | -------------------------------------------------------------------------------- /tests/bpw_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/tests/bpw_tests/__init__.py -------------------------------------------------------------------------------- /tests/bpw_tests/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.conf.urls import include, patterns, url 3 | 4 | from django.contrib import admin 5 | admin.autodiscover() 6 | 7 | from public_project.urls import urlpatterns 8 | 9 | urlpatterns += patterns('', 10 | url(r'^admin/', include(admin.site.urls)), 11 | ) 12 | 13 | if settings.DEBUG: 14 | urlpatterns += patterns('', 15 | url(r'^media/(?P.*)$', 'django.views.static.serve', { 16 | 'document_root': settings.MEDIA_ROOT, 17 | }), 18 | ) -------------------------------------------------------------------------------- /tests/bpw_tests/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for bpw_tests project. 3 | 4 | This module contains the WSGI application used by Django's development server 5 | and any production WSGI deployments. It should expose a module-level variable 6 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover 7 | this application via the ``WSGI_APPLICATION`` setting. 8 | 9 | Usually you will have the standard Django WSGI application here, but it also 10 | might make sense to replace the whole Django WSGI application with a custom one 11 | that later delegates to the Django one. For example, you could introduce WSGI 12 | middleware here, or combine a Django application with an application of another 13 | framework. 14 | 15 | """ 16 | import os 17 | 18 | # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks 19 | # if running multiple sites in the same mod_wsgi process. To fix this, use 20 | # mod_wsgi daemon mode with each site in its own daemon process, or use 21 | # os.environ["DJANGO_SETTINGS_MODULE"] = "bpw_tests.settings" 22 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bpw_tests.settings") 23 | 24 | # This application object is used by any WSGI server configured to use this 25 | # file. This includes Django's development server, if the WSGI_APPLICATION 26 | # setting points here. 27 | from django.core.wsgi import get_wsgi_application 28 | application = get_wsgi_application() 29 | 30 | # Apply WSGI middleware here. 31 | # from helloworld.wsgi import HelloWorldApplication 32 | # application = HelloWorldApplication(application) 33 | -------------------------------------------------------------------------------- /tests/browser/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/tests/browser/__init__.py -------------------------------------------------------------------------------- /tests/browser/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/tests/browser/management/__init__.py -------------------------------------------------------------------------------- /tests/browser/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/tests/browser/management/commands/__init__.py -------------------------------------------------------------------------------- /tests/browser/management/commands/createtestdata.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | from fixtures.project_factory import ProjectFactory 3 | 4 | class Command(BaseCommand): 5 | help = 'Creates the example data for the example project' 6 | 7 | def handle(self, *args, **options): 8 | pf = ProjectFactory() 9 | pf.create_base_project() 10 | -------------------------------------------------------------------------------- /tests/browser/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /tests/browser/tests.py: -------------------------------------------------------------------------------- 1 | from public_project.utils.test_utils import build_test_suite_from 2 | from browser.generic_test import GenericTest 3 | from browser.ui_elements_test import UIElementsTest 4 | from browser.rss_test import RSSTest 5 | from browser.api_test import APITest 6 | 7 | test_cases = [ 8 | GenericTest, 9 | UIElementsTest, 10 | RSSTest, 11 | APITest, 12 | ] 13 | 14 | def suite(): 15 | return build_test_suite_from(test_cases) 16 | -------------------------------------------------------------------------------- /tests/browser/views.py: -------------------------------------------------------------------------------- 1 | # Create your views here. 2 | -------------------------------------------------------------------------------- /tests/create_test_data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Flushing DB..." 3 | python manage.py flush --noinput 4 | echo "Creating superuser with username 'admin'..."; 5 | python manage.py createsuperuser --username=admin --email=d@d.de; 6 | echo "Creating test project data..."; 7 | python manage.py createtestdata; 8 | echo "Finished. You're good to go! :-)"; 9 | -------------------------------------------------------------------------------- /tests/fixtures/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/tests/fixtures/__init__.py -------------------------------------------------------------------------------- /tests/fixtures/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /tests/fixtures/project_factory.py: -------------------------------------------------------------------------------- 1 | from django_dynamic_fixture import G, N 2 | from django.core.files import File 3 | from public_project.models import * 4 | 5 | 6 | class ProjectFactory(): 7 | 8 | @classmethod 9 | def create_base_project(cls): 10 | sc = G(SiteConfig, header_image=None) 11 | pp1 = G(ProjectPart) 12 | pp2 = G(ProjectPart) 13 | p1 = G(Participant) 14 | p1.name = "Test Corporation" 15 | p1.save() 16 | p2 = G(Participant) 17 | 18 | m = G(Membership) 19 | m.from_participant = p2 20 | m.to_participant = p1 21 | m.save() 22 | pgg1 = G(ProjectGoalGroup) 23 | pg1 = G(ProjectGoal, project_goal_group=pgg1) 24 | pp1 = G(ProjectPart) 25 | q1 = G(Question) 26 | rr1 = G(ResearchRequest) 27 | rrr1 = G(ResearchRequestRelation, research_request=rr1) 28 | rrr1.content_object = q1 29 | rrr1.save() 30 | c1 = G(Comment, published=True) 31 | cr1 = G(CommentRelation, comment=c1) 32 | a1 = N(ActivityLog, type='NC') 33 | a1.content_object = c1 34 | a1.save() 35 | cr1.content_object = p1 36 | cr1.save() 37 | e1 = G(Event) 38 | e1.project_parts = [pp1,] 39 | e1.save() 40 | e2 = G(Event) 41 | e2.project_parts = [pp2,] 42 | e2.save() 43 | d1 = N(Document) 44 | pdf = File(open('fixtures/test_document.pdf', 'rw')) 45 | d1.document = pdf 46 | d1.save() 47 | 48 | -------------------------------------------------------------------------------- /tests/fixtures/test_document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holgerd77/django-public-project/0d5684dee9567fe1650ecad6413dd9aef71a8ec2/tests/fixtures/test_document.pdf -------------------------------------------------------------------------------- /tests/fixtures/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /tests/fixtures/views.py: -------------------------------------------------------------------------------- 1 | # Create your views here. 2 | -------------------------------------------------------------------------------- /tests/init_test_project.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while true; do 3 | echo "INFO: This script has to be run before running the tests since some tests access " 4 | echo "the test server via http and needs a normal Django setup with updated DB data." 5 | read -p "Warning! This will reset the DB and delete modified test data. Proceed?" yn 6 | case $yn in 7 | [Yy]* ) 8 | rm -f bpw_tests/sqlite3.db; 9 | rm -Rf media/; 10 | rm -Rf static/; 11 | python manage.py migrate; 12 | echo "Creating superuser with username 'admin'..."; 13 | python manage.py createsuperuser --username=admin --email=d@d.de; 14 | echo "Creating test project data..."; 15 | python manage.py createtestdata; 16 | python manage.py collectstatic --noinput; 17 | break;; 18 | [Nn]* ) exit;; 19 | * ) echo "Please answer yes (Y/y) or no (N/n).";; 20 | esac 21 | done 22 | -------------------------------------------------------------------------------- /tests/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bpw_tests.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /tests/testserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python manage.py runserver 127.0.0.1:8010 4 | --------------------------------------------------------------------------------