Skip to content
Snippets Groups Projects
Commit e2ea4b32 authored by tuhe's avatar tuhe
Browse files

Fixed creation of tasks + notepad; new list view of tasks; started work on mindmap flash fuckup

parent 3d29aebe
No related branches found
No related tags found
No related merge requests found
Showing
with 312 additions and 426 deletions
No preview for this file type
......@@ -3,5 +3,5 @@ from dkbn2.graph import views
urlpatterns = [
re_path(r'^$', views.full),
re_path(r'^notepad/(?P<notepad_id>\d+)/$', views.notepad),
re_path(r'^notepad/(?P<notepad_id>\d+)/$', views.notepad, name='graph_notepad'),
]
\ No newline at end of file
No preview for this file type
No preview for this file type
......@@ -6,6 +6,11 @@ from django.views.generic import TemplateView
urlpatterns =[
re_path(r'^present/$', TemplateView.as_view(template_name='kmap/kmap_presentation.html'), name='kmap_present'),
re_path(r'^$', views.kmap,name='kmap'),
re_path(r'^mm/$', views.mm),
re_path(r'^mm/(?P<presentation_mode>\d+)$', views.mm),
re_path(r'^mm/$', views.mm, name="kmap_mm"),
re_path(r'^mm/(?P<presentation_mode>\d+)$', views.mm, name="kmap_presentation_mode"),
# Tue: Here we go with version 2.
# re_path(r'^present/$', TemplateView.as_view(template_name='kmap/kmap_presentation.html'), name='kmap_present'),
re_path(r'^kmap2/$', views.kmap2, name='kmap2'),
re_path(r'^mm2/$', views.mm2, name="kmap_mm2"),
# re_path(r'^mm/(?P<presentation_mode>\d+)$', views.mm, name="kmap_presentation_mode"),
]
\ No newline at end of file
from django.conf.urls.defaults import *
from dkbn.kmap import views
from django.views.generic.simple import direct_to_template
urlpatterns = patterns('',
(r'^present/$', direct_to_template, {'template' : 'kmap/kmap_presentation.html'}, 'kmap_present'),
(r'^$', views.kmap),
(r'^mm/$', views.mm),
(r'^mm/(?P<object_id>\d+)$', views.mm),
)
\ No newline at end of file
......@@ -3,17 +3,46 @@ from django.http import *
from pages import models
from threadedcomments import models as threaded_models
from datetime import date
# xml parsing
from xml.dom.minidom import Document
def kma_wrap(request):
return render_to_response('kmap/kmap_wrap.html')
return render(request, 'kmap/kmap_wrap.html')
# return render_to_response('kmap/kmap_wrap.html')
def kmap(request):
return render_to_response('kmap/kmap.html')
return render(request, 'kmap/kmap.html')
"""
Tue: Starting over with the knowledge map using a free JS implementation (BSD). Don't think it is prettiest, but it should work.
"""
def kmap2(request):
return render(request, 'kmap/kmap2.html')
def mm2(request, presentation_mode=0):
response = HttpResponse(content_type='text/xml')
doc = Document()
map = doc.createElement("map")
map.setAttribute("version", "0.8.FA Alpha 5a")
doc.appendChild(map)
project_node = create_node(doc, "Project", background_color="#EEEEFF")
project_node = font(doc, project_node, 16, bold=True)
project_node.setAttribute("ID", "Freemind_Link_1757763095")
map.appendChild(project_node)
corners = models.CORNERS
corner_order = [0, 3, 1, 2]
for c in corner_order:
project_node.appendChild(populate_corner(doc, c, presentation_mode))
xml = doc.toprettyxml(u' ', encoding="utf-8");
response.write(xml)
return response
def mm(request, presentation_mode=0):
response = HttpResponse(mimetype='text/xml')
response = HttpResponse(content_type='text/xml')
doc = Document()
map = doc.createElement("map")
map.setAttribute("version", "0.8.FA Alpha 5a")
......
{% extends "kmap/kmap_base.html" %}
{% block kmapurl %}{% url kmap.views.mm %}{% endblock %}
\ No newline at end of file
{% block kmapurl %}{% url 'kmap_mm' %}{% endblock %}
\ No newline at end of file
{% extends "kmap/kmap_base.html" %}
{% block kmapurl %}{% url kmap.views.mm %}{% endblock %}
{% extends "kmap/kmap_base2.html" %}
{% block kmapurl %}{% url 'kmap_mm2' %}{% endblock %}
\ No newline at end of file
......@@ -5,7 +5,7 @@
<meta name="description" content="freemind flash browser"/>
<meta name="keywords" content="freemind,flash"/>
<title>Knowledge Map</title>
<script type="text/javascript" src="/media/js/flashobject.js"></script>
<script type="text/javascript" src="/static/media/js/flashobject.js"></script>
<style type="text/css">
/* hide from ie on mac \*/
html {
......@@ -49,7 +49,7 @@ function giveFocus()
}
return result;
}
var fo = new FlashObject("/media/flash/visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#9999ff");
var fo = new FlashObject("/static/media/flash/visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#9999ff");
fo.addParam("quality", "high");
fo.addParam("bgcolor", "#ffffff");
fo.addVariable("openUrl", "_blank");
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="freemind flash browser"/>
<meta name="keywords" content="freemind,flash"/>
<title>Knowledge Map</title>
<script type="text/javascript" src="/media/js/flashobject.js"></script>
<style type="text/css">
/* hide from ie on mac \*/
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
/* end hide */
body {
height: 100%;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}
</style>
{% block js %}{% endblock %}
<script language="javascript">
/**
function giveFocus()
{
document.visorFreeMind.focus();
}
**/
</script>
</head>
<body>
<div id="flashcontent" onmouseover="giveFocus();">
Flash plugin or Javascript are turned off.
Activate both and reload to view the mindmap
</div>
<script type="text/javascript">
// <![CDATA[
function getMap(map){
var result=map;
var loc=document.location+'';
if(loc.indexOf(".mm")>0 && loc.indexOf("?")>0){
result=loc.substring(loc.indexOf("?")+1);
}
return result;
}
var fo = new FlashObject("/media/flash/visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#9999ff");
fo.addParam("quality", "high");
fo.addParam("bgcolor", "#ffffff");
fo.addVariable("openUrl", "_blank");
fo.addVariable("initLoadFile", getMap("{% block kmapurl%} {% endblock %}"));
fo.addVariable("startCollapsedToLevel","4")
fo.addVariable("defaultToolTipWordWrap",200);
fo.addVariable("min_alpha_buttons",20);
fo.addVariable("max_alpha_buttons",100);
fo.write("flashcontent");
// ]]>
</script>
</body>
</html>
<script src="cytoscape.min.js"></script>
{% load static %}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=8">
<link type="text/css" rel="stylesheet" href="{% static 'style/jsmind.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static 'style/index.html.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static 'style/style.css' %}" />
<!--[if lt IE 7]>
<script type="text/javascript" src="{% static 'style/entypo/lte-ie7.js' %}"></script>
<![endif]-->
<title>jsMind - Online Mindmap</title>
</head>
<body>
<header>
<h1 class="icon-bolt">jsMind</h1>
<nav>
<a href="developer.html" target="_blank" class="latest">Developer &amp; Open Source</a>
</nav>
<a name="top"></a>
</header>
<div id="jsmind_container" class="jsmind-container"></div>
<div id="jsmind_tools" class="jsmind-tools">
<ul>
<li action="toggle" class="icon-cog visible" title="click for more function">Toggle</li>
<li action="open" class="icon-popup" title="open a mindmap from ...">Open</li>
<li action="save" class="icon-export" title="export current mindmap to ...">Save</li>
<li action="screenshot" class="icon-camera" title="take a screenshot on current mindmap">Screenshot</li>
<li action="share" class="icon-share" title="share current mindmap to ...">Share</li>
<li action="rebuild" class="icon-trash" title="clean current mindmap and create new one">Rebuild</li>
<li action="help" class="icon-help" title="how to use jsMind ...">Usage</li>
</ul>
</div>
<footer>
<nav>
<a href="http://hizzgdev.github.io/jsmind" target="_blank">&copy;jsMind 2014</a>
</nav>
</footer>
</body>
<script type="text/javascript" src="{% static 'js/jsmind.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jsmind.draggable.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jsmind.screenshot.js' %}"></script>
<!--
<script type="text/javascript" src="{% static 'js/index.html.js' %}"></script>
-->
<script type="text/javascript">
(function($w){
"use strict"
var $d = $w.document;
var $g = function(id){return $d.getElementById(id)};
var $header = $d.getElementsByTagName('header')[0];
var $footer = $d.getElementsByTagName('footer')[0];
var $container = $g('jsmind_container');
var _h_header = $header.clientHeight;
var _h_footer = $footer.clientHeight;
var jsMind = $w.jsMind;
var _jm = null;
function page_load(){
init_jsMind();
set_container_size();
load_mind();
register_event();
}
function init_jsMind(){
var options = {
editable:true,
container:'jsmind_container',
theme:'greensea'
};
_jm = new jsMind(options);
_jm.init();
}
function register_event(){
jsMind.util.dom.add_event($w,'resize',reset_container_size);
jsMind.util.dom.add_event($g('jsmind_tools'),'click',tools_handler);
jsMind.util.dom.add_event($d,'click',hide_setting_visible);
}
function load_mind(){
// Define mind-variable and show it. This could be the output from webapp (automatically generated). Could also be from an
// URL. Is there an idea behind seperating the two?
var mind_url = '/static/jsmap_example/data_example2.json';
jsMind.util.ajax.get(mind_url,function(mind){
_jm.show(mind);
_jm.set_node_font_style("easy", 12, 'bold', 'normal');
});
}
var _resize_timeout_id = -1;
function reset_container_size(){
if(_resize_timeout_id != -1){
clearTimeout(_resize_timeout_id);
}
_resize_timeout_id = setTimeout(function(){
_resize_timeout_id = -1;
set_container_size();
_jm.resize();
},300);
}
var _setting_visible = false;
function toggle_setting_visible(e){
var tools = $g('jsmind_tools');
if(_setting_visible){
_setting_visible = false;
tools.className = tools.className.replace(/\s*jsmind-tools-active/ig,'');
}else{
_setting_visible = true;
tools.className += ' jsmind-tools-active'
}
}
function hide_setting_visible(e){
if(!_setting_visible){ return; }
var e_src = e.target || event.srcElement;
if(e_src != null && e_src.getAttribute('action') === 'toggle'){ return; }
var tools = $g('jsmind_tools');
_setting_visible = false;
tools.className = tools.className.replace(/\s*jsmind-tools-active/ig,'');
}
function open_open_dialog(e){}
function open_save_dialog(e){}
function open_share_dialog(e){}
function open_help_dialog(e){}
function take_screenshot(e){
_jm.shoot();
}
function jsmind_rebuild(e){
_jm.show();
}
var tools_handlers={
toggle : toggle_setting_visible,
open : open_open_dialog,
save : open_save_dialog,
screenshot : take_screenshot,
share : open_share_dialog,
rebuild : jsmind_rebuild,
help : open_help_dialog
};
function tools_handler(e){
var ele = e.target || event.srcElement;
var action = ele.getAttribute('action');
if(action in tools_handlers){
tools_handlers[action](e);
}
}
function set_container_size(){
var ch = $w.innerHeight-_h_header-_h_footer-2;
var cw = $w.innerWidth;
$container.style.height = ch+'px';
$container.style.width = cw+'px';
}
page_load();
})(window);
</script>
<!--
<script src="/scripts/analytics.js"></script>
-->
</html>
......@@ -49,7 +49,7 @@
<script language='javascript' type="text/javascript">
$(document).ready(function() {
$('#adddiv').load("{% url fileshare.views.files_in_notepad notepad.id %}",bindform);
$('#adddiv').load("{% url 'files_in_notepad' notepad.id %}",bindform);
});
function bindform(){
var options = {target:'#adddiv',success: bindform};
......@@ -61,15 +61,18 @@ function bindform(){
</script>
<div class="span-17 last" style="border-color : lightgray; border-width : 1; border-style : solid; padding : 4px;"><div id="adddiv">Loading files</div></div>
{% endblock %}
{#
{% block graph %}
<!--
<div class="span-17 last"><br><br>
<h6>Relationship to other documents</h6>
<EMBED src="{% url graph.views.notepad notepad.id%}" style="max-width:690px;">
<EMBED src="% url 'graph_notepad' notepad.id%}" style="max-width:690px;">
</div><div class="span-17 last">
<a href="{% url graph.views.notepad notepad.id%}" target="_blank">Click here to view in new window<a>
<a href="% url 'graph_notepad' notepad.id%}" target="_blank">Click here to view in new window<a>
</div>
-->
#}
{% endblock %}
{% block comments %}
......@@ -155,7 +158,7 @@ $(function(){
<!-- notepad feedback -->
<script language='javascript' type="text/javascript">
$(document).ready(function() {
$('#notepad_feedback').load("{% url pages.views.notepad_feedback notepad.id %}");
$('#notepad_feedback').load("{% url 'notepad_feedback' notepad.id %}");
});
</script>
{% box "Feedback on notepad" %}<div id="notepad_feedback">Loading..</div>{% endbox %}
......
{% extends "page.html" %}
{% load formatting %}
{% load feedback %}
{% load information %}
{% load avatars %}
{% load threadedcommentstags %}
{% block heading %}<img src="{% avatar 48 notepad.creator %}">{% block title %}{{notepad.title}}{% endblock%}{% endblock %}
{% block sub %}Created {{notepad.created|date}} ({{notepad.created|timesince}} ago) by {% user notepad.creator 0%} {% endblock %}
<!-- reads {{notepad.reads_internal}} ({{notepad.reads_external}} external) -->
{% block button %}
{% url notepad_update notepad.id as upd %}
{% edit upd "Edit Notepad" %}
{% endblock %}
{% block content %}
<div class="span-17 last">
<div class="span-3 colborder"><h6>Task</h6></div>
<div class="span-13 last">{% block task %}<a href="{{notepad.task.get_absolute_url}}">{{notepad.task}}</a>{% endblock%}</div>
</div>
<div class="span-17 last">
<div class="span-3 colborder"><h6>Description</h6></div>
<div class="span-13 last">{% block text %}{{notepad.text|safe}}{% endblock%}</div>
</div>
{% comment %}
{% load tagging_tags %}
<div class="span-17 last">
<div class="span-17 last"><h6>Tags</h6></div>
{% tag_cloud_for_model pages.Notepad as tgs with steps=16 min_count=0 distribution=log %}
<div class="span-17 last">{% for tag in tgs %}
<span style="font-size: {{ tag.font_size }}px;">
<a class="link-typeA" title="Number of entries: {{ tag.total_ref }}" href="{% url widget_tag_detail tag.name %}">{{ tag.name }}</a>
</span>
{% endfor %}
{% block tags %}{%endblock %}
</div>
</div>
{% endcomment %}
{% block task_motivated %}
<div class="span-3 colborder"><h6>Tasks motivated by this notepad</h6></div>
<div class="span-13 last">{% block tasks_motivated %}<ul>{% for t in notepad.generated_tasks.all %}<li><a href="{{t.get_absolute_url}}">{{t}}</a></li>{% endfor %}</ul>{% endblock%}</div>
{% endblock %}
</form>
<div class="span-17 last">&nbsp;</div>
{% block fileupload %}
<script language='javascript' type="text/javascript">
$(document).ready(function() {
$('#adddiv').load("{% url fileshare.views.files_in_notepad notepad.id %}",bindform);
});
function bindform(){
var options = {target:'#adddiv',success: bindform};
$('#fupload').ajaxForm(options);
$('#fattach').ajaxForm(options);
$('#dattach').hide();
$('#dupload').hide();
}
</script>
<div class="span-17 last" style="border-color : lightgray; border-width : 1; border-style : solid; padding : 4px;"><div id="adddiv">Loading files</div></div>
{% endblock %}
{% block graph %}
<!--
<div class="span-17 last"><br><br>
<h6>Relationship to other documents</h6>
<EMBED src="{% url graph.views.notepad notepad.id%}" style="max-width:690px;">
</div><div class="span-17 last">
<a href="{% url graph.views.notepad notepad.id%}" target="_blank">Click here to view in new window<a>
</div>
-->
{% endblock %}
{% block comments %}
</form>
<div class="span-17 last">&nbsp;</div>
{% communication_tree notepad %}
{% endblock %}
<!--
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>-->
<!--
<script type="text/javascript">
$(function(){
$('#help').dialog({
autoOpen: false,
width: 660,
buttons: {
"Close": function() {
$(this).dialog("close");
},
/**"Cancel": function() {
$(this).dialog("close");
}*/
}
});
$('#help_link').click(function(){ // Dialog Link
$('#help').dialog('open');
return false;
});
});
</script>
-->
<!--<div class="span-15 prepend-1">-->
<!--<div id="dialog" title="Dialog Title">-->
{% helpmodal %}
<!-- <h6>Instructions</h6>-->
<p>A notepad is in Kubusnet seen as the solution to a task and result of a single investigation.
It is possible to create more than one notepad associated to one task, if solving the task requires making more than one investigation.
A notepad should contain information and/or knowledge in the perspective of the receiver (most often the organization). To clarify:
</p>
<ul>
<li>Data is differences in the world; e.g. that which is to be investigated and is described in task description
<li>Information is valid data that is investigated and composed in a way that these data make a difference on the part of the receiver; e.g. what a notepad should contain
<li>Knowledge is information that can be transformed to actions on the part of receiver that makes a difference; e.g. the effect that one or several notepads together is meant to have
</ul>
<p>
In addition to the fact that a notepad should be valid and build on solid references, a healthy inner quality check on the part of writer of the notepad is to ask: <i>Would I as highly educated and soon to be professional be able to show this work/notepad to a group of my peers and be proud?</i>.
</p>
<p>
A notepad can be understood as an investigation or a mini project in itself that should make sense (information and knowledge) based on task and task description. It is important that the group actively reflect on what it considers a notepad of high quality, and describe these quality requirements in the social codex of the group, and that these requirements are actively used by the team managers.
</p>
{% endhelpmodal %}
<!--<p><a href="#" id="help_link">Help text</a></p>-->
<div class="span-17 last">&nbsp;</div>
<!--</div>-->
{% endblock %}
{% block bar %}
{% url notepad_delete notepad.id as notepad_delete %}
{% url pages.views.notepad_list as notepad_list %}
{% box "Actions"%}
<ul>
<li>{% include "notepad/notepad_action_add_partial.html" %}
<li>{% button notepad_list "page_white_stack" "All Notepads"%}
{% if user.get_profile.can_write %}
<li>{% button notepad_delete "page_delete" "Delete Notepad"%}
{% endif %}
<li>{% help %}
</ul>
{% endbox %}
{% block notepad_feedback %}
<!-- notepad feedback -->
<script language='javascript' type="text/javascript">
$(document).ready(function() {
$('#notepad_feedback').load("{% url pages.views.notepad_feedback notepad.id %}");
});
</script>
{% box "Feedback on notepad" %}<div id="notepad_feedback">Loading..</div>{% endbox %}
{% endblock %}
{% endblock %}
......@@ -8,14 +8,14 @@
{% block sub %}{% block subdetails %}Created {{task.created|date}} ({{task.created|timesince}} ago) by {% user task.creator 0%}
at <a href="{{task.meeting.get_absolute_url}}">{{task.meeting}}</a>{% endblock %}{% endblock %}
{% block button %}{% url pages.views.task_update task.id as task_update %}
{% block button %}{% url "task_update" task.id as task_update %}
{% edit task_update "Edit Task" %}{% endblock %}
{% block content %}
<div class="span-17 last">
<div class="span-3 colborder"><h6>Responsible</h6></div>
<div class="span-13 last">{% block responsible %}{% for u in task.responsible_users.all%}{% user u 24 %} &nbsp; &nbsp;{%endfor %}{%endblock%}</div>
<div class="span-3 colborder"><h6>Preject item</h6></div>
<div class="span-13 last">{%block preject %}<a href="{% url preject %}">{{task.preject}}</a> (At corner <i>{{task.preject.get_arena_display}}</i>){%endblock%}</div>
<div class="span-13 last">{%block preject %}<a href="{% url 'preject' %}">{{task.preject}}</a> (At corner <i>{{task.preject.get_arena_display}}</i>){%endblock%}</div>
{% block status_all %}
<div class="span-3 colborder"><h6>Status</h6></div>
<div class="span-13 last">{%block status %}{{task.get_status_display}}{%endblock%}</div>
......@@ -79,8 +79,8 @@ No notepads has been created from this task.
{% endif %}
{% box "Actions" %}
{% url pages.views.task_list as task_list %}
{% url pages.views.task_delete task.id as task_delete %}
{% url "task_list" as task_list %}
{% url "task_delete" task.id as task_delete %}
{% button task_list "page_white_stack" "All Tasks"%}
{% if user.get_profile.can_write %}
......@@ -88,7 +88,7 @@ No notepads has been created from this task.
{% button task_delete "page_delete" "Delete task"%}
{% endif %}
{% if task.can_add_notepad %}
{% url notepad_create as notepad_create %}
{% url "notepad_create" as notepad_create %}
{% button notepad_create "page_add" "Create a notepad" %}
{% endif %}
......
{% extends "page.html" %}
{% load formatting %}
{% load feedback %}
{% load information %}
{% load avatars %}
{% block heading %}<img src="{% avatar 48 task.creator %}"> {% block title %}{{task.title}}{% endblock%}{% endblock %}
{% block sub %}{% block subdetails %}Created {{task.created|date}} ({{task.created|timesince}} ago) by {% user task.creator 0%}
at <a href="{{task.meeting.get_absolute_url}}">{{task.meeting}}</a>{% endblock %}{% endblock %}
{% block button %}{% url pages.views.task_update task.id as task_update %}
{% edit task_update "Edit Task" %}{% endblock %}
{% block content %}
<div class="span-17 last">
<div class="span-3 colborder"><h6>Responsible</h6></div>
<div class="span-13 last">{% block responsible %}{% for u in task.responsible_users.all%}{% user u 24 %} &nbsp; &nbsp;{%endfor %}{%endblock%}</div>
<div class="span-3 colborder"><h6>Preject item</h6></div>
<div class="span-13 last">{%block preject %}<a href="{% url preject %}">{{task.preject}}</a> (At corner <i>{{task.preject.get_arena_display}}</i>){%endblock%}</div>
{% block status_all %}
<div class="span-3 colborder"><h6>Status</h6></div>
<div class="span-13 last">{%block status %}{{task.get_status_display}}{%endblock%}</div>
{% endblock %}
</div>
<div class="span-17 last">
<div class="span-3 colborder"><h6>Description of task</h6></div>
<div class="span-13 last">{% block text %}{{task.text|linebreaks}}{% endblock%}</div>
</div>
<div class="span-17 last">
<div class="span-3 colborder"><h6>Motivation for task</h6></div>
<div class="span-13 last">{% block why %}{{task.why|linebreaks}}{% endblock%}
{% block motivative%}
{% if task.motivative_notepads %}
<h6>Notepads that motivated this task</h6>
{% for n in task.motivative_notepads.all %}
<a href="{{n.get_absolute_url}}">{{n}}</a> <br>
{%endfor %}
{% endif %}
{% endblock %}
</div>
</div>
<p>&nbsp;</p>
{% if notepads %}
<div class="span-17 last">
<h6>Notepads created from task</h6>
<table>
{% for notepad in notepads %}
<tr>
<td><a href="{{notepad.get_absolute_url}}">{{notepad}}</a></td><td>{% user notepad.creator 16 %}</td><td>{{notepad.created}}</td>
</tr>
{% empty %}
No notepads has been created from this task.
{% endfor %}
</table>
</div>
{% endif %}
<div class="span-15 prepend-1 last">
{% slide "Show instructions" %}{% full %}
<div class="instructions">
<h6>Instructions</h6>
<p>In general a task (and task description) is of high quality when the task is based on a personal
motivation on the part of the task-holder and the task description captures context in a way that an
outsider in principle would be able to understand and solve it.
</p>
<p>
When formulating a task in Kubusnet, the task description should (when of high quality) in addition to a title very briefly describe:</p>
<ul>
<li>The motivation of the task holder that the task is motivated by</li>
<li>How the task is valuated relevant to the group and company</li>
<li>By what means the task is initially sought solved and how much time it is expected that task holder use to solve the task</li>
</ul>
<p>A good task is based on a personal motivation, is strategically relevant and solvable before next team meeting.</p>
</div>
{% endslide %}
</div>
{% endblock %}
{% load extras%}
{% block bar %}
{% if not task.can_add_notepad %}
<i>You must be selected as responsible to create notepads from this task</i>
{% endif %}
{% box "Actions" %}
{% url pages.views.task_list as task_list %}
{% url pages.views.task_delete task.id as task_delete %}
{% button task_list "page_white_stack" "All Tasks"%}
{% if user.get_profile.can_write %}
{% if not task.has_notepads %}
{% button task_delete "page_delete" "Delete task"%}
{% endif %}
{% if task.can_add_notepad %}
{% url notepad_create as notepad_create %}
{% button notepad_create "page_add" "Create a notepad" %}
{% endif %}
{% endif %}
{% endbox %}
{% endblock %}
\ No newline at end of file
{% extends "page.html" %}
{% load extras %}
{% load render_table from django_tables2 %}
{% load django_tables2 %}
{% load information %}
{% load formatting %}
{% block content %}
<h3>Tasks</h3>
<table>
{% include "common/table_th.html"%}
{% for row in table.rows %}
<tr>
{% for value in row %}
<td>
{% load extras %}
{% switch forloop.counter %}
{% case 1 %} <a href="{{row.id}}">{{value}}</a>
{% case 2 %}{% user row.data.creator 16 %}
{% case 3 %}<span class="status-{{row.data.status}}">{{row.data.get_status_display}}</span>
{% case 4 %}<a href="{{row.data.meeting.get_absolute_url }}">{{value}}</a>
{% else %}{{value|date}} ({{value|timesince }} ago) {# date #}
{% endswitch %}
<!--
Tue 2022: I copy-pasted the code from herE:
https://github.com/jieter/django-tables2/blob/8cd3470496b564c78ca94298b3588e1e79f5600f/django_tables2/templates/django_tables2/table.html#L24-L38
Necesary because I did not want to mix in tmeplatetags with the Table class, and don't have time for a better solution.
-->
<table{% if table.attrs %} {{ table.attrs.as_html }}{% endif %}>
{% block table.thead %}
{% if table.show_header %}
<thead>
<tr>
{% for column in table.columns %}
{% if column.orderable %}
<th {{ column.attrs.th.as_html }}><a href="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}">{{ column.header }}</a></th>
{% else %}
<th {{ column.attrs.th.as_html }}>{{ column.header }}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
{% endif %}
{% endblock table.thead %}
{% block table.tbody %}
<tbody>
{% for row in table.page.object_list|default:table.rows %} {# support pagination #}
{% block table.tbody.row %}
<tr {{ row.attrs.as_html }}>
{% for column, cell in row.items %}
<td {{ column.attrs.td.as_html }}>
{% if forloop.counter == 1%} <a href="{{row.record.id}}">{{cell}}</a> {% endif %}
{% if forloop.counter == 2%}{% user row.record.creator 16 %} {% endif %}
{% if forloop.counter == 3%}<span class="status-{{row.record.status}}">{{row.record.get_status_display}}</span> {% endif %}
{% if forloop.counter == 4%}<a href="{{row.record.meeting.get_absolute_url }}">{{cell}}</a> {% endif %}
{% if forloop.counter == 5%}{{cell|date}} ({{cell|timesince }} ago) {% endif %}
</td>
{% endfor %}
</tr>
{% endblock table.tbody.row %}
{% empty %}
No task has been added yet. You must first create and complete a meeting before you can add tasks.
{% if table.empty_text %}
{% block table.tbody.empty_text %}
<tr><td colspan="{{ table.columns|length }}">{{ table.empty_text }}</td></tr>
{% endblock table.tbody.empty_text %}
{% endif %}
{% endfor %}
</tbody>
{% endblock table.tbody %}
{% block table.tfoot %}
{% if table.has_footer %}
<tfoot>
<tr>
{% for column in table.columns %}
<td>{{ column.footer }}</td>
{% endfor %}
</tr>
</tfoot>
{% endif %}
{% endblock table.tfoot %}
{% if table.rows|length == 0 %}
No task has been added yet. You must first create and complete a meeting before you can add tasks.
{% endif %}
</table>
{% endblock %}
{% block bar %}
<p>
......
{% extends "page.html" %}
{% load information %}
{% load formatting %}
{% block content %}
<h3>Tasks</h3>
<table>
{% include "common/table_th.html"%}
{% for row in table.rows %}
<tr>
{% for value in row %}
<td>
{% load extras %}
{% switch forloop.counter %}
{% case 1 %} <a href="{{row.id}}">{{value}}</a>
{% case 2 %}{% user row.data.creator 16 %}
{% case 3 %}<span class="status-{{row.data.status}}">{{row.data.get_status_display}}</span>
{% case 4 %}<a href="{{row.data.meeting.get_absolute_url }}">{{value}}</a>
{% else %}{{value|date}} ({{value|timesince }} ago) {# date #}
{% endswitch %}
</td>
{% endfor %}
</tr>
{% empty %}
No task has been added yet. You must first create and complete a meeting before you can add tasks.
{% endfor %}
</table>
{% endblock %}
{% block bar %}
<p>
{% box "Actions" %}
{% if recent_meeting %}
The most recent meeting you was red leader in was <b><a href="{{recent_meeting.get_absolute_url}}">{{recent_meeting}}</a></b>, scheduled <b>{{recent_meeting.date|timesince}} ago</b>.
{% url task_create recent_meeting.id as tcreate %}
{% button tcreate "add" "Create task on this meeting" %}
{% else %}
It is the red leaders job to create tasks. To create tasks, you must set yourself as red leader on the meeting where you are red leader.
{% endif %}
{% endbox %}
</p>
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment