Mercurial > hg > MPIWGThesaurus
changeset 14:a85d5f111592
examples added
author | dwinter |
---|---|
date | Fri, 13 Jan 2012 10:58:05 +0100 |
parents | 51ed6ad43383 |
children | f9a65eaaa59c |
files | examples/main.html examples/show2.html |
diffstat | 2 files changed, 484 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/main.html Fri Jan 13 10:58:05 2012 +0100 @@ -0,0 +1,287 @@ +<!DOCTYPE html> +<html tal:define="projectID + python:here.REQUEST.get('project','') "> + <head> + <meta http-equiv="Content-Type" content="text/html; +charset=iso-8859-1" /> +<base tal:attributes="href python:here.MPIWGrootURL()+'/thesaurus/'"/> +<title>Project tagger</title> + <link type="text/css" href="./jquery-ui/css/ui-lightness/jquery-ui-1.8.11.custom.css" rel="stylesheet" /> + <script type="text/javascript" src="./jquery-ui/js/jquery-1.5.1.min.js"></script> + <script type="text/javascript" src="./jquery-ui/js/jquery-ui-1.8.11.custom.min.js"></script> + <script type="text/javascript" src="./thesaurus.js"></script> + <link type="text/css" href="./tagging.css" rel="stylesheet" /> + </head> + <body> + <h3> The MPIWG's tagger - BETA - Version </h3> + <form method="get" action="changeTags"> + <input type="hidden" name="projectID" id="projectID" tal:attributes="value python:projectID"/> + <h1>Tagging:<tal:x content="python:projectID"/></h1> + <div id="tagView"> You have selected <span id="numberOfTags">0</span> + of <span id="maximumNumberOfTags">8</span> + + <div id="tagText">You have selected toomany tags!</div> + <br/><br/> + <div>Selected Tags: <span id="showTags"></span></div> + <input id="saveTags" type="submit" value="save tags"/> + </div> + <!-- Accordion --> + <h2 class="demoHeaders">Project Categories</h2> + + <div id="accordion"> + <div> + <h3><a href="#">Approches</a></h3> + <div> + <p><a href="#" id="approachesHelp_link" class="helpLink ui-state-default + ui-corner-all"><span class="ui-icon + ui-icon-help"></span>Help</a></p> + <div class="level1" tal:repeat="level1 + python:here.getApproaches()"><input class="tags approache" type="checkbox" + tal:attributes="value + python:here.getTitle(level1)" name="approaches"/><tal:x tal:content="python:here.getTitle(level1)">Lorem</tal:x> + <tal:y condition="python:len(here.getEntries(level1))>0"> + <div class="level2" tal:repeat="level2 + python:here.getEntries(level1)"><input class="tags" type="checkbox" + tal:attributes="value + python:here.getTitle(level1)+'_'+here.getTitle(level2)" name="approaches"/><tal:x tal:content="python:here.getTitle(level2)">Lor</tal:x></div> + </tal:y> + </div> + <!-- Dialog approaches --> + <p><a href="#" id="dialog_link_approaches" class="ui-state-default + ui-corner-all dialog_link"><span class="ui-icon + ui-icon-newwin"></span>Suggest new tag</a></p> + </div> + </div> + <div> + <div> + <h3><a href="#">Disciplines</a></h3> + + <div> + <div class="level1" tal:repeat="level1 + python:here.getDisciplines()"><input class="tags" + type="checkbox" + tal:attributes="value + python:here.getTitle(level1)" name="disciplines"/><tal:x tal:content="python:here.getTitle(level1)">Lorem</tal:x> + <tal:y condition="python:len(here.getEntries(level1))>0"> + <div class="level2" tal:repeat="level2 + python:here.getEntries(level1)"><input type="checkbox" + tal:attributes="value + python:here.getTitle(level1)+'_'+here.getTitle(level2)" name="disciplines"/><tal:x tal:content="python:here.getTitle(level2)">Lor</tal:x></div> + </tal:y> + <!-- Dialog approaches --> + + </div> + <p><a href="#" id="dialog_link_disciplines" class="ui-state-default + ui-corner-all dialog_link"><span class="ui-icon + ui-icon-newwin"></span>Suggest new tag</a></p> + </div> + <div> + + <h3><a href="#">Periods</a></h3> + + <div> + + <div class="level1" tal:repeat="level1 + python:here.getPeriods()"><input type="checkbox" + tal:attributes="value + python:here.getTitle(level1)" name="periods"/><tal:x tal:content="python:here.getTitle(level1)">Lorem</tal:x> + <tal:y condition="python:len(here.getEntries(level1))>0"> + <div class="level2" tal:repeat="level2 + python:here.getEntries(level1)"><input class="tags" + type="checkbox" + tal:attributes="value + python:here.getTitle(level1)+'_'+here.getTitle(level2)" name="periods"/><tal:x tal:content="python:here.getTitle(level2)">Lor</tal:x></div> + </tal:y> + </div> + <p><a href="#" id="dialog_link_periods" class="ui-state-default + ui-corner-all dialog_link"><span class="ui-icon + ui-icon-newwin"></span>Suggest new tag</a></p> + </div> + <div> + <h3><a href="#">People</a></h3> + <div> + <p>Currently attached to the project</p> + <div id="persons">replace</div> + <div class="ui-widget"> + <label for="personAdd">Add person to the project: </label> + <input id="personAdd"/> + <input type="button" id="personSearchButton" value="search"> + <div id="personInfo"/> + </div> + </div> + </div> + <div> + + <h3><a href="#">Spaces</a></h3> + <div> + <p><a href="#" id="spacesHelp_link" class="helpLink ui-state-default + ui-corner-all"><span class="ui-icon + ui-icon-help"></span>Help</a></p> + + <div class="level1" tal:repeat="level1 + python:here.getSpaces()"><input type="checkbox" class="tags" + tal:attributes="value + python:here.getTitle(level1)" name="spaces"/><tal:x tal:content="python:here.getTitle(level1)">Lorem</tal:x> + <tal:y condition="python:len(here.getEntries(level1))>0"> + <div class="level2" tal:repeat="level2 + python:here.getEntries(level1)"><input type="checkbox" class="tags" + tal:attributes="value + python:here.getTitle(level1)+'_'+here.getTitle(level2)" name="spaces"/><tal:x tal:content="python:here.getTitle(level2)">Lor</tal:x></div> + </tal:y> + </div> + <p><a href="#" id="dialog_link_spaces" class="ui-state-default + ui-corner-all dialog_link"><span class="ui-icon + ui-icon-newwin"></span>Suggest + new + tag</a></p> + + <div> + <p>Free Text for <em>Historical places</em> (only + displayed if the tag <em>Historical terms</em> above + is set.</p> + <p>Currently attached to the project</p> + <div id="historicalPlaces">replace</div> + <div class="ui-widget"> + <label for="Add">Add place to the project: </label> + <input id="historicalPlaceAdd"/> + <input type="button" id="historicalPlaceAddButton" value="add"> + </div> + </div> + </div> + <div> + <h3><a href="#">Objects</a></h3> + <div> + <p><a href="#" id="objectsHelp_link" class="helpLink ui-state-default + ui-corner-all"><span class="ui-icon + ui-icon-help"></span>Help</a></p> + + <p>Currently attached to the project</p> + <div id="objects">replace</div> + <div class="ui-widget"> + <label for="objectAdd">Add object to the project: </label> + <input id="objectAdd"/> + <input type="button" id="objectAddButton" value="add"> + </div> + </div> + </div> + + <div> + + <h3><a href="#">Technologies</a></h3> + + <div> + <div class="level1" tal:repeat="level1 + python:here.getTechnologies()"><input type="checkbox" class="tags" + tal:attributes="value + python:here.getTitle(level1)" name="technologies"/><tal:x tal:content="python:here.getTitle(level1)">Lorem</tal:x> + <tal:y condition="python:len(here.getEntries(level1))>0"> + <div class="level2" tal:repeat="level2 + python:here.getEntries(level1)"><input type="checkbox" class="tags" + tal:attributes="value + python:here.getTitle(level1)+'_'+here.getTitle(level2)" name="technologies"/><tal:x tal:content="python:here.getTitle(level2)">Lor</tal:x></div> + </tal:y> + </div> + <p><a href="#" id="dialog_link_technologies" class="ui-state-default + ui-corner-all dialog_link"><span class="ui-icon + ui-icon-newwin"></span>Suggest new tag</a></p> + </div> + <div> + + <h3><a href="#">Knowledge Transfers</a></h3> + <div> + <p><a href="#" id="transfersHelp_link" class="helpLink ui-state-default + ui-corner-all"><span class="ui-icon + ui-icon-help"></span>Help</a></p> + + <div class="level1" tal:repeat="level1 + python:here.getKnowledgeTransfers()"><input type="checkbox" class="tags" + tal:attributes="value + python:here.getTitle(level1)" name="transfers"/><tal:x tal:content="python:here.getTitle(level1)">Lorem</tal:x> + <tal:y condition="python:len(here.getEntries(level1))>0"> + <div class="level2" tal:repeat="level2 + python:here.getEntries(level1)"><input type="checkbox" class="tags" + tal:attributes="value + python:here.getTitle(level1)+'_'+here.getTitle(level2)" name="transfers"/><tal:x tal:content="python:here.getTitle(level2)">Lor</tal:x></div> + </tal:y> + </div> + <p><a href="#" id="dialog_link_transfers" class="ui-state-default + ui-corner-all dialog_link"><span class="ui-icon + ui-icon-newwin"></span>Suggest new tag</a></p> + </div> + </div> + + <!-- ui-dialog tags--> + <div id="dialog" title="New Tag"> + <p>Suggest a new tag</p> + <input type="hidden" id="suggest_newTag_type"/> + <table> + <tr> + <td>TagName:</td><td> <input size="30" + id="suggest_newTag"/></td> + </tr> + <tr> + <td>Comment:</td><td> <textarea rows="10" cols="30" id="suggest_newTag_comment"></textarea></td> + </tr> + <tr> + <td>Entered by:</td><td><input type="text" id="suggest_newTag_userName" + tal:attributes="value + user/getUserName"/></td><td>Your MPIWG + username (will not be published + anywhere)</td> + </tr> + </table> + </div> + + <!-- ui-dialog persons--> + <div id="dialogPersons" title="New Person"> + <p>Create a new person</p> + <table> + <tr> + <td>Name of the Person:</td><td> <input size="30" + id="suggest_newPerson"/></td> + <td> Write the name in the way it + should be displayed</td> + <tr> + <td>Comment:</td><td> <textarea rows="10" + cols="30" + id="suggest_newPerson_comment"></textarea></td><td>Some + remarks to identify the person or a link to + a website describing the person.</td> + </tr> + <tr> + <td>Entered by:</td><td><input type="text" id="suggest_newPerson_userName" + tal:attributes="value + user/getUserName"/></td><td>Your MPIWG + username (will not be published + anywhere)</td> + </tr> + </table> + </div> + + <div id="approachesHelp" title="Help Approaches" class="helpWindow"> + <h5>Methodological approaches</h5> + <p>Others than History of Science</p> + <h5>Historical epistemology approaches</h5> + <p>This category reflects the main MPIWG-themes of the past and current research</p> + </div> + + <div id="spacesHelp" title="Help Space" class="helpWindow"> + <p>Is the geographical area important to your project, does it deal with specific sites, institutions or spaces of knowledge? </p> + </div> + + <div id="objectsHelp" title="Help Objects" class="helpWindow"> + <p>Are specific natural or artificial objects important to your research project? </p> + </div> + + <div id="transfersHelp" title="Help Objects" class="helpWindow"> + <p>How are scientific findings recorded, how is knowledge conveyed + how does it circulate? Are these aspects important to your + research topic? </p> + <h5>Modes of communication</h5> + <p>e.g. language, braille, etc.</p> + <h5>Science education </h5> + <p>e.g. academic and non-academic</p> + </div> + </form> + </body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/show2.html Fri Jan 13 10:58:05 2012 +0100 @@ -0,0 +1,197 @@ +<!DOCTYPE html> +<!-- display the tags --> +<html metal:use-macro="here/pro_sec_template/macros/page"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <title>MPIWG Tags</title> + <tal:block metal:fill-slot="head"> + <!--<link type="text/css" + href="./jquery-ui/css/ui-lightness/jquery-ui-1.8.11.custom.css" + rel="stylesheet" /> --> + <link type="text/css" href="./jquery-mpiwg.css" rel="stylesheet" /> + <script type="text/javascript" src="./jquery-ui/js/jquery-1.5.1.min.js"></script> + <script type="text/javascript" src="./jquery-ui/js/jquery-ui-1.8.11.custom.min.js"></script> + <script type="text/javascript"> + + // open and close the tags + + jQuery(document).ready(function(){ + $('#accordion h3').click(function() { + $(this).next().toggle('slow'); + return false; + }).next().hide(); + }); + + $(function(){ + + + + // Accordion + //$("#accordion").accordion({ header: "h3" }); + + + $('.projectsWindow').hide(); + + + //open and close the projects + $('.showApproach').click(function(){ + + var tp = $(this).parent(); + var wd= $(tp).find('div.projectsWindow'); + wd.toggle(); + /*$(tp).find('span.ui-icon').toggleClass('ui-icon-triangle-1-s');*/ + + return false; + }); + + }); + + + </script> + <style type="text/css"> + /*demo page css*/ + body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;} + + .level1 { + margin-left: 6em; + } + + .demoHeaders { + margin-top: 2em; + } + + #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;} + #dialog_link span.ui-icon {margin: 0 5px 0 0;position: + absolute;left: .2em;top: 50%;margin-top: -8px;} + + .helpLink {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;} + .helpLink span.ui-icon {margin: 0 5px 0 0;position: + absolute;left: .2em;top: 50%;margin-top: -8px;} + + .level2 {margin-left:10pt} + ul#icons {margin: 0; padding: 0;} + ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;} + ul#icons span.ui-icon {float: left; margin: 0 4px;} + + .level1_projects {margin-left: 50pt; + background: url(../images/arr_right.gif) no-repeat #f5daaf; + padding: 6px 6px 6px 20px; + border-bottom: 1px solid #f3be7c; + width:500px; + + .arrowC +} + + + + .level2_projects {margin-left:50pt; + background: url(../images/arr_right.gif) no-repeat #f5daaf; + padding: 6px 6px 6px 20px; + border-bottom: 1px solid #f3be7c; + width:500px; +} + + + .level1_projects a{ + + + } + + + .person_projects { + padding-left:5pt; + font-style:italic + } + + .showApproach { + color:#EA8500; + cursor:pointer; + } + + .showApproach:hover { + text-decoration: underline; + } + </style> + </tal:block> + </head> + <body> + <div class="main" metal:fill-slot="center"> + <div class="center_wide dept"> + + <!-- Accordion --> + <h3>This overview is currently under construction!</h3> + <h2 class="demoHeaders">Project Categories</h2> + + <div id="accordion"> + <div> + <h3><a href="#">Approaches</a></h3> + <div> + <tal:x replace="structure python:here.getEntriesFormatted(here.getApproaches(),'approaches')"/> + </div> + + <h3><a href="#">Disciplines</a></h3> + <div> + <tal:x replace="structure python:here.getEntriesFormatted(here.getDisciplines(),'disciplines')"/> + </div> + + + <h3><a href="#">Periods</a></h3> + <div> + <tal:x replace="structure python:here.getEntriesFormatted(here.getPeriods(),'periods')"/> + </div> + + + <h3><a href="#">People</a></h3> + <div> + <div class="level1" tal:repeat="level1 python:here.getPersonsWithProjectIDs()[1]"><span class="showApproach" tal:content="python:here.getNamesFromID(level1)">Lorem</span> + <div class="projectsWindow"> + <div class="level1_projects" tal:repeat="proj python:here.getPersonsWithProjectIDs()[0][level1]"> + <a tal:attributes="href python:proj[0]" tal:content="python:proj[1]">my proj</a> + <tal:x define="person + python:proj[2]"><span class="person_projects" + tal:content="person"/></tal:x> + </div> + </div> + + </div> + </div> + + <h3><a href="#">Spaces</a></h3> + <div> + <tal:x replace="structure python:here.getEntriesFormatted(here.getSpaces(),'spaces')"/> + </div> + + + <h3><a href="#">Objects</a></h3> + <div> + <div class="level1" tal:repeat="level1 python:here.getObjectsWithProjectIDsSortedkeys()"><span class="showApproach" tal:content="python:level1">Lorem</span> + <div title="Projects" class="projectsWindow"> + + <div class="level1_projects" tal:repeat="proj python:here.getObjectsWithProjectIDs()[level1]"> + <a tal:attributes="href python:proj[0]" tal:content="python:proj[1]">my proj</a> + <tal:x define="person + python:proj[2]"><span class="person_projects" + tal:content="person"/></tal:x> + </div> + </div> + + </div> + </div> + + <h3><a href="#">Technologies</a></h3> + <div> + <tal:x replace="structure python:here.getEntriesFormatted(here.getTechnologies(),'technologies')"/> + </div> + + + <h3><a href="#">Knowledge Transfers</a></h3> + <div> + <tal:x replace="structure python:here.getEntriesFormatted(here.getKnowledgeTransfers(),'transfers')"/> + </div> + + </div> + </div> + </div> + </div> + </body> +</html> \ No newline at end of file