|  | @@ -1,407 +0,0 @@
 | 
	
		
			
			| 1 |  | -# -*- encoding:utf-8 -*-
 | 
	
		
			
			| 2 |  | -from mako import runtime, filters, cache
 | 
	
		
			
			| 3 |  | -UNDEFINED = runtime.UNDEFINED
 | 
	
		
			
			| 4 |  | -__M_dict_builtin = dict
 | 
	
		
			
			| 5 |  | -__M_locals_builtin = locals
 | 
	
		
			
			| 6 |  | -_magic_number = 9
 | 
	
		
			
			| 7 |  | -_modified_time = 1378917566.913937
 | 
	
		
			
			| 8 |  | -_enable_loop = True
 | 
	
		
			
			| 9 |  | -_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/dashboard.mak'
 | 
	
		
			
			| 10 |  | -_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/dashboard.mak'
 | 
	
		
			
			| 11 |  | -_source_encoding = 'utf-8'
 | 
	
		
			
			| 12 |  | -from markupsafe import escape_silent as escape
 | 
	
		
			
			| 13 |  | -_exports = ['node_treeview', 'title', 'node_treeview_in_select_field', 'node_treeview_for_set_parent_menu']
 | 
	
		
			
			| 14 |  | -
 | 
	
		
			
			| 15 |  | -
 | 
	
		
			
			| 16 |  | -def _mako_get_namespace(context, name):
 | 
	
		
			
			| 17 |  | -    try:
 | 
	
		
			
			| 18 |  | -        return context.namespaces[(__name__, name)]
 | 
	
		
			
			| 19 |  | -    except KeyError:
 | 
	
		
			
			| 20 |  | -        _mako_generate_namespaces(context)
 | 
	
		
			
			| 21 |  | -        return context.namespaces[(__name__, name)]
 | 
	
		
			
			| 22 |  | -def _mako_generate_namespaces(context):
 | 
	
		
			
			| 23 |  | -    # SOURCE LINE 2
 | 
	
		
			
			| 24 |  | -    ns = runtime.TemplateNamespace(u'POD', context._clean_inheritance_tokens(), templateuri=u'pboard.templates.pod', callables=None,  calling_uri=_template_uri)
 | 
	
		
			
			| 25 |  | -    context.namespaces[(__name__, u'POD')] = ns
 | 
	
		
			
			| 26 |  | -
 | 
	
		
			
			| 27 |  | -def _mako_inherit(template, context):
 | 
	
		
			
			| 28 |  | -    _mako_generate_namespaces(context)
 | 
	
		
			
			| 29 |  | -    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
 | 
	
		
			
			| 30 |  | -def render_body(context,**pageargs):
 | 
	
		
			
			| 31 |  | -    __M_caller = context.caller_stack._push_frame()
 | 
	
		
			
			| 32 |  | -    try:
 | 
	
		
			
			| 33 |  | -        __M_locals = __M_dict_builtin(pageargs=pageargs)
 | 
	
		
			
			| 34 |  | -        def node_treeview_for_set_parent_menu(node_id,node_list,indentation=-1):
 | 
	
		
			
			| 35 |  | -            return render_node_treeview_for_set_parent_menu(context._locals(__M_locals),node_id,node_list,indentation)
 | 
	
		
			
			| 36 |  | -        root_node_list = context.get('root_node_list', UNDEFINED)
 | 
	
		
			
			| 37 |  | -        node_status_list = context.get('node_status_list', UNDEFINED)
 | 
	
		
			
			| 38 |  | -        current_node = context.get('current_node', UNDEFINED)
 | 
	
		
			
			| 39 |  | -        def node_treeview(node_list,indentation=-1):
 | 
	
		
			
			| 40 |  | -            return render_node_treeview(context._locals(__M_locals),node_list,indentation)
 | 
	
		
			
			| 41 |  | -        tg = context.get('tg', UNDEFINED)
 | 
	
		
			
			| 42 |  | -        POD = _mako_get_namespace(context, 'POD')
 | 
	
		
			
			| 43 |  | -        _ = context.get('_', UNDEFINED)
 | 
	
		
			
			| 44 |  | -        __M_writer = context.writer()
 | 
	
		
			
			| 45 |  | -        # SOURCE LINE 1
 | 
	
		
			
			| 46 |  | -        __M_writer(u'\n')
 | 
	
		
			
			| 47 |  | -        # SOURCE LINE 2
 | 
	
		
			
			| 48 |  | -        __M_writer(u'\n\n\n')
 | 
	
		
			
			| 49 |  | -        # SOURCE LINE 22
 | 
	
		
			
			| 50 |  | -        __M_writer(u'\n\n')
 | 
	
		
			
			| 51 |  | -        # SOURCE LINE 56
 | 
	
		
			
			| 52 |  | -        __M_writer(u'\n\n')
 | 
	
		
			
			| 53 |  | -        # SOURCE LINE 72
 | 
	
		
			
			| 54 |  | -        __M_writer(u'\n\n')
 | 
	
		
			
			| 55 |  | -        # SOURCE LINE 76
 | 
	
		
			
			| 56 |  | -        __M_writer(u'\n\n  <div class="row">\n    <div class="span3">\n      <div class="btn-group">\n        <button class="btn">')
 | 
	
		
			
			| 57 |  | -        # SOURCE LINE 81
 | 
	
		
			
			| 58 |  | -        __M_writer(escape(_('Documents')))
 | 
	
		
			
			| 59 |  | -        __M_writer(u'</button>\n        <button class="btn" title="')
 | 
	
		
			
			| 60 |  | -        # SOURCE LINE 82
 | 
	
		
			
			| 61 |  | -        __M_writer(escape(_('Show current filtering state')))
 | 
	
		
			
			| 62 |  | -        __M_writer(u'"><i class="  icon-g-eye-open"></i></button>\n        \n        <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" title=\'')
 | 
	
		
			
			| 63 |  | -        # SOURCE LINE 84
 | 
	
		
			
			| 64 |  | -        __M_writer(escape(_('Adjust filtering')))
 | 
	
		
			
			| 65 |  | -        __M_writer(u'\'><i class=" icon-g-adjust"></i></a>\n                <ul class="dropdown-menu">\n')
 | 
	
		
			
			| 66 |  | -        # SOURCE LINE 86
 | 
	
		
			
			| 67 |  | -        for node_status in node_status_list:
 | 
	
		
			
			| 68 |  | -            # SOURCE LINE 87
 | 
	
		
			
			| 69 |  | -            __M_writer(u'            <li>\n              <a class="')
 | 
	
		
			
			| 70 |  | -            # SOURCE LINE 88
 | 
	
		
			
			| 71 |  | -            __M_writer(escape(node_status.css))
 | 
	
		
			
			| 72 |  | -            __M_writer(u'" href="')
 | 
	
		
			
			| 73 |  | -            __M_writer(escape(tg.url('/edit_status?node_id=%i&node_status=%s'%(current_node.node_id, node_status.status_id))))
 | 
	
		
			
			| 74 |  | -            __M_writer(u'">\n                <i class="')
 | 
	
		
			
			| 75 |  | -            # SOURCE LINE 89
 | 
	
		
			
			| 76 |  | -            __M_writer(escape(node_status.icon_id))
 | 
	
		
			
			| 77 |  | -            __M_writer(u'"></i> ')
 | 
	
		
			
			| 78 |  | -            __M_writer(escape(node_status.label))
 | 
	
		
			
			| 79 |  | -            __M_writer(u'\n              </a>\n            </li>\n')
 | 
	
		
			
			| 80 |  | -        # SOURCE LINE 93
 | 
	
		
			
			| 81 |  | -        __M_writer(u'        </ul>\n      </div>\n      <p></p>\n      <div>\n        ')
 | 
	
		
			
			| 82 |  | -        # SOURCE LINE 97
 | 
	
		
			
			| 83 |  | -        __M_writer(escape(node_treeview(root_node_list)))
 | 
	
		
			
			| 84 |  | -        __M_writer(u'\n      </div>\n    </div>\n    <div class="span9">\n        \n        \n        \n        <form style=\'display: none;\' id="current-document-title-edit-form" method=\'post\' action=\'')
 | 
	
		
			
			| 85 |  | -        # SOURCE LINE 104
 | 
	
		
			
			| 86 |  | -        __M_writer(escape(tg.url('/edit_label')))
 | 
	
		
			
			| 87 |  | -        __M_writer(u'\'>\n          <div class="input-prepend input-append">\n            <input type=\'hidden\' name=\'node_id\' value=\'')
 | 
	
		
			
			| 88 |  | -        # SOURCE LINE 106
 | 
	
		
			
			| 89 |  | -        __M_writer(escape(current_node.node_id))
 | 
	
		
			
			| 90 |  | -        __M_writer(u"'/>\n            ")
 | 
	
		
			
			| 91 |  | -        # SOURCE LINE 107
 | 
	
		
			
			| 92 |  | -        __M_writer(escape(POD.CancelButton('current-document-title-edit-cancel-button')))
 | 
	
		
			
			| 93 |  | -        __M_writer(u"\n            <input type='text' name='data_label' value='")
 | 
	
		
			
			| 94 |  | -        # SOURCE LINE 108
 | 
	
		
			
			| 95 |  | -        __M_writer(escape(current_node.data_label))
 | 
	
		
			
			| 96 |  | -        __M_writer(u'\' class="span2" />\n            ')
 | 
	
		
			
			| 97 |  | -        # SOURCE LINE 109
 | 
	
		
			
			| 98 |  | -        __M_writer(escape(POD.SaveButton('current-document-title-save-cancel-button')))
 | 
	
		
			
			| 99 |  | -        __M_writer(u'\n          </div>\n        </form>\n\n\n      <div class="btn-group">\n        <button class="btn">Status</button>\n        <a class="btn ')
 | 
	
		
			
			| 100 |  | -        # SOURCE LINE 116
 | 
	
		
			
			| 101 |  | -        __M_writer(escape(current_node.getStatus().css))
 | 
	
		
			
			| 102 |  | -        __M_writer(u'" href="#"><i class="')
 | 
	
		
			
			| 103 |  | -        __M_writer(escape(current_node.getStatus().icon))
 | 
	
		
			
			| 104 |  | -        __M_writer(u'"></i> ')
 | 
	
		
			
			| 105 |  | -        __M_writer(escape(current_node.getStatus().getLabel()))
 | 
	
		
			
			| 106 |  | -        __M_writer(u'</a>\n        <a class="btn ')
 | 
	
		
			
			| 107 |  | -        # SOURCE LINE 117
 | 
	
		
			
			| 108 |  | -        __M_writer(escape(current_node.getStatus().css))
 | 
	
		
			
			| 109 |  | -        __M_writer(u' dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>\n        <ul class="dropdown-menu">\n')
 | 
	
		
			
			| 110 |  | -        # SOURCE LINE 119
 | 
	
		
			
			| 111 |  | -        for node_status in node_status_list:
 | 
	
		
			
			| 112 |  | -            # SOURCE LINE 120
 | 
	
		
			
			| 113 |  | -            __M_writer(u'            <li>\n              <a class="')
 | 
	
		
			
			| 114 |  | -            # SOURCE LINE 121
 | 
	
		
			
			| 115 |  | -            __M_writer(escape(node_status.css))
 | 
	
		
			
			| 116 |  | -            __M_writer(u'" href="')
 | 
	
		
			
			| 117 |  | -            __M_writer(escape(tg.url('/edit_status?node_id=%i&node_status=%s'%(current_node.node_id, node_status.status_id))))
 | 
	
		
			
			| 118 |  | -            __M_writer(u'">\n                <i class="')
 | 
	
		
			
			| 119 |  | -            # SOURCE LINE 122
 | 
	
		
			
			| 120 |  | -            __M_writer(escape(node_status.icon_id))
 | 
	
		
			
			| 121 |  | -            __M_writer(u'"></i> ')
 | 
	
		
			
			| 122 |  | -            __M_writer(escape(node_status.label))
 | 
	
		
			
			| 123 |  | -            __M_writer(u'\n              </a>\n            </li>\n')
 | 
	
		
			
			| 124 |  | -        # SOURCE LINE 126
 | 
	
		
			
			| 125 |  | -        __M_writer(u'        </ul>\n      </div>\n      <div class="btn-group">\n        ')
 | 
	
		
			
			| 126 |  | -        # SOURCE LINE 129
 | 
	
		
			
			| 127 |  | -        __M_writer(escape(POD.EditButton('current-document-content-edit-button', True)))
 | 
	
		
			
			| 128 |  | -        __M_writer(u'\n        <a class="btn" href="#" data-toggle="dropdown"><i class="icon-g-move"></i> ')
 | 
	
		
			
			| 129 |  | -        # SOURCE LINE 130
 | 
	
		
			
			| 130 |  | -        __M_writer(escape(_('Move to')))
 | 
	
		
			
			| 131 |  | -        __M_writer(u' <span class="caret"></span></a>\n        <ul class="dropdown-menu">\n          ')
 | 
	
		
			
			| 132 |  | -        # SOURCE LINE 132
 | 
	
		
			
			| 133 |  | -        __M_writer(escape(node_treeview_for_set_parent_menu(current_node.node_id, root_node_list)))
 | 
	
		
			
			| 134 |  | -        __M_writer(u"\n        </ul>\n\n\n        <a href='")
 | 
	
		
			
			| 135 |  | -        # SOURCE LINE 136
 | 
	
		
			
			| 136 |  | -        __M_writer(escape(tg.url('/force_delete_node?node_id=%i'%(current_node.node_id))))
 | 
	
		
			
			| 137 |  | -        __M_writer(u'\' id=\'current-document-force-delete-button\' class="btn" onclick="return confirm(\'')
 | 
	
		
			
			| 138 |  | -        __M_writer(escape(_('Delete current document?')))
 | 
	
		
			
			| 139 |  | -        __M_writer(u'\');"><i class="icon-g-remove"></i> ')
 | 
	
		
			
			| 140 |  | -        __M_writer(escape(_('Delete')))
 | 
	
		
			
			| 141 |  | -        __M_writer(u'</a>\n      </div>\n      \n            <!--</div> PAGE HEADER -->\n      <h3 id="current-document-title">')
 | 
	
		
			
			| 142 |  | -        # SOURCE LINE 140
 | 
	
		
			
			| 143 |  | -        __M_writer(escape(current_node.data_label))
 | 
	
		
			
			| 144 |  | -        __M_writer(u'</h3>\n</div>\n      <div class="span5">\n      \n      <p>\n        <div id=\'current-document-content\' class="">\n          ')
 | 
	
		
			
			| 145 |  | -        # SOURCE LINE 146
 | 
	
		
			
			| 146 |  | -        __M_writer(current_node.data_content)
 | 
	
		
			
			| 147 |  | -        __M_writer(u'\n        </div>\n        <form style=\'display: none;\' id="current-document-content-edit-form" method=\'post\' action=\'')
 | 
	
		
			
			| 148 |  | -        # SOURCE LINE 148
 | 
	
		
			
			| 149 |  | -        __M_writer(escape(tg.url('/edit_content')))
 | 
	
		
			
			| 150 |  | -        __M_writer(u"'>\n          <input type='hidden' name='node_id' value='")
 | 
	
		
			
			| 151 |  | -        # SOURCE LINE 149
 | 
	
		
			
			| 152 |  | -        __M_writer(escape(current_node.node_id))
 | 
	
		
			
			| 153 |  | -        __M_writer(u'\'/>\n          <textarea id="current_node_textarea" name=\'data_content\' spellcheck="false" wrap="off" autofocus placeholder="Enter something ...">\n            ')
 | 
	
		
			
			| 154 |  | -        # SOURCE LINE 151
 | 
	
		
			
			| 155 |  | -        __M_writer(current_node.data_content)
 | 
	
		
			
			| 156 |  | -        __M_writer(u'\n          </textarea>\n          ')
 | 
	
		
			
			| 157 |  | -        # SOURCE LINE 153
 | 
	
		
			
			| 158 |  | -        __M_writer(escape(POD.CancelButton('current-document-content-edit-cancel-button', True)))
 | 
	
		
			
			| 159 |  | -        __M_writer(u'\n          ')
 | 
	
		
			
			| 160 |  | -        # SOURCE LINE 154
 | 
	
		
			
			| 161 |  | -        __M_writer(escape(POD.SaveButton('current-document-content-edit-save-button', True)))
 | 
	
		
			
			| 162 |  | -        __M_writer(u'\n        </form>\n      </p>\n    </div>\n    <div class="span4">\n      <div class="tabbable">\n        <ul class="nav nav-tabs">\n            <li class="active">\n              <a href="#events" data-toggle="tab" title="History"><i class="icon-g-history"></i></a>\n            </li>\n            <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-phone""></i> </a></li>\n            <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-comments"></i> </a></li>\n            <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i> </a></li>\n            <li><a href="#contacts" data-toggle="tab" title="Users"><i class="icon-g-user""></i> </a></li>\n        </ul>\n        <div class="tab-content">\n            <div class="tab-pane active" id="events">\n\n')
 | 
	
		
			
			| 163 |  | -        # SOURCE LINE 172
 | 
	
		
			
			| 164 |  | -        __M_writer(escape(POD.AddButton('current-document-add-event-button', True, _(' Add event'))))
 | 
	
		
			
			| 165 |  | -        __M_writer(u"\n<form style='display: none;' id='current-document-add-event-form' action='")
 | 
	
		
			
			| 166 |  | -        # SOURCE LINE 173
 | 
	
		
			
			| 167 |  | -        __M_writer(escape(tg.url('/api/create_event')))
 | 
	
		
			
			| 168 |  | -        __M_writer(u'\' method=\'post\' class="well">\n  <input type="hidden" name=\'parent_id\' value=\'')
 | 
	
		
			
			| 169 |  | -        # SOURCE LINE 174
 | 
	
		
			
			| 170 |  | -        __M_writer(escape(current_node.node_id))
 | 
	
		
			
			| 171 |  | -        __M_writer(u'\'/>\n  <fieldset>\n    <legend>Add an event</legend>\n    <label>\n      <input type="text" name=\'data_label\' placeholder="Event"/>\n    </label>\n    <label>\n      <div class="datetime-picker-input-div input-append date">\n        <input name=\'data_datetime\' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>\n        <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>\n      </div>\n    </label>\n    <label class="checkbox">\n      <input disabled name=\'add_reminder\' type="checkbox"> add a reminder\n    </label>\n    <label>\n      <div class="datetime-picker-input-div input-append date">\n        <input disabled name=\'data_reminder_datetime\' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>\n        <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>\n      </div>\n    </label>\n\n    ')
 | 
	
		
			
			| 172 |  | -        # SOURCE LINE 196
 | 
	
		
			
			| 173 |  | -        __M_writer(escape(POD.CancelButton('current-document-add-event-cancel-button', True)))
 | 
	
		
			
			| 174 |  | -        __M_writer(u'\n    ')
 | 
	
		
			
			| 175 |  | -        # SOURCE LINE 197
 | 
	
		
			
			| 176 |  | -        __M_writer(escape(POD.SaveButton('current-document-add-event-save-button', True)))
 | 
	
		
			
			| 177 |  | -        __M_writer(u'\n  </fieldset>\n</form>\n\n              <table class="table table-striped table-hover table-condensed">\n                <thead>\n                  <tr>\n                    <th>Date</th>\n                    <th>Time</th>\n                    <th>\n                      Event\n                    </th>\n                    <th>\n                      <a href="" title="Add an event"><i class="icon-g-plus"></i></a>\n                    </th>\n                  </tr>\n                </thead>\n')
 | 
	
		
			
			| 178 |  | -        # SOURCE LINE 214
 | 
	
		
			
			| 179 |  | -        for event in current_node.getEvents():
 | 
	
		
			
			| 180 |  | -            # SOURCE LINE 215
 | 
	
		
			
			| 181 |  | -            __M_writer(u'                <tr title="Last updated: ')
 | 
	
		
			
			| 182 |  | -            __M_writer(escape(event.updated_at))
 | 
	
		
			
			| 183 |  | -            __M_writer(u'">\n                   <td>')
 | 
	
		
			
			| 184 |  | -            # SOURCE LINE 216
 | 
	
		
			
			| 185 |  | -            __M_writer(escape(event.getFormattedDate(event.data_datetime)))
 | 
	
		
			
			| 186 |  | -            __M_writer(u'</td>\n                   <td>')
 | 
	
		
			
			| 187 |  | -            # SOURCE LINE 217
 | 
	
		
			
			| 188 |  | -            __M_writer(escape(event.getFormattedTime(event.data_datetime)))
 | 
	
		
			
			| 189 |  | -            __M_writer(u'</td>\n                   <td>')
 | 
	
		
			
			| 190 |  | -            # SOURCE LINE 218
 | 
	
		
			
			| 191 |  | -            __M_writer(escape(event.data_label))
 | 
	
		
			
			| 192 |  | -            __M_writer(u'</td>\n                   <td>\n                     <a href=""><i class="icon-g-edit"></i></a>\n                   </td>\n                </tr>\n')
 | 
	
		
			
			| 193 |  | -        # SOURCE LINE 224
 | 
	
		
			
			| 194 |  | -        __M_writer(u'              </table>\n            </div>\n            <div class="tab-pane" id="contacts">\n')
 | 
	
		
			
			| 195 |  | -        # SOURCE LINE 227
 | 
	
		
			
			| 196 |  | -        for contact in current_node.getContacts():
 | 
	
		
			
			| 197 |  | -            # SOURCE LINE 228
 | 
	
		
			
			| 198 |  | -            __M_writer(u'                <div class="well">\n                  <legend class="text-info">')
 | 
	
		
			
			| 199 |  | -            # SOURCE LINE 229
 | 
	
		
			
			| 200 |  | -            __M_writer(escape(contact.data_label))
 | 
	
		
			
			| 201 |  | -            __M_writer(u'</legend>\n                  <div>')
 | 
	
		
			
			| 202 |  | -            # SOURCE LINE 230
 | 
	
		
			
			| 203 |  | -            __M_writer(contact.data_content)
 | 
	
		
			
			| 204 |  | -            __M_writer(u'</div>\n                </div>\n')
 | 
	
		
			
			| 205 |  | -        # SOURCE LINE 233
 | 
	
		
			
			| 206 |  | -        __M_writer(u'            </div>\n            <div class="tab-pane" id="comments">')
 | 
	
		
			
			| 207 |  | -        # SOURCE LINE 234
 | 
	
		
			
			| 208 |  | -        __M_writer(current_node.data_content)
 | 
	
		
			
			| 209 |  | -        __M_writer(u'</div>\n            <div class="tab-pane" id="files">Files</div>\n        </div>\n      </div>\n    </div>\n  </div>\n\n')
 | 
	
		
			
			| 210 |  | -        return ''
 | 
	
		
			
			| 211 |  | -    finally:
 | 
	
		
			
			| 212 |  | -        context.caller_stack._pop_frame()
 | 
	
		
			
			| 213 |  | -
 | 
	
		
			
			| 214 |  | -
 | 
	
		
			
			| 215 |  | -def render_node_treeview(context,node_list,indentation=-1):
 | 
	
		
			
			| 216 |  | -    __M_caller = context.caller_stack._push_frame()
 | 
	
		
			
			| 217 |  | -    try:
 | 
	
		
			
			| 218 |  | -        def node_treeview(node_list,indentation=-1):
 | 
	
		
			
			| 219 |  | -            return render_node_treeview(context,node_list,indentation)
 | 
	
		
			
			| 220 |  | -        len = context.get('len', UNDEFINED)
 | 
	
		
			
			| 221 |  | -        _ = context.get('_', UNDEFINED)
 | 
	
		
			
			| 222 |  | -        tg = context.get('tg', UNDEFINED)
 | 
	
		
			
			| 223 |  | -        __M_writer = context.writer()
 | 
	
		
			
			| 224 |  | -        # SOURCE LINE 24
 | 
	
		
			
			| 225 |  | -        __M_writer(u'\n')
 | 
	
		
			
			| 226 |  | -        # SOURCE LINE 25
 | 
	
		
			
			| 227 |  | -        if indentation==-1:
 | 
	
		
			
			| 228 |  | -            # SOURCE LINE 26
 | 
	
		
			
			| 229 |  | -            __M_writer(u'    <div class="pod-toolbar-parent" style="padding-left: 0.5em; position: relative;">\n      <a href="?node=0" title="')
 | 
	
		
			
			| 230 |  | -            # SOURCE LINE 27
 | 
	
		
			
			| 231 |  | -            __M_writer(escape(_('Root')))
 | 
	
		
			
			| 232 |  | -            __M_writer(u'">\n        <i class=\'icon-g-folder-open\'></i>\n        ')
 | 
	
		
			
			| 233 |  | -            # SOURCE LINE 29
 | 
	
		
			
			| 234 |  | -            __M_writer(escape(_('Root')))
 | 
	
		
			
			| 235 |  | -            __M_writer(u'\n      </a>\n      <div class="pod-toolbar">\n        <a href="')
 | 
	
		
			
			| 236 |  | -            # SOURCE LINE 32
 | 
	
		
			
			| 237 |  | -            __M_writer(escape(tg.url('/create_document?parent_id=0')))
 | 
	
		
			
			| 238 |  | -            __M_writer(u'" title="')
 | 
	
		
			
			| 239 |  | -            __M_writer(escape(_('Add child document')))
 | 
	
		
			
			| 240 |  | -            __M_writer(u'"><i class="icon-g-circle-plus"></i></a>\n      </div>\n    </div>\n    ')
 | 
	
		
			
			| 241 |  | -            # SOURCE LINE 35
 | 
	
		
			
			| 242 |  | -            __M_writer(escape(node_treeview(node_list, 0)))
 | 
	
		
			
			| 243 |  | -            __M_writer(u'\n')
 | 
	
		
			
			| 244 |  | -            # SOURCE LINE 36
 | 
	
		
			
			| 245 |  | -        else:
 | 
	
		
			
			| 246 |  | -            # SOURCE LINE 37
 | 
	
		
			
			| 247 |  | -            if len(node_list)>0:
 | 
	
		
			
			| 248 |  | -                # SOURCE LINE 38
 | 
	
		
			
			| 249 |  | -                for node in node_list:
 | 
	
		
			
			| 250 |  | -                    # SOURCE LINE 39
 | 
	
		
			
			| 251 |  | -                    __M_writer(u'        <div class="pod-toolbar-parent" style="padding-left: ')
 | 
	
		
			
			| 252 |  | -                    __M_writer(escape((indentation+2)*0.5))
 | 
	
		
			
			| 253 |  | -                    __M_writer(u'em; position: relative;">\n          <a href="?node=')
 | 
	
		
			
			| 254 |  | -                    # SOURCE LINE 40
 | 
	
		
			
			| 255 |  | -                    __M_writer(escape(node.node_id))
 | 
	
		
			
			| 256 |  | -                    __M_writer(u'" title="')
 | 
	
		
			
			| 257 |  | -                    __M_writer(escape(node.data_label))
 | 
	
		
			
			| 258 |  | -                    __M_writer(u'">\n            <i class=\'')
 | 
	
		
			
			| 259 |  | -                    # SOURCE LINE 41
 | 
	
		
			
			| 260 |  | -                    __M_writer(escape(node.getIconClass()))
 | 
	
		
			
			| 261 |  | -                    __M_writer(u"'></i> ")
 | 
	
		
			
			| 262 |  | -                    __M_writer(escape(node.getTruncatedLabel(32-0.8*(indentation+1))))
 | 
	
		
			
			| 263 |  | -                    __M_writer(u'\n          </a>\n          <div class="pod-toolbar">\n            <a href="')
 | 
	
		
			
			| 264 |  | -                    # SOURCE LINE 44
 | 
	
		
			
			| 265 |  | -                    __M_writer(escape(tg.url('/move_node_upper?node_id=%i'%(node.node_id))))
 | 
	
		
			
			| 266 |  | -                    __M_writer(u'" title="')
 | 
	
		
			
			| 267 |  | -                    __M_writer(escape(_('Move up')))
 | 
	
		
			
			| 268 |  | -                    __M_writer(u'"><i class="icon-g-up-arrow"></i></a>\n            <a href="')
 | 
	
		
			
			| 269 |  | -                    # SOURCE LINE 45
 | 
	
		
			
			| 270 |  | -                    __M_writer(escape(tg.url('/move_node_lower?node_id=%i'%(node.node_id))))
 | 
	
		
			
			| 271 |  | -                    __M_writer(u'" title="')
 | 
	
		
			
			| 272 |  | -                    __M_writer(escape(_('Move down')))
 | 
	
		
			
			| 273 |  | -                    __M_writer(u'"><i class="icon-g-down-arrow"></i></a>\n            <a href="')
 | 
	
		
			
			| 274 |  | -                    # SOURCE LINE 46
 | 
	
		
			
			| 275 |  | -                    __M_writer(escape(tg.url('/create_document?parent_id=%i'%(node.node_id))))
 | 
	
		
			
			| 276 |  | -                    __M_writer(u'" title="')
 | 
	
		
			
			| 277 |  | -                    __M_writer(escape(_('Add child document')))
 | 
	
		
			
			| 278 |  | -                    __M_writer(u'"><i class="icon-g-circle-plus"></i></a>\n          </div>\n          <div class="pod-status ')
 | 
	
		
			
			| 279 |  | -                    # SOURCE LINE 48
 | 
	
		
			
			| 280 |  | -                    __M_writer(escape(node.getStatus().css))
 | 
	
		
			
			| 281 |  | -                    __M_writer(u'" title=\'')
 | 
	
		
			
			| 282 |  | -                    __M_writer(escape(node.getStatus().label))
 | 
	
		
			
			| 283 |  | -                    __M_writer(u"'>\n             <i class='")
 | 
	
		
			
			| 284 |  | -                    # SOURCE LINE 49
 | 
	
		
			
			| 285 |  | -                    __M_writer(escape(node.getStatus().icon))
 | 
	
		
			
			| 286 |  | -                    __M_writer(u"'></i>\n          </div>\n        </div>\n        ")
 | 
	
		
			
			| 287 |  | -                    # SOURCE LINE 52
 | 
	
		
			
			| 288 |  | -                    __M_writer(escape(node_treeview(node.getChildren(), indentation+1)))
 | 
	
		
			
			| 289 |  | -                    __M_writer(u'\n')
 | 
	
		
			
			| 290 |  | -        return ''
 | 
	
		
			
			| 291 |  | -    finally:
 | 
	
		
			
			| 292 |  | -        context.caller_stack._pop_frame()
 | 
	
		
			
			| 293 |  | -
 | 
	
		
			
			| 294 |  | -
 | 
	
		
			
			| 295 |  | -def render_title(context):
 | 
	
		
			
			| 296 |  | -    __M_caller = context.caller_stack._push_frame()
 | 
	
		
			
			| 297 |  | -    try:
 | 
	
		
			
			| 298 |  | -        current_node = context.get('current_node', UNDEFINED)
 | 
	
		
			
			| 299 |  | -        __M_writer = context.writer()
 | 
	
		
			
			| 300 |  | -        # SOURCE LINE 74
 | 
	
		
			
			| 301 |  | -        __M_writer(u'\nPOD :: ')
 | 
	
		
			
			| 302 |  | -        # SOURCE LINE 75
 | 
	
		
			
			| 303 |  | -        __M_writer(escape(current_node.getTruncatedLabel(40)))
 | 
	
		
			
			| 304 |  | -        __M_writer(u' [')
 | 
	
		
			
			| 305 |  | -        __M_writer(escape(current_node.getStatus().label))
 | 
	
		
			
			| 306 |  | -        __M_writer(u']\n')
 | 
	
		
			
			| 307 |  | -        return ''
 | 
	
		
			
			| 308 |  | -    finally:
 | 
	
		
			
			| 309 |  | -        context.caller_stack._pop_frame()
 | 
	
		
			
			| 310 |  | -
 | 
	
		
			
			| 311 |  | -
 | 
	
		
			
			| 312 |  | -def render_node_treeview_in_select_field(context,node_list,indentation,selected_id=0):
 | 
	
		
			
			| 313 |  | -    __M_caller = context.caller_stack._push_frame()
 | 
	
		
			
			| 314 |  | -    try:
 | 
	
		
			
			| 315 |  | -        def node_treeview_in_select_field(node_list,indentation,selected_id=0):
 | 
	
		
			
			| 316 |  | -            return render_node_treeview_in_select_field(context,node_list,indentation,selected_id)
 | 
	
		
			
			| 317 |  | -        len = context.get('len', UNDEFINED)
 | 
	
		
			
			| 318 |  | -        __M_writer = context.writer()
 | 
	
		
			
			| 319 |  | -        # SOURCE LINE 58
 | 
	
		
			
			| 320 |  | -        __M_writer(u'\n')
 | 
	
		
			
			| 321 |  | -        # SOURCE LINE 59
 | 
	
		
			
			| 322 |  | -        if len(node_list)>0:
 | 
	
		
			
			| 323 |  | -            # SOURCE LINE 60
 | 
	
		
			
			| 324 |  | -            if indentation==0:
 | 
	
		
			
			| 325 |  | -                # SOURCE LINE 61
 | 
	
		
			
			| 326 |  | -                __M_writer(u'        <option style="margin-left: ')
 | 
	
		
			
			| 327 |  | -                __M_writer(escape(0.5*indentation))
 | 
	
		
			
			| 328 |  | -                __M_writer(u'em; color: #CCC;" value="0">no parent...</option>\n')
 | 
	
		
			
			| 329 |  | -            # SOURCE LINE 63
 | 
	
		
			
			| 330 |  | -            for node in node_list:
 | 
	
		
			
			| 331 |  | -                # SOURCE LINE 64
 | 
	
		
			
			| 332 |  | -                if selected_id!=node.node_id:
 | 
	
		
			
			| 333 |  | -                    # SOURCE LINE 65
 | 
	
		
			
			| 334 |  | -                    __M_writer(u'          <option style="margin-left: ')
 | 
	
		
			
			| 335 |  | -                    __M_writer(escape(0.5*indentation))
 | 
	
		
			
			| 336 |  | -                    __M_writer(u'em;" value="')
 | 
	
		
			
			| 337 |  | -                    __M_writer(escape(node.node_id))
 | 
	
		
			
			| 338 |  | -                    __M_writer(u'">')
 | 
	
		
			
			| 339 |  | -                    __M_writer(escape(node.data_label))
 | 
	
		
			
			| 340 |  | -                    __M_writer(u'</option>\n')
 | 
	
		
			
			| 341 |  | -                    # SOURCE LINE 66
 | 
	
		
			
			| 342 |  | -                else:
 | 
	
		
			
			| 343 |  | -                    # SOURCE LINE 67
 | 
	
		
			
			| 344 |  | -                    __M_writer(u'          <option style="margin-left: ')
 | 
	
		
			
			| 345 |  | -                    __M_writer(escape(0.5*indentation))
 | 
	
		
			
			| 346 |  | -                    __M_writer(u'em;" value="')
 | 
	
		
			
			| 347 |  | -                    __M_writer(escape(node.node_id))
 | 
	
		
			
			| 348 |  | -                    __M_writer(u'" selected>')
 | 
	
		
			
			| 349 |  | -                    __M_writer(escape(node.data_label))
 | 
	
		
			
			| 350 |  | -                    __M_writer(u'</option>\n')
 | 
	
		
			
			| 351 |  | -                # SOURCE LINE 69
 | 
	
		
			
			| 352 |  | -                __M_writer(u'        ')
 | 
	
		
			
			| 353 |  | -                __M_writer(escape(node_treeview_in_select_field(node.getChildren(), indentation+1, selected_id)))
 | 
	
		
			
			| 354 |  | -                __M_writer(u'\n')
 | 
	
		
			
			| 355 |  | -        return ''
 | 
	
		
			
			| 356 |  | -    finally:
 | 
	
		
			
			| 357 |  | -        context.caller_stack._pop_frame()
 | 
	
		
			
			| 358 |  | -
 | 
	
		
			
			| 359 |  | -
 | 
	
		
			
			| 360 |  | -def render_node_treeview_for_set_parent_menu(context,node_id,node_list,indentation=-1):
 | 
	
		
			
			| 361 |  | -    __M_caller = context.caller_stack._push_frame()
 | 
	
		
			
			| 362 |  | -    try:
 | 
	
		
			
			| 363 |  | -        tg = context.get('tg', UNDEFINED)
 | 
	
		
			
			| 364 |  | -        current_node = context.get('current_node', UNDEFINED)
 | 
	
		
			
			| 365 |  | -        len = context.get('len', UNDEFINED)
 | 
	
		
			
			| 366 |  | -        _ = context.get('_', UNDEFINED)
 | 
	
		
			
			| 367 |  | -        def node_treeview_for_set_parent_menu(node_id,node_list,indentation=-1):
 | 
	
		
			
			| 368 |  | -            return render_node_treeview_for_set_parent_menu(context,node_id,node_list,indentation)
 | 
	
		
			
			| 369 |  | -        __M_writer = context.writer()
 | 
	
		
			
			| 370 |  | -        # SOURCE LINE 5
 | 
	
		
			
			| 371 |  | -        __M_writer(u'\n')
 | 
	
		
			
			| 372 |  | -        # SOURCE LINE 6
 | 
	
		
			
			| 373 |  | -        if indentation==-1:
 | 
	
		
			
			| 374 |  | -            # SOURCE LINE 7
 | 
	
		
			
			| 375 |  | -            __M_writer(u'    <li><a href="')
 | 
	
		
			
			| 376 |  | -            __M_writer(escape(tg.url('/api/set_parent_node?node_id=%i&new_parent_id=0'%(current_node.node_id))))
 | 
	
		
			
			| 377 |  | -            __M_writer(u'">')
 | 
	
		
			
			| 378 |  | -            __M_writer(escape(_('Root')))
 | 
	
		
			
			| 379 |  | -            __M_writer(u'</a>\n      ')
 | 
	
		
			
			| 380 |  | -            # SOURCE LINE 8
 | 
	
		
			
			| 381 |  | -            __M_writer(escape(node_treeview_for_set_parent_menu(node_id, node_list, 0)))
 | 
	
		
			
			| 382 |  | -            __M_writer(u'\n    </li>\n')
 | 
	
		
			
			| 383 |  | -            # SOURCE LINE 10
 | 
	
		
			
			| 384 |  | -        else:
 | 
	
		
			
			| 385 |  | -            # SOURCE LINE 11
 | 
	
		
			
			| 386 |  | -            if len(node_list)>0:
 | 
	
		
			
			| 387 |  | -                # SOURCE LINE 12
 | 
	
		
			
			| 388 |  | -                __M_writer(u'      <ul>\n')
 | 
	
		
			
			| 389 |  | -                # SOURCE LINE 13
 | 
	
		
			
			| 390 |  | -                for new_parent_node in node_list:
 | 
	
		
			
			| 391 |  | -                    # SOURCE LINE 14
 | 
	
		
			
			| 392 |  | -                    __M_writer(u'        <li>\n          <a href="')
 | 
	
		
			
			| 393 |  | -                    # SOURCE LINE 15
 | 
	
		
			
			| 394 |  | -                    __M_writer(escape(tg.url('/api/set_parent_node?node_id=%i&new_parent_id=%i'%(node_id, new_parent_node.node_id))))
 | 
	
		
			
			| 395 |  | -                    __M_writer(u'">')
 | 
	
		
			
			| 396 |  | -                    __M_writer(escape(new_parent_node.getTruncatedLabel(40-indentation*2)))
 | 
	
		
			
			| 397 |  | -                    __M_writer(u'</a>\n          ')
 | 
	
		
			
			| 398 |  | -                    # SOURCE LINE 16
 | 
	
		
			
			| 399 |  | -                    __M_writer(escape(node_treeview_for_set_parent_menu(node_id, new_parent_node.getChildren(), indentation+1)))
 | 
	
		
			
			| 400 |  | -                    __M_writer(u'\n        </li>\n')
 | 
	
		
			
			| 401 |  | -                # SOURCE LINE 19
 | 
	
		
			
			| 402 |  | -                __M_writer(u'      </ul>\n')
 | 
	
		
			
			| 403 |  | -        return ''
 | 
	
		
			
			| 404 |  | -    finally:
 | 
	
		
			
			| 405 |  | -        context.caller_stack._pop_frame()
 | 
	
		
			
			| 406 |  | -
 | 
	
		
			
			| 407 |  | -
 |