## -*- coding: utf_8 -*- <% from fcp import connection from fcp import fcpdefs from fcutils import util from fcws.fcweb import webutil from fcp import mlitem import os.path import urllib %> <%namespace name="fcnames" file="fcnames.html" import="renderFCNames"/> <% myMLItem = fcp.MyMLItem thisWebID = myMLItem.WebID() jsonStr = fcp.MeAsJSON((client.serverTZ,client.clientTZ)) canEdit = None editableVal = util.getValueFromDictionary('Editable', pageargs, None) eStatus = myMLItem.GetEStatus() if not (eStatus & fcpdefs.BackVersion) and editableVal=='0': parent = client.FindServerObjectByObjID(fcp.parentObjID) if parent: canEdit = True if parent.rights & fcpdefs.acWrite else False if canEdit is None: canEdit = True if fcp.rights & fcpdefs.acWrite else False isEditable = canEdit if isEditable and not editableVal=='1': isEditable = False editableClass = " editable" if isEditable else " readonly" fType,subject = fcp.GetEscapedFormField(fcpdefs.dSubject) if subject is None: subject = "" fType,objName = fcp.GetEscapedFormField(fcpdefs.dObjName) if objName is None: objName = "" if subject is not "": windowTitle = subject elif objName is not "": windowTitle = objName else: windowTitle ="Uusi dokumentti" fType,envInfo = fcp.GetEscapedFormField(fcpdefs.dEnvInfo) dateSent,NTo,NCc = envInfo fromNames = fcp.GetMsgNameList(fcpdefs.dFromName) author = fromNames[0].EscapedName() if fromNames[0] is not None else "" fromseparator ="" msgStatus = fcp.MyMLItem.Status() fType,keywords = fcp.GetEscapedFormField(8022) if keywords is None: keywords = "" fType,category = fcp.GetEscapedFormField(8021) if category is None: category = "" attachClasses = 'fc-form-row multiline' if fcp.GetNthMLItem(0) is None and not isEditable: attachClasses += ' fc-mouse-only' subjectID = 'fcfid-'+str(fcpdefs.dSubject) objNameID = 'fcfid-'+str(fcpdefs.dObjName) authorID = 'fcfid-'+str(fcpdefs.dFromName) keywordsID = 'fcfid-8022' categoryID = 'fcfid-8021' %>
%if isEditable:
%elif canEdit: %endif
${webutil.stripNone(fcp, 1000, None, 'Nimi:')}
Käytössä
${webutil.stripNone(fcp, 1004, None, 'Sarakeotsikko')} ${webutil.stripNone(fcp, 1005, None, 'Kenttä')} ${webutil.stripNone(fcp, 1006, None, 'Tyyppi')} ${webutil.stripNone(fcp, 1007, None, 'Ref.-lomake')} ${webutil.stripNone(fcp, 1008, None, 'Tasaa/Lajittele')} ${webutil.stripNone(fcp, 1009, None, 'Täyttö')} ${webutil.stripNone(fcp, 1013, None, 'Ikoni')} ${webutil.stripNone(fcp, 1014, None, 'Maks. kirj. lkm')} ${webutil.stripNone(fcp, 1015, None, 'Sar. leveys')} ${webutil.stripNone(fcp, 1002, None, 'Päällä')}
%if isEditable: %else:
%endif