Commit 73fee1e3 authored by Horst Friedrich's avatar Horst Friedrich

first Version

parents
These are instructions for building and running the process map tool of the European [EAGLE](http://www.eagle-learning.eu/en) project.
## Prerequisites
To be written.
## Building and Running the Process Map Tool from Source
To be written.
## Run
localhost:8082/topics
This diff is collapsed.
These are the source files of the process map tool of the
European [EAGLE](http://www.eagle-learning.eu/en) project.
This source code is subject to the terms of the Mozilla Public
License, version 2.0 (MPL-2.0). If a copy of the MPL was not
distributed with this software, it is also available online at
<http://mozilla.org/MPL/2.0/>. For futher information about the MPL
see <http://www.mozilla.org/MPL/2.0/FAQ.html>.
See the INSTALL.md file in the same directory as this README for
installation instructions.
package main
import (
"flag"
"git.list.lu/process-map-tool/internal/web"
"log"
"os"
// "path/filepath"
)
const help = `
usage: eagle-process-map-tool [-p port] [-s couchdb-url]
Starts the Eagle process map tool as a web service.
The -p flag ("port") specifies the port to use for the web service (default: 8082)
The -c flag ("couchdb") specifies the URL of the Couchdb server (default: http://127.0.0.1:5984/)
`
var goPath = os.Getenv("GOPATH")
const defaultPort = "8082"
const defaultCouchdbURL = "http://127.0.0.1:5984/"
// var templatesDir = filepath.Join(goPath, "../../web/templates/")
var templatesDir = "../../web/templates/"
func main() {
flags := flag.NewFlagSet("flags", flag.ContinueOnError)
httpPort := flags.String("p", defaultPort, "the port number of the web service")
couchdbURL := flags.String("c", defaultCouchdbURL, "the URL of the Couchdb server")
if err := flags.Parse(os.Args[1:]); err != nil {
log.Fatal(err)
}
web.ProcessMapToolServer(*httpPort, *couchdbURL, templatesDir)
}
/*$(document).ready(function(){
$('a[href^="#"]').on('click',function (e) {
e.preventDefault();
var target = this.hash;
var $target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
});
});
}); */
$('a.native-anchor').bind('click', function(ev) {
var target = $( $(this).attr('href') ).get(0).offsetTop;
$.mobile.silentScroll(target);
return false;
});
\ No newline at end of file
body {
margin:40px;
}
p {
margin:40px;
}
.letter {
font-style:italic;
border-bottom:1px solid #ccc;
margin:40px;
}
.eagle-chois-box {
float: right;
margin: 16px 0px 0px 0px;
}
.eagle-topic-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Sub-Topics = border: green, bachground: green */
.eagle-subtopic-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Core Process */
/* ------------ */
.core-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #CCEEFF;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Leaf */
.core-style0 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Leaf with OER's */
.core-style1 {
text-align: center;
border: 3px outset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Laef - show OER's */
.core-style2 {
text-align: center;
border: 3px inset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFCC66;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Node */
.core-style3 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Node with OER's */
.core-style4 {
text-align: center;
border: 3px outset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Node - show OER's */
.core-style5 {
text-align: center;
border: 3px inset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFCC66;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Management and support process */
.mgn-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #DDDDDD;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style0 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF with OER */
.mgn-style1 {
text-align: center;
border: 3px outset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF show OER*/
.mgn-style2 {
text-align: center;
border: 3px inset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #66FF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* NODE */
.mgn-style3 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* NODE with OER */
.mgn-style4 {
text-align: center;
border: 3px outset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* NODE show OER */
.mgn-style5 {
text-align: center;
border: 3px inset #008000;
border-radius: 6px 6px 6px 6px;
background-color: #66FF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
// dbinterface
package dbinterface
import ()
// Topics ans SubTopics
type (
Topic struct {
Name string
Count int
}
Topics []Topic
)
// Process Maps
type (
ProcType int
ProcNaviType int
)
const (
LEAF ProcNaviType = iota // a leaf-Process
LEAF_OER // a leaf process with OER's
NODE // a node process with sub process-map
NODE_OER // a node process with sub process map and OER's
)
const (
CORE ProcType = iota // core process
MNG // management process
SUPP // support process
)
type (
Process struct {
ProcType ProcType
ProcNaviType ProcNaviType
Name string
OERcounter int
OERs []OER
}
OER struct {
Name string
Author string
MimeType string
URL string
}
Processes []Process
)
func LoadProcessMap(topic, subtopic, process string) (*Processes, error) {
if process == "Zivildienst" {
return &Processes{{ProcType: CORE, ProcNaviType: LEAF, Name: "Zivildienststellen Anerkennung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Entschädigungsleistung-Zivildienst Gewährung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Unterhaltssicherung bei Wehr- und Zivildienst Gewährung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Zivildienst Befreiung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Zivildienst Zurückstellung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bundesfreiwilligendienst Informationserteilung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bundesfreiwilligendienst Vereinbarung"}}, nil
}
if process == "Ehrungen" {
return &Processes{{ProcType: CORE, ProcNaviType: LEAF, Name: "Alters- und Ehejubiläum Ehrung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrenpatenschaft durch den Bundespräsidenten Übernahme"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrenbürgerschaft Verleihung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrenzeichen Verleihung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrungen für Lebensretter Verleihung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Titel durch den Bundespräsidenten Verleihung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Verdienstorden Verleihung"}}, nil
}
if subtopic == "Bürgerengagement" {
return &Processes{{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrenamtliche Tätigkeit Beratung und Belehrung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrenamtliche Tätigkeit Förderung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Ehrenamtliche Tätigkeit Bestellung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Einwohnerantrag Feststellung der Zulässigkeit"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Freiwilliges ökologisches Jahr Förderung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Freiwilliges soziales Jahr Förderung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgersprechstunde Angebot"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgerberatung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Besucherdienst Angebot"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Dienstaufsichtsbeschwerde"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Fachaufsichtsbeschwerde"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Seniorenvertretungen Förderung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Präventionsnetz gegen Rechtsextremismus (BIKnetz)"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Portal für ehrenamtiche Tätigkeiten"},
{ProcType: CORE, ProcNaviType: NODE, Name: "Zivildienst"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgerbegehren Feststellung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgerbegehren Feststellung der Zulässigkeit"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgerentscheid Durchführung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgerentscheid Durchführung nach erfolgreichem Bürgerbegehren"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Bürgerentscheid Durchführung nach Beschluss des Gemeinderates"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Einwohnerfragestunde Durchführung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Einwohnerversammlung Durchführung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Volksbegehren Feststellung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Volksbegehren Feststellung der Zulässigkeit"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Volksentscheid Durchführung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Petition Prüfung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Europäischer Sozialfonds Prüfung"},
{ProcType: CORE, ProcNaviType: NODE, Name: "Ehrungen"}}, nil
}
return &Processes{{ProcType: MNG, ProcNaviType: LEAF, Name: "Budgetierung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Entschädigung für Opfer von Gewalttaten Bewilligung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Härteausgleich für Opfer von Gewalttaten Bewilligung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Sucht Beratung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Drogenhilfe Beratung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Hilfe in anderen Lebenslagen Beratung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Gewalt gegen Frauen Beratung"},
{ProcType: CORE, ProcNaviType: LEAF, Name: "Rechtliche und tatsächlichen Gleichstellung von Frauen und Männern Förderung"},
{ProcType: SUPP, ProcNaviType: LEAF, Name: "Statistik"}}, nil
}
func LoadTopics() (*Topics, error) {
return &Topics{{Name: "Arbeit, Beruf und Soziales", Count: 16},
{Name: "Auto, Verkehr und Infrastruktur", Count: 11},
{Name: "Bildung und Wissenschaft", Count: 22},
{Name: "Familie und Partnerschaft", Count: 33},
{Name: "Freizeit, Kultur und Sport", Count: 44},
{Name: "Gesundheit und Pflege", Count: 55},
{Name: "Meldewesen und Ordnung", Count: 66},
{Name: "Migration und Integration", Count: 77},
{Name: "Sicherheit und Notlagen", Count: 88},
{Name: "Steuern, Finanzen und Recht", Count: 99},
{Name: "Umwelt, Natur und Tiere", Count: 0},
{Name: "Wirtschaft und Tourismus", Count: 0},
{Name: "Wohnen und Bauen", Count: 0},
{Name: "Verwaltung, Organisation und Politik", Count: 111}}, nil
}
func LoadSubTopics(topic string) (*Topics, error) {
// switch topic {
// case "Arbeit, Beruf und Soziales":
return &Topics{{Name: "Soziale Hilfe und Beratung", Count: 16},
{Name: "Behinderte Menschen", Count: 4},
{Name: "Bürgerengagement", Count: 3},
{Name: "Sozialleistungen", Count: 2},
{Name: "Arbeitsschutz", Count: 0},
{Name: "Arbeitsförderung", Count: 2},
{Name: "Berufsbildung und Weiterbildung", Count: 1},
{Name: "Berufsgruppen und Berufsberechtigung", Count: 2},
{Name: "Gewerbe", Count: 0},
{Name: "Rentenversicherung", Count: 1},
{Name: "Statistik", Count: 1},
}, nil
}
This diff is collapsed.
/* EAGLE process map CCS File */
/* Topics = border: green, background: yelow */
.eagle-topic-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Sub-Topics = border: green, bachground: green */
.eagle-subtopic-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Core Process */
/* ------------ */
.core-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #CCEEFF;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Leaf */
.core-style0 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Leaf with OER's */
.core-style1 {
text-align: center;
border: 3px dashed #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Laef - show OER's */
.core-style2 {
text-align: center;
border: 3px dotted #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Node */
.core-style3 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Node with OER's */
.core-style4 {
text-align: center;
border: 3px dashed #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Node - show OER's */
.core-style5 {
text-align: center;
border: 3px dotted #008000;
border-radius: 6px 6px 6px 6px;
background-color: #FFFF99;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* Management and support process */
.mgn-style {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #DDDDDD;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style0 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style1 {
text-align: center;
border: 3px dashed #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style2 {
text-align: center;
border: 3px dotted #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style3 {
text-align: center;
border: 3px solid #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style4 {
text-align: center;
border: 3px dashed #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
/* LEAF */
.mgn-style5 {
text-align: center;
border: 3px dotted #008000;
border-radius: 6px 6px 6px 6px;
background-color: #BBFFBB;
margin: 20px 20px 20px 20px;
padding: 10px 10px 10px 10px;
}
<!DOCTYPE html>
<html>
<head>
<title>Error Message</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page" id="errorPage">
<div data-role="header">
<h1>Error Message</h1>
</div>
<p>
{{.}}
</p>
<div data-role="footer" data-id="main-footer" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="/" class="ui-btn-active" data-icon="home">Home</a></li>
<li><a href="help.html" data-icon="info">Help</a></li>
<li><a href="/imprint" data-icon="info">Imprint</a></li>
</ul>
</div>
</div>
</div> <!-- error page -->
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>EAGLE Process Map Tool Help</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page" id="HelpPage">
<div data-role="header">
<h1>EAGLE Process Map Tool - Help Page</h1>
</div>
<div role="main" class="ui-content">
<p>To be written.</p>
<div data-role="footer" data-id="main-footer" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="/" class="ui-btn-active" data-icon="home">Home</a></li>
<li><a href="/help" data-icon="info">Help</a></li>
<li><a href="/imprint" data-icon="info">Imprint</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>EAGLE Process Map Tool Imprint</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page" id="ImprintPage">
<div data-role="header">
<h1>Imprint</h1>
</div>
<div role="main" class="ui-content">
<h2>Publishing Notes</h2>
<p>The Fraunhofer Institute for Open Communication Systems<br/>
Kaiserin-Augusta-Allee 31<br/>
Berlin 10589<br/>
Germany</p>
<p>is a constituent entity of the Fraunhofer-Gesellschaft, and as such has no separate legal status.</p>
<p>Fraunhofer-Gesellschaft <br/>
zur F&ouml;rderung der angewandten Forschung e.V.<br/>
Hansastra&szlig;e 27 c<br/>
80686 M&uuml;nchen<br/>
Phone: +49 89 1205- 0<br/>
Fax: +49 89 1205-7531 <br/>
www.fraunhofer.de<br/>
</p>
<p>VAT Identification Number in accordance with &Acirc;&sect;27 a VAT Tax Act: DE 129515865</p>
<h3>Court of jurisdiction</h3>
<p>Amtsgericht M&uuml;nchen (district court)<br/>
Registered nonprofit association <br/>
Registration no. VR 4461</p>
<h3>Responsible editor</h3>
<p>
Dr. Horst Friedrich<br/>
horst.friedrich@fokus.fraunhofer.de
</p>
<h3>Executive Board</h3>
<ul>
<li>Prof. Dr.-Ing. Reimund Neugebauer, President, Corporate Policy and Research Management</li>
<li>Prof. Dr.-Ing. Alexander Verl, Technology Marketing and Business Models</li>
<li>Prof. Dr. Alexander Kurz, Human Resources, Legal Affairs and IP Management</li>
<li>Prof. (Univ. Stellenbosch) Dr. Alfred Gossner, Finance, Controlling(incl. Business Administration, Purchasing and Real Estate) and Information Systems</li>
</ul>