You can subscribe to this list here.
| 2004 |
Jan
|
Feb
(11) |
Mar
(106) |
Apr
(146) |
May
(79) |
Jun
(233) |
Jul
(218) |
Aug
(160) |
Sep
(155) |
Oct
(80) |
Nov
(176) |
Dec
(115) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(77) |
Feb
(106) |
Mar
(10) |
Apr
(54) |
May
(29) |
Jun
(29) |
Jul
(65) |
Aug
(80) |
Sep
|
Oct
(42) |
Nov
(45) |
Dec
(33) |
| 2006 |
Jan
(49) |
Feb
(52) |
Mar
(8) |
Apr
(3) |
May
(108) |
Jun
(43) |
Jul
(13) |
Aug
(1) |
Sep
(58) |
Oct
(66) |
Nov
(70) |
Dec
(115) |
| 2007 |
Jan
(26) |
Feb
(3) |
Mar
(17) |
Apr
(1) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(10) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
| 2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Michael K. <ko...@us...> - 2006-11-24 08:06:29
|
Update of /cvsroot/cobricks/cobricks2/conf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv375/conf Modified Files: log.properties.orig Log Message: Index: log.properties.orig =================================================================== RCS file: /cvsroot/cobricks/cobricks2/conf/log.properties.orig,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- log.properties.orig 9 Jul 2004 08:41:38 -0000 1.3 +++ log.properties.orig 24 Nov 2006 08:05:56 -0000 1.4 @@ -2,6 +2,7 @@ log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%7p (%F:%L) - %m%n +log4j.appender.A1.Encoding=UTF-8 log4j.logger.org.cobricks=DEBUG log4j.logger.org.cobricks.portal.velocity=WARN |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:06:06
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/util/migration In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv375/src/org/cobricks/util/migration Modified Files: CourseMigration.java Log Message: Index: CourseMigration.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/util/migration/CourseMigration.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CourseMigration.java 18 Oct 2006 16:49:22 -0000 1.1 +++ CourseMigration.java 24 Nov 2006 08:06:00 -0000 1.2 @@ -39,6 +39,8 @@ import org.cobricks.course.Course; import org.cobricks.course.CourseManager; import org.cobricks.course.CourseModule; +import org.cobricks.course.CourseModuleProgramRel; +import org.cobricks.course.CourseProgram; import org.cobricks.course.CourseRoom; import org.cobricks.user.User; import org.cobricks.user.UserManager; @@ -151,6 +153,8 @@ tmps = (String)fromMap.get("vauntertitel_en"); if (tmps!=null && tmps.length()>0) attrs.put("cname_en", tmps); + + logger.info("createCourse "+cm.getName()+" - "+tmps); tmps = (String)fromMap.get("lang"); attrs.put("clang", tmps); @@ -281,7 +285,64 @@ } int cid = courseManager.createCourse(attrs, null); - + + // additional course programs? + + List result3 = fromDBAccess. + sqlQuery("SELECT * FROM veranstberzuordnung, " + +"veranstbereiche " + +"WHERE klid = " + fromMap.get("klid") + +" AND veranstberzuordnung.berid = " + +"veranstbereiche.berid"); + Iterator resIter3 = result3.iterator(); + while (resIter3.hasNext()) { + Map m = (Map)resIter3.next(); + String id = (String)m.get("berprogid"); + + // check if course program exists + CourseProgram cp = courseManager.getProgramForLabel(id); + if (cp == null) { + Map attrs2 = new HashMap(); + attrs2.put("cplabel", id); + String tmps3 = (String)m.get("bername"); + if (tmps3 == null) tmps3 = id; + attrs2.put("cpname", tmps3); + tmps3 = (String)m.get("bername_en"); + if (tmps3 == null) tmps3 = id; + attrs2.put("cpname_en", tmps3); + tmps3 = (String)m.get("bercomment"); + if (tmps3 != null) { + attrs2.put("cpcomment", tmps3); + } + int cpid = courseManager.createProgram(attrs2, null); + cp = courseManager.getProgramForLabel(id); + } + + // check if course program is assigned to module + boolean foundit = false; + List cprl = cm.getProgramRel(); + Iterator icprl = cprl.iterator(); + while (icprl.hasNext()) { + CourseModuleProgramRel cmpr = (CourseModuleProgramRel) + icprl.next(); + CourseProgram cp2 = cmpr.getProgram(); + String tmps3 = cp2.getLabel(); + if (tmps3.equals(id)) { + foundit = true; + break; + } + } + if (foundit == false) { + Map attrs2 = new HashMap(); + attrs2.put("cmid", new Integer(cm.getId())); + attrs2.put("cpid", new Integer(cp.getId())); + attrs2.put("cptype", m.get("type")); + attrs2.put("cpstartsem", m.get("startsem")); + attrs2.put("cpendsem", m.get("endsem")); + courseManager.addProgramToModule(attrs2); + } + } + } catch(Exception ex){ logger.error("Failed migrating course", ex); } |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:06:04
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/user In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv375/src/org/cobricks/user Modified Files: AccessPermission.java User.java UserAccessHandler.java UserManagerImpl.java UserPresenter.java UserServlet.java Log Message: Index: UserPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/UserPresenter.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- UserPresenter.java 13 Nov 2006 10:02:14 -0000 1.40 +++ UserPresenter.java 24 Nov 2006 08:05:58 -0000 1.41 @@ -75,6 +75,7 @@ public User getUser(Integer userid) { + if (userid == null) return null; return userManager.getUser(userid.intValue()); } @@ -132,6 +133,39 @@ /** * */ + public String checkPermission(int userid, String domain, + String action, String attrs) + { + logger.info("checkPermission(" + userid + "," + domain + "," + action + + "," + attrs + ")"); + + // now parse the arguments + try { + Map attrsmap = new HashMap(); + StringTokenizer st = new StringTokenizer(attrs, ";"); + while (st.hasMoreTokens()) { + String tmps = st.nextToken(); + int pos = tmps.indexOf("="); + String arg1 = tmps.substring(0, pos); + String arg2 = tmps.substring(pos + 1); + arg1 = arg1.trim(); + arg2 = arg2.trim(); + attrsmap.put(arg1, arg2); + } + return (userManager.checkPermission(userid, domain, action, + attrsmap) ? "true" + : "false"); + } catch (Exception e) { + logger.error(LogUtil.exception("Failed parsing parameters.", e)); + } + + return "false"; + } + + + /** + * + */ public String checkPermission(String userid, String domain, String action, DataObject o) { Index: AccessPermission.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/AccessPermission.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- AccessPermission.java 24 Jan 2006 06:50:40 -0000 1.5 +++ AccessPermission.java 24 Nov 2006 08:05:57 -0000 1.6 @@ -181,7 +181,7 @@ // ... the simplest case is if there are no restricting attributes if (attrs == null) return true; - + Iterator i = attrs.keySet().iterator(); while (i.hasNext()) { String aname = (String)i.next(); @@ -195,6 +195,8 @@ avalue = user.getUserLogin(); // check attribute + if (objattrs == null) + return false; Object o = objattrs.get(aname); if (o != null) { String avalueaccess = (String)o.toString(); @@ -207,4 +209,19 @@ return true; } + + /** + * + */ + public String toString() + { + StringBuffer sb = new StringBuffer(""); + sb.append(domain); + sb.append(","); + sb.append(action); + sb.append(","); + sb.append(attrs.toString()); + return sb.toString(); + } + } Index: UserManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/UserManagerImpl.java,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- UserManagerImpl.java 26 Oct 2006 10:38:25 -0000 1.69 +++ UserManagerImpl.java 24 Nov 2006 08:05:57 -0000 1.70 @@ -132,8 +132,8 @@ 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', - 'Y', 'Z', '!', '"', '§', '$', '%', '&', '/', '(', ')', '=', '?', - ':', '#', ',', '.', '-', '_', ';', '<', '>', '*', '+' }; + 'Y', 'Z', '!', '$', '%', '&', '/', '(', ')', '=', '?', ':', '#', + ',', '.', '-', '_', ';', '<', '>', '*', '+', '+', '.' }; AccessControl accessControl; @@ -238,7 +238,8 @@ * * @return DOCUMENT_ME! */ - public AccessControl getAccessControl() { + public AccessControl getAccessControl() + { return accessControl; } @@ -295,7 +296,8 @@ * DOCUMENT_ME! */ public void setUserAttr(int userid, String aname, Object avalue) - throws Exception { + throws Exception + { User user = getUser(userid); String userclass; @@ -362,7 +364,8 @@ * The name of the attribute. * @return The value of the user attribute. */ - public Object getUserAttr(int userid, String aname) { + public Object getUserAttr(int userid, String aname) + { User user = getUser(userid); if (user == null) return null; @@ -381,7 +384,8 @@ * The id of the requesting user. * @return The value of the user attribute. */ - public Object getUserAttr(int userid, String aname, int requserid) { + public Object getUserAttr(int userid, String aname, int requserid) + { User user = getUser(userid); if (user == null) return null; @@ -411,7 +415,8 @@ * @return The value of the user attribute. */ public Object getUserAttr(int userid, String aname, int requserid, - String destinationid) { + String destinationid) + { User user = getUser(userid); if (user == null) return null; @@ -449,7 +454,8 @@ * The id of the user. * @return A byte array with the data of the image. */ - public byte[] getUserImage(int userid) { + public byte[] getUserImage(int userid) + { logger.info("getUserImage " + userid); User user = getUser(userid); if (user == null) @@ -554,7 +560,8 @@ * @param attrname */ public void deleteListMember(int userid, int objectIdToDelete, - String attrname) { + String attrname) + { AttributeDescriptor attributeDescriptor = null; try { attributeDescriptor = getAttributeDescriptorManager( @@ -605,7 +612,8 @@ * @param attrname - * name of attribute (buddylist, interests, ...) */ - public void addListMember(int userid, int objectidToAdd, String attrname) { + public void addListMember(int userid, int objectidToAdd, String attrname) + { AttributeDescriptor attributeDescriptor = null; // set attribute for user in cache @@ -650,7 +658,8 @@ * * @return DOCUMENT_ME! */ - public int getUserIdForGlobalId(String globalid) { + public int getUserIdForGlobalId(String globalid) + { String sql = "select userid from user_main where globalid = '" + globalid + "'"; Map m = dbAccess.sqlQuerySingleRow(sql); @@ -670,13 +679,13 @@ * * @return DOCUMENT_ME! */ - public int getUserIdForUserLogin(String userlogin) { + public int getUserIdForUserLogin(String userlogin) + { if (userLoginCache == null) { userLoginCache = new HashMap(); } - + if (userlogin.equals("anonymous")) return 0; Integer userid = (Integer) userLoginCache.get(userlogin); - if (userid != null) { return userid.intValue(); } @@ -687,10 +696,8 @@ if ((m != null) && (m.get("userid") != null)) { userid = (Integer) m.get("userid"); - int uid = userid.intValue(); userLoginCache.put(userlogin, userid); - return uid; } @@ -749,7 +756,8 @@ List endResult = new ArrayList(); UserJoin userJoin = new UserJoin(dbAccess); Map conditions = new HashMap(); - + if (userclass == null) userclass = "user"; + AttributeDescriptor attrDesc = null; for (Iterator i = query.entrySet().iterator(); i.hasNext();) { Map.Entry attribute = (Map.Entry) i.next(); @@ -822,159 +830,175 @@ /** * Get a org.cobricks.user.User object for a given userid. */ - public User getUser(Integer userid) { + public User getUser(Integer userid) + { + if (userid == null) + return getUser(0); return getUser(userid.intValue()); } /** * Get a org.cobricks.user.User object for a given userid. */ - public User getUser(int userid) { - User result = getUserObjectFromCache(userid); - if (result != null) { - return result; - } - if (userid < 1) { - return null; - } - result = new User(userid); + public User getUser(int userid) + { try { - // get attributes for user - Map map = dbAccess - .sqlQuerySingleRow("select * from user_main where userid = " - + Integer.toString(userid)); - String tmps = null; - tmps = (String) map.get("userlogin"); - if (tmps != null) { - result.setUserLogin(tmps); - } - tmps = (String) map.get("globalid"); - if (tmps != null) { - result.setGlobalId(tmps); - } - tmps = (String) map.get("firstname"); - if (tmps != null) { - result.setAttributeLocally(User.FIRSTNAME, tmps); - } - tmps = (String) map.get("lastname"); - if (tmps != null) { - result.setAttributeLocally(User.LASTNAME, tmps); - } - tmps = (String) map.get("email"); - if (tmps != null) { - result.setAttributeLocally(User.EMAIL, tmps); - } - tmps = (String) map.get("passwordcrypt"); - if (tmps != null) { - result.setAttributeLocally(User.PASSWORDCRYPT, tmps); - } - tmps = (String) map.get(User.USERCLASS); - if (tmps != null) { - result.setAttributeLocally(User.USERCLASS, tmps); - } - tmps = (String) map.get("url"); - if (tmps != null) { - result.setAttributeLocally(User.URI, tmps); + User result = getUserObjectFromCache(userid); + if (result != null) { + return result; } - Date tmpdate = (Date) map.get("regtime"); - if (tmpdate != null) { - result.setAttributeLocally(User.REGTIME, tmpdate); + if (userid < 1) { + result = new User(0); + result.setUserLogin("anonymous"); + return result; } + result = new User(userid); try { - tmpdate = (Date) map.get("lastlogin"); - } catch (Exception e) { } - if (tmpdate != null) { - result.setAttributeLocally(User.LASTLOGIN, tmpdate); - } - - //loop over all tables excepting user_main - for (int k = 1; k < (userTables.length - 1); k++) { - List userAttrs = new ArrayList(); - userAttrs = dbAccess.sqlQuery("select aname, " - + userTablesValues[k - 1] + " from " + userTables[k] - + " where userid = " + Integer.toString(userid) - + " order by aname"); - - String aname = ""; - String anamePrev = ""; - Object avalue = null; - - boolean isSet = false; - boolean prevIsSet = false; - - //loop over result for one table - for (Iterator i = userAttrs.iterator(); i.hasNext();) { - Map elem = (Map) i.next(); - - aname = (String) elem.get(ANAME); - - AttributeDescriptor attrDescriptor = getAttributeDescriptorManager( - result.getAttribute(User.USERCLASS)) + // get attributes for user + Map map = dbAccess + .sqlQuerySingleRow("select * from user_main where userid = " + + Integer.toString(userid)); + String tmps = null; + tmps = (String) map.get("userlogin"); + if (tmps != null) { + result.setUserLogin(tmps); + } + tmps = (String) map.get("globalid"); + if (tmps != null) { + result.setGlobalId(tmps); + } + tmps = (String) map.get("firstname"); + if (tmps != null) { + result.setAttributeLocally(User.FIRSTNAME, tmps); + } + tmps = (String) map.get("lastname"); + if (tmps != null) { + result.setAttributeLocally(User.LASTNAME, tmps); + } + tmps = (String) map.get("email"); + if (tmps != null) { + result.setAttributeLocally(User.EMAIL, tmps); + } + tmps = (String) map.get("passwordcrypt"); + if (tmps != null) { + result.setAttributeLocally(User.PASSWORDCRYPT, tmps); + } + tmps = (String) map.get(User.USERCLASS); + if (tmps != null) { + result.setAttributeLocally(User.USERCLASS, tmps); + } + tmps = (String) map.get("url"); + if (tmps != null) { + result.setAttributeLocally(User.URI, tmps); + } + Date tmpdate = (Date) map.get("regtime"); + if (tmpdate != null) { + result.setAttributeLocally(User.REGTIME, tmpdate); + } + try { + tmpdate = (Date) map.get("lastlogin"); + } catch (Exception e) { } + if (tmpdate != null) { + result.setAttributeLocally(User.LASTLOGIN, tmpdate); + } + + //loop over all tables excepting user_main + for (int k = 1; k < (userTables.length - 1); k++) { + List userAttrs = new ArrayList(); + userAttrs = dbAccess.sqlQuery("select aname, " + + userTablesValues[k - 1] + " from " + userTables[k] + + " where userid = " + Integer.toString(userid) + + " order by aname"); + + String aname = ""; + String anamePrev = ""; + Object avalue = null; + + boolean isSet = false; + boolean prevIsSet = false; + + //loop over result for one table + for (Iterator i = userAttrs.iterator(); i.hasNext();) { + Map elem = (Map) i.next(); + + aname = (String) elem.get(ANAME); + + AttributeDescriptor attrDescriptor = + getAttributeDescriptorManager( + result.getAttribute(User.USERCLASS)) .getAttributeDescriptorFor(aname); - AttributeDescriptor prevAttrDesc = getAttributeDescriptorManager( - result.getAttribute(User.USERCLASS)) + AttributeDescriptor prevAttrDesc = + getAttributeDescriptorManager( + result.getAttribute(User.USERCLASS)) .getAttributeDescriptorFor(anamePrev); - isSet = attrDescriptor.getOntologyDataType().isSet(); - prevIsSet = prevAttrDesc.getOntologyDataType().isSet(); - - if (avalue instanceof Set) { - if ((!(aname.equalsIgnoreCase(anamePrev)) - && (!anamePrev.equalsIgnoreCase("")) && prevIsSet) + isSet = attrDescriptor.getOntologyDataType().isSet(); + prevIsSet = prevAttrDesc.getOntologyDataType().isSet(); + + if (avalue instanceof Set) { + if ((!(aname.equalsIgnoreCase(anamePrev)) + && (!anamePrev.equalsIgnoreCase("")) + && prevIsSet) || (!i.hasNext() - && (!anamePrev.equalsIgnoreCase("")) - && prevIsSet && (aname + && (!anamePrev.equalsIgnoreCase("")) + && prevIsSet + && (aname .equalsIgnoreCase(anamePrev)))) { - result.setAttributeLocally(anamePrev, avalue); + result.setAttributeLocally(anamePrev, avalue); + } } - } - if (!aname.equalsIgnoreCase(anamePrev)) { - avalue = null; - } - - anamePrev = aname; - - /* - * if ((avalue != null) && - * (attrDescriptor.getOntologyDataType() .isSet())) - */ - if (isSet) { - if (avalue != null) { - ((Set) avalue).add(elem - .get(userTablesValues[k - 1])); - } else { - //Set avalueSet = new HashSet(); - avalue = new HashSet(); - ((Set) avalue).add(elem - .get(userTablesValues[k - 1])); + if (!aname.equalsIgnoreCase(anamePrev)) { + avalue = null; + } - if (!i.hasNext()) { - result.setAttributeLocally(aname, avalue); + anamePrev = aname; + + /* + * if ((avalue != null) && + * (attrDescriptor.getOntologyDataType() .isSet())) + */ + if (isSet) { + if (avalue != null) { + ((Set) avalue). + add(elem.get(userTablesValues[k - 1])); + } else { + //Set avalueSet = new HashSet(); + avalue = new HashSet(); + ((Set) avalue). + add(elem.get(userTablesValues[k - 1])); + + if (!i.hasNext()) { + result.setAttributeLocally(aname, avalue); + } } + } else { + avalue = elem.get(userTablesValues[k - 1]); + result.setAttributeLocally(aname, avalue); } - } else { - avalue = elem.get(userTablesValues[k - 1]); - result.setAttributeLocally(aname, avalue); } } + + setUserObjectInCache(result); + } catch (Exception e) { + logger.error(LogUtil.ex("Failed loading" + + " attributes for user " + + userid, e)); + return null; } - setUserObjectInCache(result); - } catch (Exception e) { - logger.error(LogUtil.exception("Failed loading" - + " attributes for user " + userid, e)); - - return null; - } - - String userlogin = result.getUserLogin(); - UserHandler userHandler = getUserHandler(userlogin); + String userlogin = result.getUserLogin(); + UserHandler userHandler = getUserHandler(userlogin); + if (userHandler != null) { + userHandler.handleGetUser(result); + } - if (userHandler != null) { - userHandler.handleGetUser(result); + return result; + + } catch (Exception e) { + logger.error(LogUtil.ex("Failed in getUser " + + userid, e)); } - - return result; + return null; } /** @@ -1239,7 +1263,6 @@ int lengthOfPassword = randomGenerator.nextInt(3) + 6; int tmp; StringBuffer sb = new StringBuffer(""); - for (int i = 0; i <= lengthOfPassword; i++) { tmp = randomGenerator.nextInt(intToChar.length); sb.append(intToChar[tmp]); @@ -1258,7 +1281,9 @@ * @throws Exception * (DB Exceptions) */ - public void deleteUser(int userid) throws Exception { + public void deleteUser(int userid) + throws Exception + { User user = getUser(userid); Map conditions = new HashMap(); @@ -1308,7 +1333,8 @@ */ public void init(String componentId, String managerId, Properties properties, CoreManager coreManager, DBAccess dbAccess) - throws Exception { + throws Exception + { super.init(componentId, managerId, properties, coreManager, dbAccess); // load the user ontology @@ -1468,12 +1494,13 @@ { logger.info("searchUsers(" + attrs.toString() + "," + sortby + "," + orFlag + "," + numberOfResults + "," + userclass + ")"); + if (userclass!=null && userclass.length()<1) userclass = null; List result = new ArrayList(); List idResult = new ArrayList(); try { idResult = getUserIdList(attrs, orFlag, sortby, numberOfResults, - userclass); + userclass); } catch (Exception e) { logger.error(LogUtil.ex("Exception in searchUsers()", e)); } @@ -1674,7 +1701,8 @@ * help function for updating of user attributes of type Set */ private void updateSetAttribute(int userid, String attrname, - Object attrvalue) { + Object attrvalue) + { User currentUser = getUser(userid); String userclass = currentUser.getAttributeAsString(attrname); AttributeDescriptor attrDesc = null; @@ -1974,9 +2002,9 @@ /** * */ - public boolean checkCredentials(User user, Object credentials) { + public boolean checkCredentials(User user, Object credentials) + { UserHandler userHandler = getUserHandler(user.getUserLogin()); - if (userHandler == null) { return user.checkCredentials(credentials); } else { @@ -1987,7 +2015,8 @@ /** * */ - public void resetCache() { + public void resetCache() + { userObjects = new HashMap(); userLoginCache = new HashMap(); userHandlerClassCache = new HashMap(); @@ -1999,7 +2028,8 @@ /** * */ - public UserHandler getUserHandler(String userlogin) { + public UserHandler getUserHandler(String userlogin) + { if (userlogin == null) { return null; } @@ -2019,16 +2049,15 @@ if (userHandlerClassCache == null) { userHandlerClassCache = new HashMap(); } - UserHandler userHandler = (UserHandler) userHandlerClassCache - .get(domain); - + UserHandler userHandler = (UserHandler) + userHandlerClassCache.get(domain); if (userHandler != null) { return userHandler; } // instantiate class - String handlerClassName = getProperty("user.domain." + domain - + ".class"); + String handlerClassName = + getProperty("user.domain." + domain + ".class"); if (handlerClassName == null) { // check default handler if (getProperty("user.domain.default.class") == null) @@ -2051,6 +2080,8 @@ userHandler = null; } + userHandlerClassCache.put(domain, userHandler); + return userHandler; } Index: UserServlet.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/UserServlet.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- UserServlet.java 5 Oct 2006 17:57:50 -0000 1.44 +++ UserServlet.java 24 Nov 2006 08:06:00 -0000 1.45 @@ -276,8 +276,7 @@ // the length of email must be between 6 and 30 characters if ((avalue.length() < FormConstants.EMAIL_MIN_LENGTH) || (avalue.length() > FormConstants.EMAIL_MAX_LENGTH)) { - prequest.setReturnCode(2003); - return "error"; + missingAttrs.append(aname); } // is the e-mail address correct? else { @@ -285,8 +284,7 @@ Matcher m = p.matcher(avalue); // making the error string available to jsp: if (!m.find()) { - prequest.setReturnCode(2003); - return "error"; + missingAttrs.append(aname); } } } Index: User.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/User.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- User.java 13 Nov 2006 10:02:14 -0000 1.32 +++ User.java 24 Nov 2006 08:05:57 -0000 1.33 @@ -237,15 +237,15 @@ String tmps1 = getAttributeAsString(User.FIRSTNAME); String tmps2 = getAttributeAsString(User.LASTNAME); - if ((tmps1 == null) && (tmps2 == null)) { + if (((tmps1 == null) || (tmps1.length()<1)) && + ((tmps2 == null) || (tmps2.length()<1))) { return getUserLogin(); } - - if (tmps1 == null) { + if ((tmps1 == null) || (tmps1.length()<1)) { return tmps2; } - if (tmps2 == null) { + if ((tmps2 == null) || (tmps2.length()<1)) { return tmps1; } Index: UserAccessHandler.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/UserAccessHandler.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- UserAccessHandler.java 20 Dec 2005 18:10:24 -0000 1.4 +++ UserAccessHandler.java 24 Nov 2006 08:05:57 -0000 1.5 @@ -105,13 +105,16 @@ return (List)actionAttrs.get(action); } - public boolean checkPermission(int userid, String domain, String action, - Map attrs) + public boolean checkPermission(int userid, String domain, + String action, Map attrs) { // currently we get all permissions and do a Java based comparison - // we might construct a matching select here to let the database do // some optimization ... TBD + if (attrs == null) + attrs = new HashMap(); + // get permissions of user AccessControl ac = userManager.getAccessControl(); List permissions = ac.getAccessPermissionsByUser(userid); |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:06:04
|
Update of /cvsroot/cobricks/cobricks2/web/WEB-INF In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv375/web/WEB-INF Modified Files: web.xml Log Message: Index: web.xml =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/WEB-INF/web.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- web.xml 30 May 2006 14:48:06 -0000 1.14 +++ web.xml 24 Nov 2006 08:06:00 -0000 1.15 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" @@ -285,31 +285,7 @@ </filter> <filter-mapping> <filter-name>multipartFilter</filter-name> - <url-pattern>/PORTAL</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>multipartFilter</filter-name> - <url-pattern>/USER</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>multipartFilter</filter-name> - <url-pattern>/ITEM</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>multipartFilter</filter-name> - <url-pattern>/CATEGORY</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>multipartFilter</filter-name> - <url-pattern>/CONTEXT</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>multipartFilter</filter-name> - <url-pattern>/MESSAGE</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>multipartFilter</filter-name> - <url-pattern>/COURSE</url-pattern> + <url-pattern>/*</url-pattern> </filter-mapping> |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:06:04
|
Update of /cvsroot/cobricks/cobricks2/web/user In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv375/web/user Added Files: card.html.de Log Message: --- NEW FILE: card.html.de --- $portalPresenter.parse("$contextPath/pageheader.html",$portalRequest) #if ( "$!userLogin" == "anonymous" ) <p class="standard">Sie müssen (registriert und) angemeldet sein um die Daten von anderen Benutzern einzusehen. Bitte <a href="/user/login.html">melden Sie sich an</a>.</p> <br> #else #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #if ($auserid == 0) <p><div class="error">Ein Benutzer mit Loginnamen "<b>$auserlogin</b>" existiert nicht.</div></p> #else #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass()) #set ($imageuri = $auser.getAttribute("basic.personal.imageuri")) #if ("$!imageuri"!="") <img width="100" align="right" src="$imageuri"> #end <h2>$auser.getName()</h2> <p>Loginname: $auserlogin</p> #if ("$auserclass"!="user") <p>Userclass: $!auserclass</p> #end <p>E-Mail (privat): $!auser.getAttribute("basic.contact-priv.online.email")</p> <p>Homepage (privat): $!auser.getAttribute("basic.contact-priv.online.uri")</p> <p>Status: $!auser.getAttribute("basic.university.status")</p> <p>Studiengang: $!auser.getAttribute("basic.university.subject")</p> <p>(vorauss.) Abschlussjahr: $!auser.getAttribute("basic.university.graduation")</p> <br clear="all"/> <p> <hr> #set ( $loggedinusername = $userLogin ) #set ( $loggedinid = $userManager.getUserIdForUserLogin($userLogin) ) #set ($result = $userPresenter.getUserPath($loggedinid, $auserid)) #set ($resultsize = $result.size()) #set ($maxindex = $resultsize - 1) #if ($resultsize > 0) <h3>Pfad zu diesem Benutzer</h3> <table border=0 style="table-layout:fixed;"> <tr> #set ($index = 0) #foreach ($i in $result) <td height=32 valign=bottom align=center style="border:1px solid #DFDFDF;"> #set ($imageuri = "") #set ($imageuri = $i.getAttribute("basic.personal.imageuri")) #if ($imageuri == "") #set ($imageuri = "/images/nouser.png") #end #set ($userLogin = $i.getUserLogin()) <a href="card.html?auserlogin=$userLogin"><img src="$imageuri" width=32 height=32></a> <br> <a href="card.html?auserlogin=$userLogin">$userLogin</a> </td> #if($index != $maxindex) <td valign=middle rowspan=2 align=center> <img src="/images/arrow.png"> </td> #end #set ($index = $index + 1) #end </tr> </table> <br> (<a href="/user/user-allpaths?usera=$loggedinusername&userb=$auserlogin">alle Pfade anzeigen</a>) #end <hr> <h3>All public attributes</h3> #set ($attrNames = []) #set ($attrValues = []) <table border="0"> <tr bgcolor="#dfdfdf"> <td> <b>Attribute Name</b> </td> <td> <b>Attribute Value</b> </td> </tr> $userPresenter.getUserAttributes($auserid, $attrNames, $attrValues, false, $lang) #set ($count = 0) #foreach ($i in $attrNames) <tr bgcolor="#dfdfdf"> <td>$i</td> <td>$attrValues.get($count)</td> </tr> #set ($count = $count + 1) #end </table> <br> #end #set ($foafuri = $auser.getAttribute("basic.personal.foafuri")) #if ("$!foafuri"!="") <a href="$foafuri"><img border="0" src="/images/foaf.gif" /></a> #else <a href="card-foaf.xml?auserid=$auserid"> <img border="0" src="/images/foaf.gif" /></a> #end <b>Ãffentliche Ankündigungen, die dieser Benutzer in den letzten sechs Monaten publiziert hat:</b> <p> TBD #end $portalPresenter.parse("$contextPath/pagefooter.html",$portalRequest) |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:06:04
|
Update of /cvsroot/cobricks/cobricks2/tomcat/5.5/conf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv375/tomcat/5.5/conf Modified Files: catalina.policy server.xml Log Message: Index: server.xml =================================================================== RCS file: /cvsroot/cobricks/cobricks2/tomcat/5.5/conf/server.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- server.xml 31 May 2006 06:04:18 -0000 1.2 +++ server.xml 24 Nov 2006 08:06:00 -0000 1.3 @@ -11,7 +11,7 @@ <Service name="Catalina" debug="0"> <Connector port="@@@HTTPPORT@@@" maxHttpHeaderSize="8192" - URIEncoding="UTF-8" + URIencoding="UTF-8" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="@@@HTTPSPORT@@@" acceptCount="100" @@ -22,7 +22,7 @@ <!-- Define a SSL HTTP/1.1 Connector on port 8443 --> <!-- <Connector port="@@@HTTPSPORT@@@" maxHttpHeaderSize="8192" - URIEncoding="UTF-8" + URIencoding="UTF-8" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:02:23
|
Update of /cvsroot/cobricks/drehscheibe-in/web/course In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31656 Modified Files: c.html.de c.html.en ccreate.html.de ccreatepreselect.html.de cm.html.de cm.html.en cmall.xml cmcreate.html.de cmsearch.html.de cmupdate.html.de csearch.html.de cupdate.html.de timetable.html.de Removed Files: timetablem.html.de timetablew.html.de Log Message: Index: ccreate.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/ccreate.html.de,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ccreate.html.de 16 Nov 2006 13:59:29 -0000 1.6 +++ ccreate.html.de 24 Nov 2006 08:02:19 -0000 1.7 @@ -59,12 +59,12 @@ <tr> <td valign="top">Untertitel</td> <td><input name="cname" size="50" value="$!cname"><br> -<font size="-1">Der Untertitel ergänzt den Modulnamen "$!courseModule.getName()".</font> +<font size="-1">Der Untertitel ergänzt den Modulnamen "$!cm.getName()".</font> </td> </tr> <tr> - <td>Name (englisch)</td> - <td><input name="cname_en" size="50" value="$!cm.getName('en')"></td> + <td>Untertitel (englisch)</td> + <td><input name="cname_en" size="50" value="$!cname_en"></td> </tr> <tr> <td valign="top">Studiengänge</td> @@ -111,9 +111,17 @@ <td>Teilnehmerzahl</td> <td><input name="ccapacity" size="5" value="$!cm.getCapacity()"></td> </tr> +#set ($cmects = $cm.getEctsCredits()) <tr> <td>ECTS Credits</td> - <td>$!cm.getEctsCredits()<input name="cectscredits" type="hidden" value="$!cm.getEctsCredits()"></td> +#if ("$!cmects"=="") +#if ("$!cectscredits"=="") +#set ($cectscredits = "0") +#end + <td><input name="cectscredits" size="5" value="$!cectscredits"></td> +#else + <td>$!cmects<input name="cectscredits" type="hidden" value="$!cmects"></td> +#end </tr> <tr> @@ -146,45 +154,6 @@ <input name="chours_lab" type="hidden" value="$!cm.getHoursLab()"> #end </tr> -<tr><td colspan="2"><b>Die nachfolgenden Informationen sind aus dem Eintrag -des zugehörigen Moduls übernommen und können nicht geändert werden.</b> -</td></tr> -<tr> - <td>Lernziele</td> - <td><textarea name="ctarget" rows="3" cols="70" readonly="readonly">$!cm.getTarget()</textarea></td> -</tr> -<tr> - <td>Lernziele (englisch)</td> - <td><textarea name="ctarget_en" rows="3" cols="70" readonly="readonly">$!cm.getTarget('en')</textarea></td> -</tr> -<tr> - <td>Inhalt</td> - <td><textarea name="ccontent" rows="3" cols="70" readonly="readonly">$!cm.getContent()</textarea></td> -</tr> -<tr> - <td>Inhalt (englisch)</td> - <td><textarea name="ccontent_en" rows="3" cols="70" readonly="readonly">$!cm.getContent('en')</textarea></td> -</tr> -<tr> - <td>Vorkenntnisse</td> - <td><textarea name="cprerequ" rows="3" cols="70" readonly="readonly">$!cm.getPrerequ()</textarea></td> -</tr> -<tr> - <td>Vorkenntnisse (englisch)</td> - <td><textarea name="cprerequ_en" rows="3" cols="70" readonly="readonly">$!cm.getPrerequ('en')</textarea></td> -</tr> -<tr> - <td>Prüfungsart</td> - <td><textarea name="ccert" rows="3" cols="70" readonly="readonly">$!cm.getCert()</textarea></td> -</tr> -<tr> - <td>Didaktik</td> - <td><textarea name="cdidactics" rows="3" cols="70" readonly="readonly">$!cm.getDidactics()</textarea></td> -</tr> -<tr> - <td>Didaktik (englisch)</td> - <td><textarea name="cdidactics_en" rows="3" cols="70" readonly="readonly">$!cm.getDidactics('en')</textarea></td> -</tr> </table> <h3>Veranstaltungstermine:</h3> <table border="0"> @@ -199,6 +168,7 @@ <td>Turnus</td> <td>Typ</td> </tr> +#set ( $crooms = $coursePresenter.searchCourseRooms("") ) #foreach( $i in [1..4] ) <tr> <td> @@ -214,7 +184,7 @@ <td> <select name="droom$i"> <option value="">----</option> - #foreach ( $cr in $coursePresenter.searchCourseRooms("") ) + #foreach ( $cr in $crooms ) <option value="$!cr.getId()">$!cr.getName()</option> #end </select> @@ -241,6 +211,49 @@ <p> <input type="hidden" name="cdatescnt" value="4"/> <input type="submit" class="submit" value="Veranstaltung anlegen"/> +<p> +<table border="0"> +<tr><td colspan="2"><b><em>Achtung: Die nachfolgenden Informationen sind +aus dem Eintrag des zugehörigen Moduls übernommen und können nicht geändert +werden.</em></b> +</td></tr> +<tr> + <td>Lernziele</td> + <td><textarea name="ctarget" rows="3" cols="70" readonly="readonly">$!cm.getTarget()</textarea></td> +</tr> +<tr> + <td>Lernziele (englisch)</td> + <td><textarea name="ctarget_en" rows="3" cols="70" readonly="readonly">$!cm.getTarget('en')</textarea></td> +</tr> +<tr> + <td>Inhalt</td> + <td><textarea name="ccontent" rows="3" cols="70" readonly="readonly">$!cm.getContent()</textarea></td> +</tr> +<tr> + <td>Inhalt (englisch)</td> + <td><textarea name="ccontent_en" rows="3" cols="70" readonly="readonly">$!cm.getContent('en')</textarea></td> +</tr> +<tr> + <td>Vorkenntnisse</td> + <td><textarea name="cprerequ" rows="3" cols="70" readonly="readonly">$!cm.getPrerequ()</textarea></td> +</tr> +<tr> + <td>Vorkenntnisse (englisch)</td> + <td><textarea name="cprerequ_en" rows="3" cols="70" readonly="readonly">$!cm.getPrerequ('en')</textarea></td> +</tr> +<tr> + <td>Prüfungsart</td> + <td><textarea name="ccert" rows="3" cols="70" readonly="readonly">$!cm.getCert()</textarea></td> +</tr> +<tr> + <td>Didaktik</td> + <td><textarea name="cdidactics" rows="3" cols="70" readonly="readonly">$!cm.getDidactics()</textarea></td> +</tr> +<tr> + <td>Didaktik (englisch)</td> + <td><textarea name="cdidactics_en" rows="3" cols="70" readonly="readonly">$!cm.getDidactics('en')</textarea></td> +</tr> +</table> </form> #end Index: cm.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cm.html.de,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cm.html.de 16 Nov 2006 13:59:29 -0000 1.5 +++ cm.html.de 24 Nov 2006 08:02:19 -0000 1.6 @@ -25,10 +25,14 @@ <td>$!cm.getName("en")</td> </tr> <tr> -<td>Kurztitel</td> +<td>Kurzname</td> <td>$!cm.getShortName()</td> </tr> <tr> +<td>Kurzname2</td> +<td>$!cm.getShortName2()</td> +</tr> +<tr> <td>Typ</td> <td>$cm.getType() </td> @@ -97,7 +101,7 @@ </tr> <tr> <td valign="top">Vorkenntnisse</td> -<td>$coursePresenter.printPrerequ($cm)</td> +<td>$coursePresenter.printPrerequ($cm,"de")</td> </tr> <!-- <tr> @@ -123,12 +127,6 @@ </td> </tr> #end -#if ( "$!acc" == "true" ) -<tr> -<td valign="top">zusätzliche Attribute</td> -<td>$!cm.getAttribute("cmaddxml")</td> -</tr> -#end </table> #if ( "$!acc" == "true" ) <p align="right"> --- timetablew.html.de DELETED --- Index: c.html.en =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/c.html.en,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- c.html.en 16 Nov 2006 13:59:29 -0000 1.1 +++ c.html.en 24 Nov 2006 08:02:19 -0000 1.2 @@ -103,7 +103,7 @@ #if ("$!tmps"!="") <tr> <td valign="top">Prerequisites</td> - <td>$coursePresenter.printPrerequ("$tmps")</td> + <td>$coursePresenter.printPrerequ("$tmps","en")</td> </tr> #end <!-- @@ -209,7 +209,7 @@ <p> #if ($!userLogin != "anonymous") -<form action="$!contextPath/COURSE" method="post"> +<form action="$!contextPath/COURSE"> <input type="hidden" name="cmd" value="addcoursett"/> <input type="hidden" name="cid" value="$cid"/> <input type="hidden" name="uid" value="$auserid"/> Index: timetable.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/timetable.html.de,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- timetable.html.de 6 Nov 2006 09:13:44 -0000 1.3 +++ timetable.html.de 24 Nov 2006 08:02:19 -0000 1.4 @@ -17,7 +17,7 @@ #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #if ( "$!auserid" == "0") -$portalPresenter.parse("$!contextPath/pagelogin.html.de",$portalRequest) +$portalPresenter.parse("/pagelogin.html.de",$portalRequest) #else #if ( "$!term" == "" ) @@ -25,11 +25,12 @@ #end <form action="$!contextPath/course/timetable.html" method="post"> +<input type="hidden" name="caltype" value="$!caltype"/> <p>Stundenplan für Semester - <select name="term" size="1"> - $!coursePresenter.getTerms("$!term") - </select> - <input type="submit" class="submit" value="Semester wechseln" /> +<select name="term" size="1"> +$!coursePresenter.getTerms("$!term") +</select> +<input type="submit" class="submit" value="Semester wechseln" /> </p> </form> @@ -42,7 +43,7 @@ #else #foreach( $cttid in $tt.keySet() ) <li> - <a href="c.html?cid=$tt.get($cttid).getId() ">$tt.get($cttid).getFullName() </a> - <a href="$!contextPath/COURSE?cmd=removecoursett&cttid=$cttid&cmd.success=/course/timetable.html&cmd.error=/course/timetable.html"><i>entfernen</i></a> + <a href="$!contextPath/course/c.html?cid=$tt.get($cttid).getId() ">$tt.get($cttid).getFullName() </a> - <a href="$!contextPath/COURSE?cmd=removecoursett&cttid=$cttid&cmd.success=$!contextPath/course/timetable.html&cmd.error=$!contextPath/course/timetable.html&caltype=$!caltype"><i>entfernen</i></a> </li> #end #end @@ -50,10 +51,28 @@ #end +#if ("$!caltype"=="") +#set ($caltype = "day") +#end +#if ("$!caltype"=="day") <h3>Tagesansicht</h3> - <p> -$calendarPresenter.printDayCalendarAsHtml($!datestring, $!catids, "de", "timetable.html", "timetablew.html", "timetablem.html","$!auserid") +$calendarPresenter.printDayCalendarAsHtml($!datestring, $!catids, "de", "timetable.html", "$!auserid") </p> +#end +#if ("$!caltype"=="week") +<h3>Wochenansicht</h3> +<p> +$calendarPresenter.printWeekCalendarAsHtml($!datestring, $!catids, "de","timetable.html", "$!auserid") +</p> +#end +#if ("$!caltype"=="month") +<h3>Monatsansicht</h3> +<p> +$calendarPresenter.printMonthCalendarAsHtml($!datestring, $!catids, "de","timetable.html","$!auserid") +</p> + +#end + $portalPresenter.parse("/pagefooter.html",$portalRequest) Index: cmcreate.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cmcreate.html.de,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cmcreate.html.de 6 Nov 2006 09:13:44 -0000 1.5 +++ cmcreate.html.de 24 Nov 2006 08:02:19 -0000 1.6 @@ -69,10 +69,14 @@ <td><input name="cmname_en" size="70" value="$!cmname_en"></td> </tr> <tr> -<td>Kurzname</td> +<td>Kurzname (bis 10 Zeichen)</td> <td><input name="cmshortname" size="30" value="$!cmshortname"></td> </tr> <tr> +<td>Kurzname2 (bis 25 Zeichen)</td> +<td><input name="cmshortname2" size="30" value="$!cmshortname2"></td> +</tr> +<tr> <td>Typ</td> <td> $portalPresenter.printSelect("cmtype","Vorlesung,Praktikum,Seminar","Vorlesung,Praktikum,Seminar","$!cmtype") --- timetablem.html.de DELETED --- Index: cmsearch.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cmsearch.html.de,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cmsearch.html.de 6 Nov 2006 09:13:44 -0000 1.3 +++ cmsearch.html.de 24 Nov 2006 08:02:19 -0000 1.4 @@ -11,12 +11,12 @@ #set ( $acc = $userPresenter.checkPermission("$auserid", "course", "create", "") ) #end -#set ($tmps = "$!cmname$!cmname_en$!cmcontent$!cmcontent_e$!cmshortname$!cmtype$!cmhidden$!cpid" ) +#set ($tmps = "$!cmname$!cmname_en$!cmcontent$!cmcontent_e$!cmshortname$!cmshortname2$!cmsid$!cmtype$!cmhidden$!cpid" ) #if ("$!tmps" == "") #set ($query = "cmid=0") #else #set ($query = "cmname=$!{cmname}&cmname_en=$!{cmname_en}&cmcontent=$!{cmcontent}&cmcontent_en=$!{cmcontent_en}&") -#set ($query = "${query}cmshortname=$!{cmshortname}&cmtype=$!{cmtype}&cmhidden=$!{cmhidden}&cpid=$!{cpid}&") +#set ($query = "${query}cmshortname=$!{cmshortname}&cmshortname2=$!{cmshortname2}&cmsid=$!{cmsid}&cmtype=$!{cmtype}&cmhidden=$!{cmhidden}&cpid=$!{cpid}&") #end <h1>Modulsuche</h1> @@ -72,6 +72,14 @@ <td><input name="cmshortname" size="30" value="$!cmshortname"></td> </tr> <tr> +<td>Kurzname2</td> +<td><input name="cmshortname2" size="30" value="$!cmshortname2"></td> +</tr> +<tr> +<td>Modul-ID</td> +<td><input name="cmsid" size="10" value="$!cmsid"></td> +</tr> +<tr> <td>Typ</td> <td> $portalPresenter.printSelect("cmtype","alle,Vorlesung,Praktikum,Seminar"," ,Vorlesung,Praktikum,Seminar","$cmtype") @@ -119,6 +127,11 @@ <tr> <td colspan="2"><br /><input type="submit" class="submit" value="Suche Module"/></td> </tr> +#if ( "$!acc" == "true" ) +<tr> + <td colspan="2"><br /><a href="cmcreate.html">Neues Modul anlegen</a></td> +</tr> +#end </form> </table> Index: cmupdate.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cmupdate.html.de,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cmupdate.html.de 6 Nov 2006 09:13:44 -0000 1.5 +++ cmupdate.html.de 24 Nov 2006 08:02:19 -0000 1.6 @@ -91,10 +91,14 @@ <td><input name="cmname_en" size="70" value="$!cm.getName('en')"></td> </tr> <tr> -<td>Kurzname</td> +<td>Kurzname (bis 10 Zeichen)</td> <td><input name="cmshortname" size="30" value="$!cm.getShortName()"></td> </tr> <tr> +<td>Kurzname2 (bis 25 Zeichen)</td> +<td><input name="cmshortname2" size="30" value="$!cm.getShortName2()"></td> +</tr> +<tr> <td>Typ</td> <td>$portalPresenter.printSelect("cmtype","Vorlesung,Praktikum,Seminar","Vorlesung,Praktikum,Seminar","$!cm.getType()") </td> @@ -126,6 +130,7 @@ <tr><td>Name</td><td>$!cm.getName()</td></tr> <tr><td>Name (en)</td><td>$!cm.getName('en')</td></tr> <tr><td>Kurzname</td><td>$!cm.getShortName()</td></tr> +<tr><td>Kurzname2</td><td>$!cm.getShortName2()</td></tr> <tr><td>Typ</td><td>$!cm.getType()</td></tr> <tr><td>ECTS Credits</td><td>$!cmectscredits</td></tr> <tr><td>Semesterwochenstunden</td> Index: cmall.xml =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cmall.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cmall.xml 29 May 2006 07:13:31 -0000 1.1 +++ cmall.xml 24 Nov 2006 08:02:19 -0000 1.2 @@ -4,8 +4,9 @@ #foreach ( $cm in $results ) <Modul id="$cm.getSId()"> <KurzBez>$!cm.getShortName()</KurzBez> - <Titel>$!cm.getName("de")</Titel> - <Title>$!cm.getName("en")</Title> + <Titel>$portalPresenter.escapeXML($!cm.getName("de"))</Titel> + <Title>$portalPresenter.escapeXML($!cm.getName("en"))</Title> + <KurzTitel>$!cm.getShortName2()</KurzTitel> #if ("$cm.getHoursLecture()"!="0") <SWS art="Vorlesung">$cm.getHoursLecture()</SWS> #end @@ -21,7 +22,7 @@ <Credits>$!cm.getEctsCredits()</Credits> <Turnus>$!cm.getCycle()</Turnus> #foreach ( $pr in $cm.getProgramRel() ) - <RelevanterStudiengang idref="$pr.getProgram().getLabel()" pkz="$pr.getType()" fachsemester="$pr.getStartSem()" kommentar="$pr.getComment()" /> + <RelevanterStudiengang idref="$pr.getProgram().getLabel()" pkz="$pr.getType().toUpperCase()" vonsemester="$pr.getStartSem()" bissemester="$pr.getEndSem()" kommentar="$pr.getComment()" comment="$pr.getCommentEn()" /> #end <Kapazitaet>$!cm.getCapacity()</Kapazitaet> <ModulVerantwortlicher>$!cm.getResponsible() Index: cm.html.en =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cm.html.en,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cm.html.en 16 Nov 2006 13:59:29 -0000 1.5 +++ cm.html.en 24 Nov 2006 08:02:19 -0000 1.6 @@ -80,7 +80,7 @@ </td><td> $cmpr.getType() </td><td> -$!cmpr.getComment() +$!cmpr.getCommentEn() </td> </tr> #end @@ -101,7 +101,7 @@ </tr> <tr> <td valign="top">Prerequisites</td> -<td>$coursePresenter.printPrerequ($cm)</td> +<td>$coursePresenter.printPrerequ($cm,"en")</td> </tr> <!-- <tr> @@ -127,12 +127,6 @@ </td> </tr> #end -#if ( "$!acc" == "true" ) -<tr> -<td valign="top">additional attributes</td> -<td>$!cm.getAttribute("cmaddxml")</td> -</tr> -#end </table> #if ( "$!acc" == "true" ) <p align="right"> Index: ccreatepreselect.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/ccreatepreselect.html.de,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ccreatepreselect.html.de 6 Nov 2006 09:13:44 -0000 1.4 +++ ccreatepreselect.html.de 24 Nov 2006 08:02:19 -0000 1.5 @@ -29,7 +29,7 @@ <p> <form action="ccreatepreselect.html" method="post"> - <input name="cmname" size="50"> + <input name="cmname" size="50" value="$!cmname"> <input type="submit" class="submit" value="Module suchen"/> </form> </p> Index: csearch.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/csearch.html.de,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- csearch.html.de 18 Oct 2006 16:51:06 -0000 1.4 +++ csearch.html.de 24 Nov 2006 08:02:19 -0000 1.5 @@ -1,5 +1,5 @@ -$portalPresenter.parse("$!contextPath/pageheader.html",$portalRequest) +$portalPresenter.parse("/pageheader.html",$portalRequest) #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) @@ -61,7 +61,7 @@ <p> <table border="0"> -<form action="csearch.html" method="get"> +<form action="csearch.html" method="post"> <tr> <td>Name</td> <td><input name="cname" size="50" value="$!cname"></td> @@ -109,12 +109,11 @@ <td>Dozent</td> <td><input name="lecturername" size="25" value="$!lecturername"></td> </tr> -<!-- <tr> <td>Raum</td> <td> <select name="crid"> - <option value="">all</option> + <option value="">alle</option> #foreach ( $cr in $coursePresenter.searchCourseRooms("") ) #set ($sel = "") #if ("$cr.getId()" == "$!crid") @@ -125,7 +124,6 @@ </select> </td> </tr> ---> <tr> <td>Wochentag</td> <td> @@ -182,7 +180,12 @@ <tr> <td colspan="2"><br /><input type="submit" class="submit" value="Suche Veranstaltungen"/></td> </tr> +#if ( "$!acc" == "true" ) +<tr> +<td colspan="2"><br /><a href="ccreatepreselect.html">Veranstaltung anlegen</a></td> +</tr> +#end </form> </table> -$portalPresenter.parse("$!contextPath/pagefooter.html",$portalRequest) +$portalPresenter.parse("/pagefooter.html",$portalRequest) Index: c.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/c.html.de,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- c.html.de 16 Nov 2006 13:59:29 -0000 1.5 +++ c.html.de 24 Nov 2006 08:02:18 -0000 1.6 @@ -11,7 +11,7 @@ <tr> <td>Modul</td> <td> - <a href="cm.html?id=$cm.getSId()">$cm.getName()</a> + <a href="cm.html?id=$cm.getSId()">$cm.getName(true)</a> </td> </tr> <tr> @@ -103,7 +103,7 @@ #if ("$!tmps"!="") <tr> <td valign="top">Voraussetzungen</td> - <td>$coursePresenter.printPrerequ("$tmps")</td> + <td>$coursePresenter.printPrerequ("$tmps","de")</td> </tr> #end <!-- Index: cupdate.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cupdate.html.de,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- cupdate.html.de 16 Nov 2006 13:59:29 -0000 1.7 +++ cupdate.html.de 24 Nov 2006 08:02:19 -0000 1.8 @@ -34,7 +34,7 @@ <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="cid" value="$cid" /> -<h2>$!courseModule.getName()</h2> +<h2>$!courseModule.getName(true)</h2> <table border="0"> <!--<tr> <td>Modul-ID</td> @@ -62,7 +62,7 @@ </td> </tr> <tr> - <td>Name (englisch)</td> + <td>Untertitel (englisch)</td> <td><input name="cname_en" size="70" value="$!course.getName("en")"></td> </tr> <tr> @@ -110,9 +110,14 @@ <td>Teilnehmerzahl</td> <td><input name="ccapacity" size="5" value="$!course.getCapacity()"></td> </tr> +#set ($cmects = $cm.getEctsCredits()) <tr> <td>ECTS Credits</td> +#if ("$!cmects"=="") + <td><input name="cectscredits" size="5" value="$!course.getEctsCredits()"></td> +#else <td>$!course.getEctsCredits()<input name="cectscredits" type="hidden" value="$!course.getEctsCredits()"></td> +#end </tr> <tr> <td>Semesterwochenstunden</td> @@ -142,16 +147,15 @@ </td></tr> #foreach ( $c in $coursePresenter.getLecturersForCourse($cid) ) <tr> - <td><input type="checkbox" name="lecturer$!c.getId()" value="true" checked="true"></td> - <td> - <b>$!c.getLastName(), $!c.getFirstName()</b> + <td colspan="2"><input type="checkbox" name="lecturer$!c.getId()" value="true" checked="true"> + <b>$!c.getLastName(), $!c.getFirstName()</b> </td> </tr> #end <tr><td colspan="2"><i>Dozenten deselektieren zum Löschen</i></td></tr> <tr> - <td>Neuen Dozenten hinzufügen</td> - <td><input name="lecturername" size="30"> <a href="clsearch.html"><i>Dozenten suchen</i></a><br> + <td colspan="2">Neuen Dozenten hinzufügen: + <input name="lecturername" size="30"> <a href="clsearch.html"><i>Dozenten suchen</i></a><br> Nachname[, Vorname]</td> </tr> <tr> @@ -163,42 +167,7 @@ <input type="submit" class="submit" value="Veranstaltungsdaten aktualisieren"/> <br /><br /> </td></tr> -<tr> - <td>Lernziele</td> - <td><textarea name="ctarget" rows="3" cols="70">$!course.getTarget()</textarea></td> -</tr> -<tr> - <td>Lernziele (englisch)</td> - <td><textarea name="ctarget_en" rows="3" cols="70">$!course.getTarget('en')</textarea></td> -</tr> -<tr> - <td>Inhalt</td> - <td><textarea name="ccontent" rows="3" cols="70">$!course.getContent()</textarea></td> -</tr> -<tr> - <td>Inhalt (englisch)</td> - <td><textarea name="ccontent_en" rows="3" cols="70">$!course.getContent('en')</textarea></td> -</tr> -<tr> - <td>Vorkenntnisse</td> - <td><textarea name="cprerequ" rows="3" cols="70">$!course.getPrerequ()</textarea></td> -</tr> -<tr> - <td>Vorkenntnisse (englisch)</td> - <td><textarea name="cprerequ_en" rows="3" cols="70">$!course.getPrerequ('en')</textarea></td> -</tr> -<tr> - <td>Prüfungsart</td> - <td><textarea name="ccert" rows="3" cols="70">$!course.getCert()</textarea></td> -</tr> -<tr> - <td>Didaktik</td> - <td><textarea name="cdidactics" rows="3" cols="70">$!course.getDidactics()</textarea></td> -</tr> -<tr> - <td>Didaktik (englisch)</td> - <td><textarea name="cdidactics_en" rows="3" cols="70">$!course.getDidactics('en')</textarea></td> -</tr></table> +</table> <h3>Veranstaltungstermine:</h3> <table border="0"> <tr> @@ -214,6 +183,7 @@ </tr> #set ( $courseDates = $coursePresenter.getCourseDates($cid) ) #set ($j = 0) +#set ( $crooms = $coursePresenter.searchCourseRooms("") ) #foreach ( $cDate in $courseDates ) #set ($j = $j + 1) <tr> @@ -230,7 +200,7 @@ <td> <select name="droom$j"> <option value="">----</option> - #foreach ( $cr in $coursePresenter.searchCourseRooms("") ) + #foreach ( $cr in $crooms ) #set ($sel = "") #if ($cr.getId() == $cDate.getRoomId()) #set ($sel = 'selected="1"') @@ -267,7 +237,7 @@ <td> <select name="droom$i"> <option value="">----</option> - #foreach ( $cr in $coursePresenter.searchCourseRooms("") ) + #foreach ( $cr in $crooms ) <option value="$!cr.getId()">$!cr.getName()</option> #end </select> @@ -294,6 +264,49 @@ </table> <p> <input type="submit" class="submit" value="Veranstaltungsdaten aktualisieren"/> +<p> +<table border="0"> +<tr><td colspan="2"><b><em>Achtung: Die nachfolgenden Informationen sind +aus dem Eintrag des zugehörigen Moduls übernommen und können nicht geändert +werden.</em></b> +</td></tr> +<tr> + <td>Lernziele</td> + <td><textarea name="ctarget" rows="3" cols="70">$!course.getTarget()</textarea></td> +</tr> +<tr> + <td>Lernziele (englisch)</td> + <td><textarea name="ctarget_en" rows="3" cols="70">$!course.getTarget('en')</textarea></td> +</tr> +<tr> + <td>Inhalt</td> + <td><textarea name="ccontent" rows="3" cols="70">$!course.getContent()</textarea></td> +</tr> +<tr> + <td>Inhalt (englisch)</td> + <td><textarea name="ccontent_en" rows="3" cols="70">$!course.getContent('en')</textarea></td> +</tr> +<tr> + <td>Vorkenntnisse</td> + <td><textarea name="cprerequ" rows="3" cols="70">$!course.getPrerequ()</textarea></td> +</tr> +<tr> + <td>Vorkenntnisse (englisch)</td> + <td><textarea name="cprerequ_en" rows="3" cols="70">$!course.getPrerequ('en')</textarea></td> +</tr> +<tr> + <td>Prüfungsart</td> + <td><textarea name="ccert" rows="3" cols="70">$!course.getCert()</textarea></td> +</tr> +<tr> + <td>Didaktik</td> + <td><textarea name="cdidactics" rows="3" cols="70">$!course.getDidactics()</textarea></td> +</tr> +<tr> + <td>Didaktik (englisch)</td> + <td><textarea name="cdidactics_en" rows="3" cols="70">$!course.getDidactics('en')</textarea></td> +</tr> +</table> </form> #end |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:00:28
|
Update of /cvsroot/cobricks/drehscheibe-in In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30685 Modified Files: build.xml Log Message: Index: build.xml =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/build.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- build.xml 6 Oct 2006 12:36:31 -0000 1.6 +++ build.xml 24 Nov 2006 08:00:21 -0000 1.7 @@ -142,11 +142,12 @@ <jar destfile="${dist.home}/webapp.jar" basedir="${build.home}/webapps/${webappname}"> <include name="user/**" /> - <include name="item/**" /> <include name="portal/**" /> - <include name="course/**" /> + <include name="myintum/kurs_verwaltung/**" /> <include name="ADMIN/**" /> <!-- + <include name="course/**" /> + <include name="item/**" /> <include name="notfound.html.de" /> <include name="noaccess.html.de" /> <include name="noaccess-expired.html.de" /> @@ -379,7 +380,7 @@ <java fork="yes" classname="de.tum.cobricks.course.importModules" classpathref="exec.classpath"> <jvmarg value="-Dfile.encoding=utf-8"/> - <arg line="build/webapps/ROOT/WEB-INF/conf Module_060628.xml"/> + <arg line="build/webapps/ROOT/WEB-INF/conf Module_061115a.xml"/> </java> </target> @@ -398,4 +399,13 @@ </java> </target> +<target name="courseoverviews" depends="compile"> + <java fork="yes" + classname="de.tum.cobricks.course.generateHTMLOverviews" maxmemory="512M" + classpathref="exec.classpath"> + <jvmarg value="-Dfile.encoding=utf-8"/> + <arg line="build/webapps/ROOT/WEB-INF/conf WS 2006 test"/> + </java> +</target> + </project> |
|
From: Michael K. <ko...@us...> - 2006-11-24 08:00:08
|
Update of /cvsroot/cobricks/drehscheibe-in/src/de/tum/cobricks/course In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30321/course Modified Files: importModules.java Log Message: Index: importModules.java =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/src/de/tum/cobricks/course/importModules.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- importModules.java 16 Nov 2006 14:20:11 -0000 1.3 +++ importModules.java 24 Nov 2006 08:00:03 -0000 1.4 @@ -192,6 +192,10 @@ String tmps = getLeafValue(node); attrs.put("cmshortname", tmps); } + if (tagName.equals("KurzTitel")) { + String tmps = getLeafValue(node); + attrs.put("cmshortname2", tmps); + } if (tagName.equals("Titel")) { String tmps = getLeafValue(node); attrs.put("cmname", tmps); @@ -261,10 +265,28 @@ pattrs.put("cpid", cprogs.get(cpidtmp)); pattrs.put("cptype", elem.getAttribute("pkz").toLowerCase()); - pattrs.put("cpstartsem", - elem.getAttribute("fachsemester")); + String tmps = elem.getAttribute("vonsemester"); + if (tmps!=null && tmps.length()>0) { + int tmpi = 1; + try { tmpi = Integer.parseInt(tmps); + } catch (Exception e) { } + pattrs.put("cpstartsem", new Integer(tmpi)); + tmps = elem.getAttribute("bissemester"); + try { tmpi = Integer.parseInt(tmps); + } catch (Exception e) { } + pattrs.put("cpendsem", new Integer(tmpi)); + } else { + tmps = elem.getAttribute("fachsemester"); + int tmpi = 1; + try { tmpi = Integer.parseInt(tmps); + } catch (Exception e) { } + pattrs.put("cpstartsem", new Integer(tmpi)); + pattrs.put("cpendsem", new Integer(tmpi)); + } pattrs.put("cpcomment", elem.getAttribute("kommentar")); + pattrs.put("cpcomment_en", + elem.getAttribute("comment")); progs.add(pattrs); } if (tagName.equals("Kapazitaet")) { @@ -289,8 +311,7 @@ +", "+(String)attrs2.get("vorname"); int lid = courseManager.getLecturerIdByName(tmps); if (lid > 0) - attrs.put("cmresponsible", - new Integer(lid)); + attrs.put("cmresponsible", new Integer(lid)); } if (tagName.equals("Dozenten")) { // unterknoten: Dozent mit attr: idref @@ -429,12 +450,15 @@ String art = elem.getAttribute("art"); String idref = elem.getAttribute("idref"); String kommentar = elem.getAttribute("kommentar"); + String comment = elem.getAttribute("comment"); result.append("\n <Vorkenntnis art=\""); result.append(art); result.append("\" idref=\""); result.append(idref); result.append("\" kommentar=\""); result.append(kommentar); + result.append("\" comment=\""); + result.append(comment); result.append("\" />"); } } @@ -458,7 +482,7 @@ Map attrs2 = (Map)dozenten.get(idref); if (attrs2!=null) { String name = (String)attrs2.get("name"); - sb.append("\n <Dozentname=\"").append(name) + sb.append("\n <Dozent name=\"").append(name) .append("\" />"); } // TBD: Lecturer-Id? @@ -520,6 +544,7 @@ private void parseProgram(Node node) { String name = ""; + String name_en = ""; Element elem = (Element)node; // get attributes String id = elem.getAttribute("id"); @@ -532,6 +557,9 @@ if (tagName.equals("Name")) { name = getLeafValue(node); } + if (tagName.equals("NameEn")) { + name_en = getLeafValue(node); + } } node = node.getNextSibling(); } @@ -539,7 +567,7 @@ Map attrs = new HashMap(); attrs.put("cplabel", id); attrs.put("cpname", name); - attrs.put("cpname_en", name); + attrs.put("cpname_en", name_en); int cpid = courseManager.createProgram(attrs, null); logger.info("program "+id+" created"); cprogs.put(id, new Integer(cpid)); |
|
From: Wolfgang W. <wo...@us...> - 2006-11-23 17:44:20
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25350 Modified Files: PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- PortalPresenter.java 13 Nov 2006 16:59:18 -0000 1.51 +++ PortalPresenter.java 23 Nov 2006 17:44:15 -0000 1.52 @@ -1156,7 +1156,10 @@ public final String substr (String str, int n) { if (str.length() > n) - return str.substring (0, n); + { + String result = str.substring (0, n) + "..."; + return result; + } return str; } |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:41:38
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.user In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26746/org.cobricks.user Added Files: change_password.html.en role-create.html.en role-edit.html.en role-editperm.html.en role-editperm2.html.en roles.html.en user-buddylist.html.en user-interests.html.en user-roles.html.en user.html.en Log Message: --- NEW FILE: role-create.html.en --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>Create Access Role</h1> <!-- tbd: check for permission userrole/create - if not, then print warning --> <form action="/USER" method="post"> <input type="hidden" name="cmd" value="createrole"/> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/roles.html"/> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/roles.html"/> <input type="hidden" name="cmd.noaccess" value="/noaccess.html"/> <b>Role Name:</b><br> <input type="string" size="30" name="rolename"/> <p> <b>Role Description:</b><br> <textarea name="roledescription" cols="80" rows="3"> </textarea> <p> <b>Role Type:</b><br> <input type="radio" select name="roletype" value="0" checked="checked"/> standard (for explicitely assigned users)<br> <input type="radio" select name="roletype" value="10"/> login (for all authenticated users)<br> <input type="radio" select name="roletype" value="20"/> all (for all users - inclusive anonymous) <p> <input type="submit" value="Create Role"/> </form> #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: role-editperm2.html.en --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>Edit Access Role</h1> #set ( $auth = $userPresenter.checkPermission($userId, "userrole", "update", "") ) #if ( $auth != "true") <font color="red">You do not have the access permission to update access role information.</font> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else <h3>Add Permission - Step 2: Specify Access Permission Attributes</h3> <form action="/USER" method="post"> <input type="hidden" name="cmd" value="addperm"/> <input type="hidden" name="roleid" value="$roleid"/> <input type="hidden" name="cmd.noaccess" value="/noaccess.html"/> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/role-edit.html"/> <input type="hidden" name="permdomain" value="$permdomain"/> <input type="hidden" name="permaction" value="$permaction"/> Domain: <b>"$permdomain"</b> <p> Action: <b>"$permaction"</b> <p> Permission Attributes:<br> <select name="permaname1" size="1"> <option value="">- #foreach( $i in $userManager.getAccessControl().getAccessHandler($permdomain).getDomainActionAttributes($permaction) ) <option value="$i">$i #end </select> <input name="permavalue1" size="30"><br> <select name="permaname2" size="1"> <option value="">- #foreach( $i in $userManager.getAccessControl().getAccessHandler($permdomain).getDomainActionAttributes($permaction) ) <option value="$i">$i #end </select> <input name="permavalue2" size="30"><br> <select name="permaname3" size="1"> <option value="">- #foreach( $i in $userManager.getAccessControl().getAccessHandler($permdomain).getDomainActionAttributes($permaction) ) <option value="$i">$i #end </select> <input name="permavalue3" size="30"><br> <select name="permaname4" size="1"> <option value="">- #foreach( $i in $userManager.getAccessControl().getAccessHandler($permdomain).getDomainActionAttributes($permaction) ) <option value="$i">$i #end </select> <input name="permavalue4" size="30"><br> <select name="permaname5" size="1"> <option value="">- #foreach( $i in $userManager.getAccessControl().getAccessHandler($permdomain).getDomainActionAttributes($permaction) ) <option value="$i">$i #end </select> <input name="permavalue5" size="30"><p> The attribute names provided for restricting the permission are a subset of the attributes defined in the basic ontology for the domain. The subset is specified in the AccessHandler component for the given domain. <p> Values can either be string or integer values. Additionally, you can use the keywords "ownuserid", "ownuserlogin" and "ownuserclass". <p> <input type="submit" value="Add Permission"/> </form> #end #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: role-editperm.html.en --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>Edit Access Role</h1> #set ( $auth = $userPresenter.checkPermission($userId, "userrole", "update", "") ) #if ( $auth != "true") <font color="red">You do not have the access permission to update access role information.</font> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else <h3>Add Permission - Step 1: Specify Access Permission Action</h3> <form action="/ADMIN/org.cobricks.user/role-editperm2.html" method="post"> <input type="hidden" name="roleid" value="$roleid"/> <input type="hidden" name="permdomain" value="$permdomain"/> Domain: <b>"$permdomain"</b> <p> Action <select name="permaction" size="1"> #foreach( $i in $userManager.getAccessControl().getAccessHandler($permdomain).getDomainActions() ) <option value="$i">$i #end </select> <p> <input type="submit" value="Add Permission"/> </form> #end #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: change_password.html.en --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a> - <a href="/ADMIN/org.cobricks.user/search.html">Search User</a></em> <h1>Change Password</h1> #if (($returnCode >= 1000) && ($returnCode <=1020)) #if ($returnCode == 1007) <div class="error"> No new password is provided! </div> #end #if ($returnCode == 1002) <div class="error">Password confirmation faild!</div> #end #if ($returnCode == 1008) <div class="error"> The length of the new password has to be between 6 and 8 characters. </div> #end #end <form action="/USER" method=post> <p> <INPUT TYPE=hidden NAME=cmd VALUE=changePassword /> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/change_password.html.en" /> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/change_password.html.en" /> <input type="hidden" name="auLogin"> #if ($returnCode == 2001) <div class="info">The password has been changed!</div> #else <TABLE BORDER=0> <tr> <TD>Password (new)*:</TD><TD><input type="password" name="passwordNew" size=20 value="$!passwordNew"></td> </tr> <tr> <TD>Confirm Password*:</TD><TD><input type="password" name="passwordConfirm" size=20 value="$!passwordConfirm"></td> </tr> <tr> <br> <td colspan = "2" align="left">Required fields are marked with *.</td> </tr> </table> </p> #set ($login = "$!auserlogin") <p><input type=submit value="Change Password"/></p> #end </form> #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: user-buddylist.html.en --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a> - <a href="/ADMIN/org.cobricks.user/search.html">Search User</a></em> #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <h1>User Profile - Buddylist</h1> #set ( $auth = $userPresenter.checkPermission($userId, "user", "read", "userid=$auserid") ) #if ( "$auth" != "true" ) #if ( "$auserlogin" == "$userLogin" ) #set ( $auth = "true" ) #end #end #if ( $auth != "true" ) <div class="error">You do not have the access permission to read user information of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else #if ($auserid == 0) <p><div class="error">User with user login <b>$auserlogin</b> does not exist!</div></p> #else #if ($returnCode == 1001) <p><div class="error">User with user login $!newUserLogin does not exist, please check your input!</div></p> <p><div class="info">And try again!</div></p> #end #if ($returnCode == 1002) <p><div class="info">The user you try to add, is already in your buddylist.</div></p> #end #if ($returnCode == 1003) <p><div class="info">It is impossible to add yourself into your buddylist!</div></p> #end #if ($returnCode == 1010) <p><div class="info">Your input is empty!</div></p> #end #if ($returnCode == 2001) <p><div class="info">You have added one new member in your buddylist.</div></p> #end <p>User Login: $auserlogin</p> <form action="/USER" method="post"> <input type="hidden" name="cmd" value="deleteListMember" /> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/user-buddylist.html" /> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/user-buddylist.html" /> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="aname" value="pim.network.buddylist" /> <input type="hidden" name="uid" value="$auserid" /> <p> <table border="1pt" width="100%" cellspacing="0pt" cellpadding="0pt"> <tr bgcolor="#eeeeee"> <td> <table border="0" cellpadding="5pt"><tr><td> <em><a href="user.html?auserlogin=$auserlogin">basic</a> - <a href="user-interests.html?auserlogin=$auserlogin">interests</a> - <a href="user-buddylist.html?auserlogin=$auserlogin">buddylist</a> - <a href="user-roles.html?auserlogin=$auserlogin">access roles</a><em></td> </td></tr></table></td> <td align="right"> <table border="0" cellpadding="5pt"><tr><td> <em><a href="change_password.html?auserlogin=$auserlogin">change password</a></em> </td></tr></table> </td></tr> <tr><td colspan="2"> <table border="0" cellpadding="8pt"> <tr><td> <b>Buddylist of user <i>$userManager.getUser($auserid).getName()</i></b> <br><br> <table width="100%"> <tr bgcolor="dfdfdf"> <td width="7%"> <b>Delete</b> </td> <td width="12%"> <b>Image</b> </td> <td width="43%"> <b>Name</b> </td> <td width="38%"> <b>E-Mail</b> </td> </tr> #set ($result = $userPresenter.getUserAttrSet($auserid, "pim.network.buddylist")) #if ($result.size() > 0) #foreach ($i in $result) <tr bgcolor="dfdfdf"> <td align="center"><input type="checkbox" name="id" value="$i.getId()"></td> <td valign=center> #set ($imageuri = "") #set ($imageuri = $i.getAttribute("basic.personal.imageuri")) #if ("$!imageuri"!="") <img src="$imageuri" width="32" height=32> #end </td> <td><a href="/ADMIN/org.cobricks.user/card.html?auserlogin=$i.getUserLogin()">$i.getName()</a></td> <td> #if ($i.getAttribute("basic.contact-work.online.email")) $!i.getAttribute("basic.contact-work.online.email") #else $!i.getAttribute("basic.contact-private.online.email") #end</td> </tr> #end #else <tr><td colspan = "3">Your buddylist has no entries yet. You can fill it using text field below.</td></tr> #end </table> <br> <input type="submit" value="Delete"> </form> <p> <form action="/USER" method="post" name=frm1 id=frm1> <input type="hidden" name="cmd" value="addListMember" /> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/user-buddylist.html" /> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/user-buddylist.html" /> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="aname" value="pim.network.buddylist" /> <input type="hidden" name="uid" value="$auserid" /> In order to add somebody to your buddylist please enter his/her <b><font color="black">userlogin</font></b> into the text field below and click the button "Add to the list". </p> <br> <input type="submit" value="Add to the list"> <input name="newUserLogin" size="20" value="$!newUserLogin"> <script type="text/javascript"> // <!-- document.write("<input type=button value=Search "window.open('/ADMIN/org.cobricks.user/user-buddylist-search.html?print=true&auserlogin=$auserlogin','usersearch','width=500,height=500,scrollbar=yes,menu=no');\">"); // --> </script> <noscript> <a href="/ADMIN/org.cobricks.user/user-buddylist-search.html?auserlogin=$auserlogin">Search</a> </noscript> </td></tr></table> </td></tr></table> </form> #end #end #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: roles.html.en --- #parse ( "$contextPath/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>Access Roles</h1> #set ( $auth = $userPresenter.checkPermission($userId, "userrole", "read", "") ) #if ( $auth != "true") <div class="error">You do not have the access permission to read access role information.</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else <p>List of access roles defined on the platform:</p> <table> <tr><td><b>Role Name</b></td><td> </td><td> </td></tr> #foreach( $i in $userManager.getAccessControl().getAccessRoles() ) <tr><td>$i.getName()</td><td></td><td><a href="/ADMIN/org.cobricks.user/role-edit.html?roleid=$i.getId()">edit</a> - <a href="/USER?cmd=deleterole&cmd.success=/ADMIN/org.cobricks.user/roles.html&cmd.noaccess=/ADMIN/org.cobricks.user/roles.html&roleid=$i.getId()">delete</a></td></tr> #end </table> <p> <h3>Role Management Activities</h3> <ul> <li><a href="/ADMIN/org.cobricks.user/role-create.html">Create New Access Role</a> <li><form action="/ADMIN/org.cobricks.user/user-roles.html"> Show Access Roles for User <input name="auserlogin" value="$userLogin"> <input type="submit" value="Show"></form> </ul> #end #parse ( "$contextPath/ADMIN/pagefooter.html" ) --- NEW FILE: user-interests.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html.de",$portalRequest) #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>User Profile - Interests</h1> #set ( $auth = $userPresenter.checkPermission($userId, "user", "read", "userid=$auserid") ) #if ( "$auth" != "true" ) #if ( "$auserlogin" == "$userLogin" ) #set ( $auth = "true" ) #end #end #if ( $auth != "true" ) <div class="error">You do not have the access permission to read user information of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else #if ($auserid == 0) <p><div class="error">User with user login <b>$auserlogin</b> does not exist!</div></p> #else #if ($returnCode == 1002) <p><div class="info">The interest you try to add, is already in your interests list.</div></p> #end #if ($returnCode == 1010) <p><div class="info">You have choosen nothing to add. </div></p> #end #if ($returnCode == 2001) <p><div class="info">The new entry has been added to your interests list.</div></p> #end <p>User Login: $auserlogin</p> <form action="/USER" method="post"> <input type="hidden" name="cmd" value="deleteListMember" /> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/user-interests.html" /> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/user-interests.html" /> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="aname" value="interests.categories" /> <input type="hidden" name="uid" value="$auserid" /> <p> <table border="1pt" width="100%" cellspacing="0pt" cellpadding="0pt"> <tr bgcolor="#eeeeee"> <td> <table border="0" cellpadding="5pt"><tr><td> <em><a href="user.html?auserlogin=$auserlogin">basic</a> - <a href="user-interests.html?auserlogin=$auserlogin">interests</a> - <a href="user-buddylist.html?auserlogin=$auserlogin">buddylist</a> - <a href="user-roles.html?auserlogin=$auserlogin">access roles</a><em></td> </td></tr></table></td> <td align="right"> <table border="0" cellpadding="5pt"><tr><td> <em><a href="change_password.html?auserlogin=$auserlogin">change password</a></em> </td></tr></table> </td></tr> <tr><td colspan="2"> <table border="0" cellpadding="8pt"> <tr><td> <b>Interests of user <i>$userManager.getUser($auserid).getName()</i></b> <br><br> <table width="100%"> <tr bgcolor="dfdfdf"><td width="7%"><b>Delete</b></td><td width="43%"><b>Name</b></td><td width="50%"><b>Category Class</b></td></tr> #set ($result = $userPresenter.getUserAttrSet($auserid, "interests.categories")) #if ($result.size() > 0) #foreach ($i in $result) <tr bgcolor="dfdfdf"> <td align="center"><input type="checkbox" name="id" value="$i.getId()"></td> <td>$i.getTitle()</td> <td>$i.getOntologyClassName() </td> </tr> #end #else <tr><td colspan = "3">Your interests list has no entries yet. You can choose it from the list below and add it to your interests list.</td></tr> #end </table> <br> <input type="submit" value="Delete"> </form> <p> <form action="/USER" method="post"> <input type="hidden" name="cmd" value="addListMember" /> <input type="hidden" name="cmd.success" value="/user/user-interests.html" /> <input type="hidden" name="cmd.error" value="/user/user-interests.html" /> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="aname" value="interests.categories" /> <input type="hidden" name="uid" value="$auserid" /> Please choose more interests from the list and click the button "Add to the list": <select name="cid"> #foreach( $i in $categoryPresenter.getCategories("", "", "") ) <option value="$i.getId()">$!i.getTitle() </option> #end </select> <br><br> <input type="submit" value="Add to the list"> </td></tr></table> </td></tr></table> </form> #end #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html.de",$portalRequest) --- NEW FILE: user.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html",$portalRequest) #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>User Profile</h1> #set ( $auth = $userPresenter.checkPermission($userId, "user", "read", "userid=$auserid") ) #if ( "$auth" != "true" ) #if ( "$auserlogin" == "$userLogin" ) #set ( $auth = "true" ) #end #end #if ( $auth != "true" ) <div class="error">You do not have the access permission to read user information of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else #if (($returnCode != 2010) && ($returnCode != 1001)) #if ($auserid == 0) <p><div class="error">User with user login <b>$auserlogin</b> does not exist!</div></p> #else #set ($imageuri = $auser.getAttribute("basic.personal.imageuri")) #if ("$!imageuri"!="") <img align="right" width="70" src="$imageuri"> #end <p>User Login: $auserlogin</p> <form action="/USER" method="post" enctype="multipart/form-data"> <INPUT TYPE="hidden" NAME="cmd" VALUE="update" /> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/user.html" /> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/user.html" /> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="auserid" value="$auserid" /> <p> #if ($returnCode == 1011) <p><div class="error">Login name $auserlogin is already taken by another user</div></p> #end #if ($returnCode == 1020) <p><div class="error">Failed updating attributes for user $auserlogin</div></p> #end #if ($returnCode == 2001) <p><div class="info">Your changes are saved. Your data is updated successfully.</div></p> #end #if ($returnCode == 2002) <p><div class="info">You have done no changes.</div></p> #end <p> <table border="1pt" width="100%" cellspacing="0pt" cellpadding="0pt"> <tr bgcolor="#eeeeee"> <td> <table border="0" cellpadding="5pt"><tr><td> <em><a href="user.html?auserlogin=$auserlogin"><b>basic</b></a> - <a href="user-interests.html?auserlogin=$auserlogin">interests</a> - <a href="user-buddylist.html?auserlogin=$auserlogin">buddylist</a> - <a href="user-roles.html?auserlogin=$auserlogin">access roles</a><em></td> </td></tr></table></td> <td align="right"> <table border="0" cellpadding="5pt"><tr><td> <em><a href="change_password.html?auserlogin=$auserlogin">change password</a></em> </td></tr></table> </td></tr> <tr><td colspan="2"> <table border="0" cellpadding="8pt"> <tr><td> <table border="0"> <tr><td>$userPresenter.printDescription($auserid, "basic.personal.firstname", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "basic.personal.firstname")</td></tr> <tr><td>$userPresenter.printDescription($auserid, "basic.personal.lastname", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "basic.personal.lastname")</td></tr> <tr><td>$userPresenter.printDescription($auserid, "basic.demographics.gender", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "basic.demographics.gender")</td></tr> <tr><td>$userPresenter.printDescription($auserid, "basic.contact-priv.online.email", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "basic.contact-priv.online.email")</td></tr> <tr><td>$userPresenter.printDescription($auserid, "preference.language", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "preference.language")</td></tr> <tr><td valign=top>$userPresenter.printDescription($auserid, "basic.personal.languagesspoken", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "basic.personal.languagesspoken")</td></tr> </table> <table border="0"> <tr><td>$userPresenter.printDescription($auserid, "basic.personal.imageuri", $lang):</td> <td>$userPresenter.printUserAttrInput($auserid, "basic.personal.imageuri")</td></tr> </table> <p>If you do not have a possibility to upload a portrait to a Web server, you can upload an image file (gif, png or jpg) to our server. Just select a file from you local file system:<br> <input type="file" size="40" name="uploadimage"> <p> You can load your user profile from a FOAF/RDF user profile representation. Just enter the URL of your FOAF description here and the content of this file will be loaded intot your local Cobricks user profile. <table border="0"> <tr><td>$userPresenter.printDescription($auserid, "basic.personal.foafuri", $lang): $userPresenter.printUserAttrInput($auserid, "basic.personal.foafuri")</td></tr> </table> <p> <input type="submit" value="Update"> </td></tr></table> </td></tr></table> <hr> <p><h3>All attributes (from user ontology for class "$auserclass")</h3> #set ($attrNames = $userManager.getOntologyClass($auserclass).getAttributeNames() ) #set ($attrNames = $corePresenter.sortList($attrNames) ) <table border="0"> #foreach ($j in $attrNames) <tr> <td valign="top"> $userPresenter.printDescription($auserid, $j, $lang)<br> ($j) </td> <td> $userPresenter.printUserAttrInput($auserid, $j) </td> </tr> #end </table> <input type="hidden" name="anames" value="$attrNames"> <input type="submit" value="Update"> #end #end </form> <form action="/USER" method="post"> <input type="hidden" name="cmd" value="delete"/> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/index.html"> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.user/user.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> #if ($auserid == 0) #else #set ($userloginToDelete = $auserlogin) ##set ($test="$uLogin") #if ($returnCode == 1001) <div class="error"> User with login name <i>$auserlogin</i> does not exist. </div> #end #if ($returnCode == 2010) <div class="info"> User $userloginToDelete was deleted successful. </div> $portalPresenter.doLogout($portalRequest) #else <input type="hidden" name="auserlogin" value="$auserlogin" /> <input type="hidden" name="auserid" value="$auserid" /> <input type="submit" value="Delete User" /> #end </form> #end #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html",$portalRequest) --- NEW FILE: role-edit.html.en --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>Edit Access Role</h1> #set ( $auth = $userPresenter.checkPermission($userId, "userrole", "read", "") ) #if ( $auth != "true") <font color="red">You do not have the access permission to read access role information.</font> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else #if ( $returnCode > 999 ) <p> #if ( $returnCode == 1000 ) <div class="success">Access role updated.</div> #end #if ( $returnCode == 1001 ) <div class="success">Parent access roles updated.</div> #end #if ( $returnCode == 1002 ) <div class="success">Permissions deleted from access role.</div> #end #if ( $returnCode == 1003 ) <div class="success">Permission added to access role.</div> #end #if ( $returnCode == 1004 ) <div class="success">Users deleted from access role.</div> #end #if ( $returnCode == 1005 ) <div class="success">User added to access role.</div> #end #if ( $returnCode == 2000 ) <div class="error">Failed updating access role.</div> #end #if ( $returnCode == 2005 ) <div class="error">Illegal user login $userlogin.</div> #end </p> #end #set ( $role = $userPresenter.getAccessRole($roleid) ) #set ( $authupdate = $userPresenter.checkPermission($userId, "userrole", "update", "roleid=$roleid") ) #set ( $authadduser = $userPresenter.checkPermission($userId, "userrole", "adduser", "roleid=$roleid") ) #set ( $authremoveuser = $userPresenter.checkPermission($userId, "userrole", "removeuser", "roleid=$roleid") ) <p> #if ("$!authupdate" != "true") <div class="error">You do not have the permission to update this user role!</div> <p> #end <form action="/USER" method="post"> <input type="hidden" name="cmd" value="updaterole"/> <input type="hidden" name="roleid" value="$roleid"/> <input type="hidden" name="cmd.noaccess" value="/noaccess.html"/> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.user/role-edit.html"/> <input type="hidden" name="cmd.editperm" value="/ADMIN/org.cobricks.user/role-editperm.html"/> <table border="0" width="100%"> <tr><td width="50%" valign="top"> <b>Role Name:</b><br> <input type="string" size="30" name="rolename" value="$!role.getName()"/> <p> <b>Role Description:</b><br> <textarea name="roledescription" rows="3" width="100%"> $!role.getDescription() </textarea> <p> <b>Role Type:</b><br> <input type="radio" select name="roletype" value="0" #if ($role.getType()==0) checked="checked" #end /> standard (for explicitely assigned users)<br> <input type="radio" select name="roletype" value="10" #if ($role.getType()==10) checked="checked" #end /> login (for all authenticated users)<br> <input type="radio" select name="roletype" value="20" #if ($role.getType()==20) checked="checked" #end /> all (for all users - inclusive anonymous) <p> #if ( $authupdate == "true" ) <input type="submit" name="subcmd" class="submit" value="Update Role"/> #end <p> <h3>Parent Access Roles</h3> <select name="parentroles" multiple="true" size="5"> #foreach( $i in $userManager.getAccessControl().getAccessRoles() ) <option value="$i.getId()" $userPresenter.checkSubRole($role,$i)>$i.getName() #end </select> #if ( $authupdate == "true" ) <br>Select or deselect roles to change the parent roles of this role.<br> <input type="submit" class="submit" name="subcmd" value="Update Parent Roles"/> #end </td><td> </td> <td width="50%" valign="top"> <h3>Access Role Permissions</h3> <select name="perms" multiple="true" size="5"> #foreach( $i in $userPresenter.getAccessPermissions($roleid) ) <option value="$i.getId()">$i.getDomain() - $i.getAction() $i.getAttrsAsString() #end </select> #if ( $authupdate == "true" ) <br>Deselect permissions for deleting the permission.<br> <input type="submit" class="submit" name="subcmd" value="Delete selected Permissions"/> <p> Domain <select name="permdomain" size="1"> #foreach( $i in $userManager.getAccessControl().getDomains() ) <option value="$i">$i #end </select> <input type="submit" class="submit" name="subcmd" value="Add Permission"/> #end <p> <h3>Users Assigned to Role</h3> <select name="roleusers" multiple="true" size="5"> #foreach( $i in $userPresenter.getAccessRoleUsers($roleid) ) #set ($user = $userManager.getUser($i) ) <option value="$i"> #if ($role.isUserDelegate($i)) + #end $user.getName() ($user.getUserLogin()) #end </select> #if ( $authremoveuser == "true" ) <br>Deselect users for unassigning them from the role.<br> <input type="submit" class="submit" name="subcmd" value="Delete selected Users"/> #end #if ( $authadduser == "true" ) <p> User Login <input name="userlogin" size="30"><br> <input type="checkbox" name="delegate" value="true"> delegate<br> <input type="submit" class="submit" name="subcmd" value="Add User"/> #end </td> </tr> </table> </form> #end #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: user-roles.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html.de",$portalRequest) #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>User Profile - Roles and Permissions</h1> #set ( $auth = $userPresenter.checkPermission($userId, "user", "read", "userid=$auserid") ) #if ( "$auth" != "true" ) #if ( "$auserlogin" == "$userLogin" ) #set ( $auth = "true" ) #end #end #if ( $auth != "true" ) <div class="error">You do not have the access permission to read user information of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else #if ($auserid == 0) <p><div class="error">User with user login <b>$auserlogin</b> does not exist!</div></p> #else <p>User Login: $auserlogin</p> <p> <table border="1pt" width="100%" cellspacing="0pt" cellpadding="0pt"> <tr bgcolor="#eeeeee"> <td> <table border="0" cellpadding="5pt"><tr><td> <em><a href="user.html?auserlogin=$auserlogin">basic</a> - <a href="user-interests.html?auserlogin=$auserlogin">interests</a> - <a href="user-buddylist.html?auserlogin=$auserlogin">buddylist</a> - <a href="user-roles.html?auserlogin=$auserlogin"><b>access roles</b></a><em></td> </td></tr></table></td> <td align="right"> <table border="0" cellpadding="5pt"><tr><td> <em><a href="change_password.html?auserlogin=$auserlogin">change password</a></em> </td></tr></table> </td></tr> <tr><td colspan="2"> <table border="0" cellpadding="8pt"> <tr><td> <b>Access roles and permissions of user <i>$userManager.getUser($auserid).getName()</i></b> <ul> #foreach( $i in $userManager.getAccessControl().getAccessRolesByUser($auserid) ) <li>$i.getName() <ul> #foreach ( $p in $userManager.getAccessControl().getAccessPermissions($i.getId()) ) <li>$p.getDomain() - $p.getAction() - $p.getAttrsAsString() #end </ul> <p> #end </ul> </td></tr></table> </td></tr></table> #end #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html.de",$portalRequest) |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:41:37
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.category In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26746/org.cobricks.category Added Files: create.html create_start.html search.html show.html update.html update_start.html Log Message: --- NEW FILE: search.html --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html",$portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.category/index.html">Category Component</a></em> <h1>Category Component - Search Category</h1> <script> function showCategory(){ var i = document.getElementsByName('cid'); for(var n = 0;n<i.length;n++){ if(i[n].checked){ window.location = '/category/show.html?catid='+i[n].value; return false; } } } </script> <form action="$contextPath/CATEGORY" method="post"> <input type="hidden" name="cmd" value="delete"/> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.category/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.category/index.html"> #set ( $categoryclass = "$!categoryclass" ) #set ( $parentid = "$!parentid" ) #set ( $catid = "$!catid") #set ( $title = "$!title") List categories for: categoryclass = "$!categoryclass", parentid = "$!parentid", title = "$!title" <p> <table width="100%"> <tr bgcolor="#dfdfdf"> <td>Delete? </td> <td> <b>CategoryClass</b> </td> <td> <b>Title</b> </td> <td> <b>Parent</b> </td> <!--td> <b>Interessted Users</b> </td--> </tr> #foreach( $i in $categoryPresenter.getCategories($!categoryclass, $!parentid, $!title) ) <tr bgcolor="#dfdfdf"> <td><input type="checkbox" name="cid" value="$i.getId()"> </td> <td> <!--a href="show.html?catid=$i.getId()">$!i.getCategoryClass()</a--> $!i.getCategoryClass() </td> <td> <a href="update_start.html?catid=$i.getId()">$!i.getTitle()</a> </td><td> #set ( $category = false ) #set ( $category = $categoryManager.getCategory($i.getParentId()) ) #if ( $category ) $category.getTitle() #end </td> <!-- <td> #if ( $!i.getCategoryClass() == "community" ) <a href="community.html?catid=$i.getId()">show</a> #else <a href="interessted_user.html?catid=$i.getId()">show</a> #end </td> --> </tr> #end <tr><td colspan=6><input type="submit" class="submit" value="Delete Selected Categories"></td></tr> </table> </form> <h3>Search Categories</h3> <form action="index.html" method="get"> <table border="0"> <tr><td>categoryclass</td><td><select name="categoryclass" size="3" multiple="true"> #foreach( $i in $categoryPresenter.getCategoryClassNames() ) <option value="$i">$i #end </select> </td></tr> <tr><td>Parent</td><td> #set ( $tmps = "$!parentid" ) <select name="parentid" size="1"> <option value="0">++++ no parent +++++ #foreach( $i in $categoryPresenter.getCategories("","", "") ) #set ( $cid = $i.getId() ) <option value="$cid">$i.getTitle("en") #end <tr><td>Title</td><td><input type="text "name="title" size="10"></td></tr> </select></td></tr> <tr><td colspan="2"><input type="submit" class="submit" value="Search"></td></tr> </table> </form> <ul> <li><a href="$contextPath/ADMIN/org.cobricks.category/create_start.html">Create New Category</a> </ul> <ul> <li><a href="#" >Show Category Details</a> </ul> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html",$portalRequest) --- NEW FILE: show.html --- #parse ( "pageheader.html" ) <em><a href="index.html">Category Component</a> - <a href="create.html">Create Category</a></em> <h1>Show Category</h1> <!--- load category ---> #set($category = $!categoryPresenter.getCategory($catid)) #set($categoryclass = $category.getCategoryClass()) <form action="$contextPath/CATEGORY" method="post"> <input type="hidden" name="catid" value="$catid"> <input type="hidden" name="cmd" value="show"> <input type="hidden" name="cmd.success" value="$contextPath/category/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/category/show.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> #if(!($categoryclass == "")) #set($attrs = $categoryPresenter.getAttributeNames($categoryclass)) ##set($attrs = $categoryPresenter.removeUnchangedAttributes($attrs)) #if(!$attrs.isEmpty()) <hr/> <p> <h3>Category Details:</h3> <table cellspacing="10"> #foreach($attr in $attrs) <tr valign="top"> <td><b>$attr</b> #if ($attr == "title") <b>$!category.getTitle()</b> #elseif ($attr == "parent") <b>$!categoryManager.getCategory($category.getParentId()).getTitle()</b> #elseif ($attr == "members" || $attr == "managers") <b>$categoryPresenter.showUserNames($!category.getAttribute($attr))</b> #elseif ($attr == "updater") <b>$!categoryPresenter.showUserNames($!category.getAttribute("updaterid"))</b> #elseif ($attr == "creator") <b>$!categoryPresenter.showUserNames($!category.getAttribute("creatorid"))</b> #else <b>$!category.getAttribute($attr)</b> #end #end </table> </p> #end #end <hr/> </form> #parse ( "pagefooter.html" ) --- NEW FILE: update_start.html --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.category/index.html">Category Component</a></em> <script> function writeValues2FormField(fieldname){ var field = eval('document.myForm.'+fieldname); var values = new Array(); var field_right = eval('document.myForm.'+fieldname+'_right'); for(var i=0; i<field_right.length;i++){ if (field_right.options[i].value == 'dummy_element') continue; values = values.concat(field_right.options[i].value); } field.value = values.join(','); } function moveElements2Left(fieldname) { var field_left = eval('document.myForm.'+fieldname+'_left'); var field_right = eval('document.myForm.'+fieldname+'_right'); //loop over all elements of the right side for(var i=0; i<field_left.length;i++){ if(field_left.options[i].value == 'dummy_element') continue; if(field_left.options[i].selected) { //add this element to the left side var l = field_right.length; field_right.options[l] = new Option(); field_right.options[l].text = field_right.options[l-1].text; field_right.options[l].value = field_right.options[l-1].value; field_right.options[l-1].text = field_left.options[i].text; field_right.options[l-1].value = field_left.options[i].value; // remove this element from the left side var l = field_left.length-1; for(var j = i;j<l;j++) { field_left.options[j].text = field_left.options[j+1].text; field_left.options[j].value = field_left.options[j+1].value; } field_left.options[l] = null; } } for(var i=0; i<field_left.length;i++) field_left.options[i].selected = false; writeValues2FormField(fieldname); } function moveElements2Right(fieldname) { var field_right = eval('document.myForm.'+fieldname+'_right'); var field_left = eval('document.myForm.'+fieldname+'_left'); //loop over all elements of the left side for(var i=0; i<field_right.length;i++) { if(field_right.options[i].value == 'dummy_element') continue; if(field_right.options[i].selected) { // add this element to the right side var l = field_left.length; field_left.options[l] = new Option(); field_left.options[l].text = field_left.options[l-1].text; field_left.options[l].value = field_left.options[l-1].value; field_left.options[l-1].text = field_right.options[i].text; field_left.options[l-1].value = field_right.options[i].value; // remove this element from the right side var l = field_right.length-1; for(var j = i;j<l;j++){ field_right.options[j].text = field_right.options[j+1].text; field_right.options[j].value = field_right.options[j+1].value; } field_right.options[l] = null; } } for(var i=0; i<field_right.length;i++) field_right.options[i].selected = false; writeValues2FormField(fieldname); } </script> <h1>Cobricks-2 - Category Details and Update</h1> <p> <!--- load category ---> #set($category = $!categoryPresenter.getCategory($catid)) #set($categoryclass = $category.getCategoryClass()) #set($selectedLangs = $portalRequest.getRequestParameterValues("_languages")) #if("$!selectedLangs"=="") #set($selectedLangs = $category.getUsedLanguages()) #end #if("$!selectedLangs" == "en") #set($selectedLangs = [ "en" ]) #end #if("$!selectedLangs" == "de") #set($selectedLangs = [ "de" ]) #end #if("$!selectedLangs" == "") #set($selectedLangs = [ "en" ]) #end #set ($langs = "") Update for languages: #foreach($lg in $selectedLangs) #if("$langs" == "") $lg #set ($langs = "${lg}") #else , $lg #set ($langs = "${langs},${lg}") #end #end <br>(for these languages the multilingual attributes are displayed) <p> <form action="/ADMIN/org.cobricks.category/update_start.html" method="get"> <input type="hidden" name="categoryclass" value="$!categoryclass"/> <input type="hidden" name="catid" value="$catid"> <h2>Enter all languages in which you would like to perform updates:</h2> <table cellspacing="10"> <!--tr valign="top"> <td><b>Item ID</b></td> <td><input name="itemid" type="text" size="15"/></td> <td>(must be a number)</td--> </tr> <tr valign="top"> <td><b>Languages</b></td> <td>$categoryPresenter.printDropDown("_languages", $langs, "language", true)</td> <td>(multiple selection possible)</td> </tr> </table> <input type="submit" value="Reload"/> </form> <hr/> <form action="$contextPath/CATEGORY" method="post" name="myForm"> <input type="hidden" name="catid" value="$catid"> <input type="hidden" name="cmd" value="update"> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.category/index.html"> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.category/update.html"> <input type="hidden" name="categoryclass" value="$!categoryclass"/> <input type="hidden" name="lang" value="$!langs"> #if(!($categoryclass == "")) #set($attrs = $categoryPresenter.getAttributeNames($categoryclass)) #set($attrs = $categoryPresenter.removeUnchangedAttributes($attrs)) ##set($itemAttrs = $categoryPresenter.getAttributeNames("category")) ##set($attrs = $categoryPresenter.removeDuplicates($attrs, $itemAttrs)) #if(!$attrs.isEmpty()) <p> <table cellspacing="10"> #foreach($attr in $attrs) #set ($field_value = "") #if($categoryPresenter.isMultiLang($categoryclass, $attr)) #foreach($lg in $selectedLangs) #set ($field_value = $category.getAttribute($attr,$lg) ) <tr valign="top"> <td><b>$attr</b> (in language <b>$categoryPresenter.getLanguageName($lg)</b>) <br/>$categoryPresenter.printDescription($categoryclass, $attr, $lg)</td> <td>$categoryPresenter.printAttrInput($categoryclass, "${attr}_${lg}", $lang, $field_value)</td> </tr> #end #else #set ($field_value = $category.getAttribute($attr) ) <tr valign="top"> <td><b>$attr</b> <br/>$categoryPresenter.printDescription($categoryclass, $attr, $lang)</td> <td>$categoryPresenter.printAttrInput($categoryclass, $attr, $lang, $field_value) - "$!attr","$!field_value"</td> </tr> #end #end </table> </p> #end #end <hr/> <p> <b>Additional attributes:</b><br> #set ($attrs = $!categoryPresenter.getAdditionalAttributes($!catid) ) <table> #set ($count = 1) #foreach($aname in $attrs) #set ($field_value = $category.getAttribute($aname) ) <tr> <td>$aname</td> <td>$categoryPresenter.printAttrInput($categoryclass, $aname, "", $field_value)</td> </tr> #end </table> <br/> <input type="submit" value="Update Category"/> </form> #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: update.html --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.category/index.html">Category Component</a></em> <h1>Update Category</h1> #if ( $returnCode > 1999 ) <font color="red">Failed Updating Category Object.</font><p> #end <form action="$contextPath/CATEGORY" method="post"> <input type="hidden" name="catid" value="$catid"> <input type="hidden" name="cmd" value="update"> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.category/index.html"> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.category/update.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <hr/> #set($category = $!categoryPresenter.getCategory($catid)) ##set($categoryclass = $category.getCategoryClass()) #set($selectedLangs = $portalRequest.getRequestParameterValues("_languages")) #if(!$selectedLangs) #set($selectedLangs = [$lang]) #end <form action="$contextPath/CATEGORY" method="get"> #foreach($lg in $selectedLangs) <input type="hidden" name="_languages" value="${lg}"/> #end <p> <h2>Change attributes:</h2> <!--table cellspacing="10"> <tr valign="top"> <td><b>Category class</b></td> <td>$categoryPresenter.$categoryPresenter.printDropDown("categoryclass", $categoryclass, "categoryclass", false)</td> <td>Description for category class "$categoryclass": $categoryPresenter.printDescription($categoryclass, null, $lang)</td> </tr> <!--tr valign="top"> <td><b>Item ID</b></td> <td>$itemPresenter.printAttrInput("$!itemclass", "itemid", "$!lang", $itemid, 1, 15, true)</td> <td>$itemPresenter.printDescription("$!itemclass", "itemid", "$!lang")</td> </tr> </table> <!--table cellspacing="10"> #set($CURRENT_ATTR = "title") $portalPresenter.parse("attribute_fields.html", $portalRequest) #set($CURRENT_ATTR = "content") $portalPresenter.parse("attribute_fields.html", $portalRequest)> </table--> </p> <input type="hidden" name="globalid" value="$categoryPresenter.printAttribute($category.getAttribute("globalid"), '$!lang')"/> <input type="hidden" name="updater" value="${userId}"/> <input type="hidden" name="updatetime" value="$categoryPresenter.getCurrentDateTime('$!lang')"/> <input type="hidden" name="creator" value="$categoryPresenter.printAttribute($category.getAttribute("creator"), '$!lang')"/> <input type="hidden" name="creationtime" value="$categoryPresenter.printAttribute($category.getAttribute("creationtime"), '$!lang')"/> <!-- TBD --><input type="hidden" name="_lang" value="${lang}"/> #if(!($categoryclass == "")) #set($attrs = $categoryPresenter.getAttributeNames($categoryclass)) #set($attrs = $categoryPresenter.removeUnchangedAttributes($attrs)) #if(!$attrs.isEmpty()) <hr/> <p> <h3>Further Attributes:</h3> <table cellspacing="10"> #foreach($attr in $attrs) #if($categoryPresenter.isMultiLang($categoryclass, $attr)) #foreach($lg in $selectedLangs) <tr valign="top"> <td><b>$attr</b> (in language <b>$categoryPresenter.getLanguageName($lg)</b>) <br/>$categoryPresenter.printDescription($categoryclass, $attr, $lg)</td> <td>$categoryPresenter.printAttrInput("$!categoryclass", "${attr}_${lg}", "$!lang")</td> </tr> #end #else <tr valign="top"> <td><b>$attr</b> <br/>$categoryPresenter.printDescription("$!categoryclass", "$!attr", "$!lang")</td> <td>$categoryPresenter.printAttrInput("$!categoryclass", "$!attr", "$!lang")</td> </tr> #end #end </table> </p> #end #end #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: create.html --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.category/index.html">Category Component</a></em> <script> function writeValues2FormField(fieldname){ var field = eval('document.myForm.'+fieldname); var values = new Array(); var field_right = eval('document.myForm.'+fieldname+'_right'); for(var i=0; i<field_right.length;i++){ if(field_right.options[i].value == 'dummy_element') continue; values = values.concat(field_right.options[i].value); } field.value = values.join(','); } function moveElements2Left(fieldname){ var field_left = eval('document.myForm.'+fieldname+'_left'); var field_right = eval('document.myForm.'+fieldname+'_right'); //loop over all elements of the right side for(var i=0; i<field_left.length;i++){ if(field_left.options[i].value == 'dummy_element') continue; if(field_left.options[i].selected){ //add this element to the left side var l = field_right.length; field_right.options[l] = new Option(); field_right.options[l].text = field_right.options[l-1].text; field_right.options[l].value = field_right.options[l-1].value; field_right.options[l-1].text = field_left.options[i].text; field_right.options[l-1].value = field_left.options[i].value; // remove this element from the left side var l = field_left.length-1; for(var j = i;j<l;j++){ field_left.options[j].text = field_left.options[j+1].text; field_left.options[j].value = field_left.options[j+1].value; } field_left.options[l] = null; } } for(var i=0; i<field_left.length;i++) field_left.options[i].selected = false; writeValues2FormField(fieldname); } function moveElements2Right(fieldname){ var field_right = eval('document.myForm.'+fieldname+'_right'); var field_left = eval('document.myForm.'+fieldname+'_left'); //loop over all elements of the left side for(var i=0; i<field_right.length;i++){ if(field_right.options[i].value == 'dummy_element') continue; if(field_right.options[i].selected){ //add this element to the right side var l = field_left.length; field_left.options[l] = new Option(); field_left.options[l].text = field_left.options[l-1].text; field_left.options[l].value = field_left.options[l-1].value; field_left.options[l-1].text = field_right.options[i].text; field_left.options[l-1].value = field_right.options[i].value; // remove this element from the right side var l = field_right.length-1; for(var j = i;j<l;j++){ field_right.options[j].text = field_right.options[j+1].text; field_right.options[j].value = field_right.options[j+1].value; } field_right.options[l] = null; } } for(var i=0; i<field_right.length;i++) field_right.options[i].selected = false; writeValues2FormField(fieldname); } </script> <h1>Create Category</h1> #if($categoryclass) <h2>Selected category class is "$categoryclass" ($!categoryPresenter.printDescription($categoryclass, null, $lang)).</h2> #else #set($categoryclass = "category") <h2>No category class was selected, set default class "category".</h2> #end #set($selectedLangs = $portalRequest.getRequestParameterValues("_languages")) #if(!$selectedLangs) #set($selectedLangs = [$lang]) #end #set ($langs = "") #foreach($lg in $selectedLangs) $lg #if($langs == "") #set ($langs = "${lg}") #else #set ($langs = "${langs},${lg}") #end #end #if ( $returnCode > 1999 ) <font color="red">Failed Creating Category Object.</font><p> #end <form action="$contextPath/CATEGORY" method="post" name="myForm"> <input type="hidden" name="categoryclass" value="$!categoryclass"/> <input type="hidden" name="cmd" value="create"> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.category/index.html"> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.category/create.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="lang" value="$!langs"> <!--table cellspacing="10"> #foreach($lg in $selectedLangs) <tr valign="top"> <td><table> <tr><td><b>Title</b></td> <td>(in language <b>$categoryPresenter.getLanguageName("$!lg")</b>)</td></tr> <tr><td colspan="2">$categoryPresenter.printDescription("$!categoryclass", "title", "$!lg")</td></tr> </table></td> <td>$categoryPresenter.printAttrInput("$categoryclass", "title_${lg}", "$!lang", null, 1, 50, false)</td> </tr> #end--> #if(!($categoryclass == "")) #set($attrs = $categoryPresenter.getAttributeNames($categoryclass)) #set($attrs = $categoryPresenter.removeUnchangedAttributes($attrs)) ##set($itemAttrs = $categoryPresenter.getAttributeNames("category")) ##set($attrs = $categoryPresenter.removeDuplicates($attrs, $itemAttrs)) #if(!$attrs.isEmpty()) <hr/> <p> <table cellspacing="10"> #foreach($attr in $attrs) #if($categoryPresenter.isMultiLang($categoryclass, $attr)) #foreach($lg in $selectedLangs) <tr valign="top"> <td><b>$attr</b> (in language <b>$categoryPresenter.getLanguageName("$!lg")</b>) <br/>$categoryPresenter.printDescription($categoryclass, $attr, $lg)</td> <td>$categoryPresenter.printAttrInput("$!categoryclass", "${attr}_${lg}", "$!lang")</td> </tr> #end #else <tr valign="top"> <td><b>$attr</b> <br/>$categoryPresenter.printDescription("$!categoryclass", "$!attr", "$!lang")</td> <td>$categoryPresenter.printAttrInput("$!categoryclass", "$!attr", "$!lang")</td> </tr> #end #end </table> </p> #end #end <hr/> <p> Attributes:<br> <input name="aname1" size="30" value="$!aname1"> = <input name="avalue1" size="30" value="$!avalue1"><br> <input name="aname2" size="30" value="$!aname2"> = <input name="avalue2" size="30" value="$!avalue2"><br> <input name="aname3" size="30" value="$!aname3"> = <input name="avalue3" size="30" value="$!avalue3"><br> <input name="aname4" size="30" value="$!aname4"> = <input name="avalue4" size="30" value="$!avalue4"><br> <input name="aname5" size="30" value="$!aname5"> = <input name="avalue5" size="30" value="$!avalue5"><br> <p> <input type="submit" class="submit" value="Create Category"/> </form> #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: create_start.html --- #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.category/index.html">Category Component</a></em> <h1>Create Category</h1> #if ( $returnCode > 1999 ) <font color="red">Failed Creating Category Object.</font><p> #end <form action="/ADMIN/org.cobricks.category/create.html" method="post"> #if(!$categoryclass) #set($categoryclass = "category") #end <table cellspacing="10"> <tr valign="top"> <td><b>Category class</b></td> <td colspan="2">$categoryPresenter.printDropDown("categoryclass", $categoryclass, "categoryclass", false)</td> </tr> <tr valign="top"> <td><b>Languages</b></td> <td>$categoryPresenter.printDropDown("_languages", $lang, "language", true)</td> <td>(multiple selection possible)</td> </tr> </table> <p> <input type="submit" value="Create Category"/> </form> #parse ( "/ADMIN/pagefooter.html" ) |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:21
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.discussion In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956/org.cobricks.discussion Modified Files: index.html Log Message: Index: index.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.discussion/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.html 2 Jun 2006 12:04:46 -0000 1.3 +++ index.html 17 Nov 2006 13:40:08 -0000 1.4 @@ -1,35 +1,14 @@ -$portalPresenter.parse("$!contextPath/ADMIN/pageheader.html.en",$portalRequest) - -#if ($returnCode == 1005) - <p><div class="success">Item annotation added.</div></p> -#elseif ($returnCode == 1006) - <p><div class="success">Item annotation removed.</div></p> -#elseif ($returnCode == 1007) - <p><div class="success">Item attachment added.</div></p> - -#end +#parse ( "/ADMIN/pageheader.html" ) -<em><a href="$contextPath/ADMIN/index.html">Admin</a> - -<a href="$contextPath/ADMIN/org.cobricks.discussion/index.html">Discussion Component</a></em> +<em><a href="/ADMIN/index.html">Admin</a> - +<a href="/ADMIN/org.cobricks.discussion/index.html">Discussion Component</a></em> <h1>Discussion Component</h1> <h3>Version: $discussionManager.getComponentVersion()</h3> -<h3>Properties</h3> -<form action="/DISCUSSION" method="post"> -<input type="hidden" name="cmd" value="saveProperties"/> -<input type="hidden" name="cmd.success" value="/ADMIN/discussion/index.html"/> -<input type="hidden" name="cmd.error" value="/ADMIN/discussion/index.html"/> -<input type="hidden" name="cmd.noaccess" value="/noaccess.html"/> -<table> -#foreach ($table_line in $discussionPresenter.getAdminPropertiesForm()) - $table_line -#end -</table> -</form> -$portalPresenter.parse("$!contextPath/ADMIN/pagefooter.html.en",$portalRequest) +#parse ( "/ADMIN/pagefooter.html" ) |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:13
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956 Modified Files: pageheader.html Added Files: index.html.en noaccess.html.en style.css Removed Files: index.html Log Message: --- index.html DELETED --- --- NEW FILE: noaccess.html.en --- $portalPresenter.parse("$!contextPath/ADMIN/pageheader.html",$portalRequest) <p> <em><a href="$contextPath/ADMIN/index.html">Admin</a></em> <h1>No access</h1> <p>You do not have the permission to access the requested page or service. Please log in with an account that has the appropriate permissions or contact the platform administrator to have the required permissions assigned to your account.</p> $portalPresenter.parse("$!contextPath/ADMIN/pagefooter.html",$portalRequest) --- NEW FILE: index.html.en --- #parse ( "$contextPath/ADMIN/pageheader.html" ) <p> <em><a href="$contextPath/ADMIN/index.html">Admin</a></em> <h1>Administration</h1> #if ( "$!cmd" == "clearcaches" ) #foreach( $i in $corePresenter.getSortedComponentManagerNames() ) $!velocityContext.get($i).resetCache() #end <div class="success">All caches have been cleared.</div> <p> #end The Cobricks server is running for $corePresenter.getRuntimeDays() days, $corePresenter.getRuntimeHours() hours, and $corePresenter.getRuntimeMinutes() minutes. <p> <form action="$contextPath/ADMIN/index.html" method="POST"> <input type="hidden" name="cmd" value="clearcaches"/> <input type="submit" value="Clear All Caches"/> </form> <p>If the manager web application is enabled in your web application container (e.g. Tomcat) you can restart the whole web application. The following links allow you to access the main functions of the manager application (assuming the context path for the manager application is "/manager"): <ul> <li><a href="/manager/serverinfo">Show server information</a> <li><a href="/manager/list">List web applications</a> <li><a href="/manager/reload?path=$portalRequest.getHttpRequestContextPath()"> Reload web application</a> <li><a href="/manager/sessions?path=$portalRequest.getHttpRequestContextPath()"> Show session statistics</a> </ul> <h2>Components</h2> <p>The following components have been found on the platform: </p> <ul> #foreach( $i in $corePresenter.getSortedComponentManagerNames() ) <li><a href="$contextPath/ADMIN/$!{velocityContext.get($i).getComponentId()}/index.html">$!velocityContext.get($i).getComponentName()</a> $!velocityContext.get($i).getComponentVersion() #end </ul> #parse ( "$contextPath/ADMIN/pagefooter.html" ) --- NEW FILE: style.css --- /* Default font for all pages: */ body,td,textarea,input,select,submit,option { font-size: 11px; font-family: Verdana, Helvetica, Geneva, clean, Swiss, SunSans-Regulars-Regular, sans-serif; line-height: 14px; } /* Headlines for all pages: <h1> is used for all headings in the standard templates <h4> is used only for subheadings in the helpTopic/* pages <h5> is used only once in the helpTopic/* pages <h2>, <h3> and <h6> are currently unused in the standard templates */ h1,h4,h5,h6 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 14px; font-weight: bold; text-decoration: none; color: #0d80c5; } h1 { font-size: 20px; line-height: 22px; } h2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 14px; font-weight: bold; text-decoration: none; color: #0d80c5; } h3 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 14px; font-weight: bold; text-decoration: none; color: #0d80c5; } /* Links and link behavior: */ a:link { text-decoration: none; color: #0d80c5 } a:visited { text-decoration: none; color: #0d80c5 } a:hover { text-decoration: underline; color: #0d80c5 } a.topMenu:link { text-decoration: none; color: 0d80c5 } a.topMenu:visited { text-decoration: none; color: 0d80c5 } a.topMenu:hover { text-decoration: underline; color: 0d80c5 } /* Messages (errors, warnings, .infos) generated by the server: */ .error { color: red; font-weight: bold; } .err { color: red; font-weight: bold; } .info { color: green; font-weight: bold; } .success { color: green; font-weight: bold; } .small { font-size: 8pt; } /* Longer text paragraphs should use this style */ .bodytext { margin-top: 0.6em; margin-bottom: 0.6em; line-height: 1.5; text-align: left; } b { color: #0d80c5; font-weight: bolder; } /* Only used in the left frame for Login, Search etc. */ .bLeft { color: #003366; font-weight: bolder; } /* Improved layout of unordered lists */ ul { margin-top: 0pt; margin-bottom: 0pt; list-style-type: square; } li { margin-top: 4pt; } /* Dotted lines for glossary items: */ u.dottedline { background-image: url("/images/underline.gif"); background-position: 100% 100%; background-repeat: repeat-x; padding-bottom: 0px; text-decoration: none; white-space: nowrap; } /* Modified forms: */ input,textarea { background-color:#f8f8f8; border-style: solid; border-width: 1px; border-color: #0d80c5; color: black; margin: 0px; padding: 0px; } input.submit { border-style: solid; border-width: 1px; color: #000000; background-color:#d0d0d0; border-color: #808080; margin: 0px; margin-top: 4px; margin-bottom: 4px; padding: 0px; } select,option { border-color: #0d80c5; background-color: #f5f5f5; width: auto; margin: 0px; padding: 0px; } img { border: none; } td { border-style: none; } td.border { border-style: solid; } /* stuff from mytum ... */ div.box { margin: 0px; padding-bottom: 8px; } div.box .header { background-color: #366DE0; padding: 0; margin: 0; } div.box h5 { background-color: #366DE0; padding: 2px 8px; color: white; font: bold 90% Verdana, Helvetica, Arial, sans-serif; margin-bottom: 1px; } div.box .title { width: 140px; background-color: #366DE0; border-bottom: none !important; padding: 2px 8px; color: white; font: bold 100% Verdana, Helvetica, Arial, sans-serif; display: block; margin-bottom: 1px solid white; } div.box .title img { padding: 0; margin: 0; float: right; } div.box .body { background-color: #F8F8F8; padding: 8px; color: #333333; font: 80% Verdana, Helvetica, Arial, sans-serif; border-collapse: collapse; border: 1px solid #666666; text-align: left; } div.box .body2 { background-color: #F8F8F8; padding: 8px; color: #333333; font: 80% Verdana, Helvetica, Arial, sans-serif; border: 1px solid #666666; text-align: left; } div.box .bodybig { background-color: #F8F8F8; padding: 8px; color: #333333; font: 100% Verdana, Helvetica, Arial, sans-serif; border-collapse: collapse; border: 1px solid #666666; text-align: left; } div.box .content { padding: 0.5em 0em 0.5em 0em; } div.box .notlast { border-bottom: 1px dotted #B1C7F3; } div.box .last { } .boxNavHeadline { } .boxNavElement { xwhite-space: nowrap; margin: 0.4em 0em; } .boxDetails { text-align: right; color: #666666; } .cal { border: 1px solid #8cacbb; margin: 1em 0em; font-size: 9px; font-family: Verdana, Helvetica, Geneva, clean, Swiss, SunSans-Regulars-Regular, sans-serif; line-height: 10px; } .cal a { font-size: 9px; line-height: 10px; text-decoration: none; } .cal a:hover { text-decoration: none; } .cal th { background-color: #dee7ec; font-weight: bold; text-align: center; padding: 2px; } .cal td { background-color: transparent; width: 1.0em; text-align: right; padding: 2px; font-size: 9px; line-height: 10px; } .cal .weekdays td { background-color: #dee7ec; border: 1px solid #8cacbb; border-style: solid none; text-align: center; padding: 2px; } .cal .event { background-color: #dee7ec; font-weight: bold; } .cal .todayevent { background-color: #dee7ec; border: 1px solid #ffa500; font-weight: bold; } .cal .todaynoevent { border-collapse: collapse; border: 1px solid #ffa500; } #result { border-color: #666666; border-width: 0 0 1px 1px; border-style: solid; width: 100%; border-collapse: collapse; } #result td { border-color: #666666; border-width: 1px 1px 0 0; border-style: solid; margin: 0; padding: 4px; } tr.resulttitle { color: white; font: bold 100% Verdana, Helvetica, Arial, sans-serif; background-color: #366DE0; } Index: pageheader.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/pageheader.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pageheader.html 1 Oct 2004 13:42:49 -0000 1.3 +++ pageheader.html 17 Nov 2006 13:40:07 -0000 1.4 @@ -1,35 +1,35 @@ <html> <head> -$portalPresenter.printHeader($portalRequest, "Cobricks-2 Admin") -<link rel="stylesheet" type="text/css" href="$contextPath/style.css"> +<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> +<title>www.in.tum.de/ADMIN</title> +<base href="$portalRequest.getBaseUrl()"> +<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> +<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> +<meta http-equiv="expires" content="0"> +<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE"> +<META NAME="ROBOTS" CONTENT="NONE"> +<link rel="stylesheet" type="text/css" href="$contextPath/ADMIN/style.css"> <link rel="shortcut icon" href="http://www.cobricks.de/c2.png" type="image/png"> </head> -<body bgcolor="#ffffff" topmargin="1" leftmargin="3" - marginwidth="3" marginheight="1"> +<body bgcolor="#ffffff" topmargin="1" leftmargin="3" marginwidth="3" marginheight="1"> <table border="0" width="100%" cellpadding="4" cellspacing="0"> <tr bgcolor="#dfdfdf"> <td colspan="2" align="right"> -<a href="$contextPath/index.html">Home</a> | -<a href="$contextPath/ADMIN/index.html">Admin</a> | -<a href="$contextPath/info.html">Info</a> +<a href="$contextPath/index.html">Application Home</a> | +<a href="$contextPath/ADMIN/index.html">Admin</a> </td></tr> <tr bgcolor="#dfdfdf"> <td align="left" valign="top" width="160"> <a href="$contextPath/index.html"> -<img border="0" src="$contextPath/images/cobricks2-logo.png" alt="Cobricks-2"></a> +<img border="0" src="$contextPath/ADMIN/images/cobricks2-logo.png" alt="Cobricks-2"></a> </td><td align="left" valign="bottom" width="95%"> <font size="+1"> -Portal Toolkit Administration<br> +<b>Community Portal Administration</b><br> <br> -<a href="$contextPath/index.html">HOME</a> | -<a href="$contextPath/user/index.html">USER</a> | -<a href="$contextPath/item/index.html">ITEM</a> | -<a href="$contextPath/category/index.html">CATEGORY</a> | -<a href="$contextPath/context/index.html">CONTEXT</a> | -<a href="$contextPath/message/index.html">MESSAGE</a> | -<a href="$contextPath/portal/index.html">PORTAL</a> +<a href="$contextPath/index.html">Go back to Application Home</a> | +<a href="$contextPath/ADMIN/index.html">Admin Home</a> </font> </td></tr> </table> @@ -47,64 +47,30 @@ <tr><td> <div class="box"><div class="header"><div class="title"> -Search</div></div> -<div class="body"><div class="content last"> -<span class="boxNavHeadline"> -<div> - -<form method="post"> -<input type="text" name="t" size="'+w+'" title="Please enter the search term in this field"><br> -<select name="m" title="Please select the search domain from this list"> -<option value="items" selected>Items</option> -<option value="persons">Persons</option> -</select> -<input type="submit" value="Ok" title="Start Search"><br> -</form><br> -<img src="$contextPath/images/arrow.png"><a href="">Extended Search</a> - -</div> -</span> -</div></div> - -<p> </p> - -<div class="box"><div class="header"><div class="title"> -Login</div></div> -<div class="body2"><div class="content last"> -<span class="boxNavHeadline"> -<div> - -#if ($userLogin != "anonymous") - -You are logged in as<br> -"<b>$!userLogin</b>" -<p> -<a href="$contextPath/user/user.html?auserlogin=$!userLogin"><img src="$contextPath/images/arrow.png" width="10" height="9" border="0">Your Profile</a><br> -<a href="$contextPath/PORTAL?cmd=logout"><img src="$contextPath/images/arrow.png" width="10" height="9" border="0">Logout</a> - -#else +Admin Quick Links</div></div> +<div class="bodybig"> -<form name="loginForm" action="$contextPath/PORTAL" method="post"> -<INPUT TYPE="hidden" NAME="cmd" VALUE="login"> -<INPUT TYPE="hidden" NAME="cmd.success" VALUE="$contextPath/homepage.html"> -<INPUT TYPE="hidden" NAME="cmd.error" VALUE="$contextPath/homepage.html"> -Login<br> -<input title="Please enter your login name" size="20" name="luserlogin" type="text"><br> -Password<br> -<input title="Please enter your password" size="16" name="luserpw" type="password"> -<input title="Login" value="Login" type="submit"><br> -<input type=checkbox name="autologin" value="auto"> remember login -</form><br> -<img src="$contextPath/images/arrow.png"> -<a title="Send the password in an email" href="">Forgot Password</a><br> -<img src="$contextPath/images/arrow.png"> -<a title="Register as new user" href="$contextPath/user/register.html">Register</a> +You are logged in as:<br> +$userLogin<br> -#end + <br> +<b>User Management</b><br> +- <a href="/ADMIN/org.cobricks.user/search.html">List Users</a><br> +- <a href="/ADMIN/org.cobricks.user/create.html">Create New User</a><br> +- <a href="/ADMIN/org.cobricks.user/roles.html">User Roles</a><br> + <br> +<b>Item Management</b><br> +- <a href="/ADMIN/org.cobricks.item/itemsearch.html">List Items</a><br> +- <a href="/ADMIN/org.cobricks.item/itemcreate_start.html">Create New Item</a><br> + <br> +<b>Category Management</b><br> +- <a href="/ADMIN/org.cobricks.category/search.html">List Categories</a><br> + <br> +<b>Portal Management</b><br> +- <a href="/ADMIN/org.cobricks.portal/browse.html">Browse Pages</a><br> +- <a href="/ADMIN/org.cobricks.portal/create.html">Create Page</a><br> </div> -</span> -</div></div> </td></tr> |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:13
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.item In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956/org.cobricks.item Modified Files: ontology.html Added Files: blog.html.en cal-day.html cal-month.html cal-week.html calendar.html.en index.html.en item.html.en itemcreate.html.en itemcreate_start.html.en itemdelete.html.en itemsearch.html.en itemupdate.html.en template.html templateedit.html Removed Files: index.html Log Message: --- NEW FILE: itemcreate_start.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> <h1>Cobricks-2 - Item Creation</h1> #if($createdItem) <div class="success">Item was successfully created (item id = $!createdItem.getLocalId())</div> #end <p> #set ( $auserid = $userManager.getUserIdForUserLogin($userLogin) ) #if ( $auserid == 0) <div class="error">You have to log in first before you can insert new items.</div> #else <p>For creating new items you <ul> <li>first have to choose the item class and all languages for which you want to enter multilanguage attributes like title (this page) <li>then enter the attributes for the new item (next page) </ul></p> <p>Please choose the item class and the languages now:</p> <form action="$contextPath/ADMIN/org.cobricks.item/itemcreate.html" method="get"> #if(!$itemclass) #set($itemclass = "item") #end <table cellspacing="10"> <tr valign="top"> <td><b>Item class</b></td> <td colspan="2">$itemPresenter.printDropDown("itemclass", $itemclass, "itemclass", false)</td> </tr> <tr valign="top"> <td><b>Languages</b></td> <td>$itemPresenter.printDropDown("_languages", $lang, "language", true)</td> <td>(multiple selection possible)</td> </tr> </table> <br/> <input type="submit" value="Display item creation form"/> </form> </p> #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: itemsearch.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> <h1>Item Search</h1> #if($returnCode == 1002) <p><div class="success">Successfully deleted item.</div></p> #elseif ($returnCode == 2002) <p><div class="error">Failed deleting item "$!itemid".</div></p> #end #if ("$!query"!="") #if ("$!query"=="xpath") #set ($iresult = $itemManager.searchItems("$!xPathQuery")) #else #set ($iresult = $itemPresenter.searchItems("$!qtext","$!qitemclass","$!qcategory","$!qcreator","creationtime","$!qolder","","$!qsortby",30)) #end #if ("$!iresult"=="") <h3>No items found</h3> <div class="error">There were no items matching the query.</div> <p> #else <h3>$iresult.size() items found</h3> <b>Your query returned the following results:</b> <ul> #foreach ($item in $iresult) #set ( $itemclass = $item.getAttribute("itemclass") ) #set ($title = false) #set ($title = $item.getTitle()) #if ($title) <li><img alt=- src="$itemPresenter.getItemTypeIcon($!itemclass)"> <a href="item.html?itemid=$item.getId()&fromSearch=true">$title</a> #else <li><img alt=- src="$itemPresenter.getItemTypeIcon($!itemclass)"> <a href="item.html?itemid=$item.getId()&fromSearch=true">no titele</a> #end #set ( $accedit = $userPresenter.checkPermission($userId, "item", "update", $item) ) #set ( $accdel = $userPresenter.checkPermission($userId, "item", "delete", $item) ) #if ( "$!accedit" == "true" ) - <a href="/ADMIN/org.cobricks.item/itemupdate.html?itemid=$item.getId()"><i>edit</i></a> #end #if ( "$!accdel" == "true" ) - <a href="/ITEM?cmd=deleteitem&cmd.success=/ADMIN/org.cobricks.item/itemsearch.html&cmd.error=/ADMIN/org.cobricks.item/itemsearch.html&itemid=$item.getId()&itemclass=$!itemclass"><i>delete</i></a> #end </li> #end </ul> #end #end ## Show a textarea where the user can enter its query ## This query is then processed by the ItemServlet <p> <form action="$contextPath/ADMIN/org.cobricks.item/itemsearch.html" method="get"> <input type="hidden" name="query" value="t" /> <table> <tr><td><b>Typ:</b></td></tr> <tr><td> <select name="qitemclass" size="1"> $itemPresenter.printDropDown($qitemclass, "itemclass")</td> <option value="">-- any --</option> </select> </td></tr> <tr><td colspan=2><b>Search text:</b></td></tr> <tr><td colspan=2><input type="text" name="qtext" value="$!qtext" size="40"></td></tr> <tr><td><b>Not older than:</b></td> <td><b>Sort by:</b></td></tr> <tr><td><select size="1" name="qolder"> <option value="">--- any ---</option> <option value="now-1">one day</option> <option value="now-14">one week</option> <option value="now-31" selected="true">one month</option> <option value="now-365">one year</option> </select></td> <td><select size="1" name="qsortby"> <option value="title">title</option> <option value="author">author</option> <option value="creationtime">creationtime</option> <option value="updatetime">updatetime</option> </select></td></tr> <tr><td colspan=2><b>In the categories:</b></td></tr> <tr><td colspan=2> <select size="10" name="qcategory" multiple="true"> $itemPresenter.getCategoryOptions("community","$lang") </select> </td></tr> <tr><td colspan=2><b>Published by user (Login name):</b></td></tr> <tr><td colspan=2><input type="text" name="qcreator" value="$!qcreator" size="20"> </td></tr> </table> <input type="submit" value="Search"/> </form> <hr> <p>Alternatively to searching by different attributes with the form above, you also can specify a Cobricks XPath search string. </p> <form action="/ADMIN/org.cobricks.item/itemsearch.html" method="post"> <input type="hidden" name="query" value="xpath" /> <table> <tr> <td><b>Please enter your (xpath) query here:</b></td> </tr> <tr> <td><textarea name="xPathQuery" cols="80" rows="5"> $!xPathQuery </textarea></td> </tr> </table> <input type="submit" value="Search by XPath"/> </form> <p>Examples for queries are:</p> <pre> /item[itemclass='item'] /item[itemclass='portalpage' and name='index.html'] /item[itemclass='portalpage'] and /item/folders/category/id=12 </pre> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: cal-day.html --- #parse ( "pageheader.html" ) <em><a href="index.html">Item Component</a> - <a href="cal-day.html">Day View</a></em> <h1>Day View</h1> <p> $calendarPresenter.printDayCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </p> #parse ( "pagefooter.html" ) --- NEW FILE: calendar.html.en --- #parse ( "pageheader.html" ) <em><a href="index.html">Item Component</a> - <a href="calendar.html">Calendar</a></em> <h1>Calendar</h1> <table width="100%" border="0"> <tr><td valign="top" width="90%"> The Item Component offers the possibility to store dated items, i.e. items that have a startdate and an enddate attached. Using the CalenderPresenter these items can be displayed in a (HTML-)calendar layout. This page shows the different views that are supported by the CalendarPresenter. </td><td valign="top"> </td><td valign="top"> $calendarPresenter.printSmallMonthCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </td></tr> </table> <p> <h3>Month View</h3> <p> $calendarPresenter.printMonthCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </p> <h3>Week View</h3> <p> $calendarPresenter.printWeekCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </p> <h3>Day View</h3> <p> $calendarPresenter.printDayCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </p> #parse ( "pagefooter.html" ) --- NEW FILE: cal-month.html --- #parse ( "pageheader.html" ) <em><a href="index.html">Item Component</a> - <a href="cal-month.html">Month View</a></em> <h1>Month View</h1> <p> $calendarPresenter.printMonthCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </p> #parse ( "pagefooter.html" ) --- NEW FILE: index.html.en --- #parse ( "$contextPath/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> <h1>Item Component</h1> The following admin actions are available for the item component: <ul> <li><a href="itemsearch.html">Search and edit items</a> <p> <li><a href="itemcreate.html">Create item</a> <p> <li><a href="ontology.html">Show item ontology</a> </ul> #parse ( "$contextPath/ADMIN/pagefooter.html" ) --- NEW FILE: templateedit.html --- #foreach($lg in $selectedLangs) <input type="hidden" name="_languages" value="${lg}"/> #end <table cellspacing="10"> #foreach($lg in $selectedLangs) <tr valign="top"> <td><table> <tr><td><b>Title</b></td> <td>(in <b>$itemPresenter.getLanguageName($lg)</b>)</td></tr> <tr><td colspan="2">$itemPresenter.printDescription($itemclass, "title", $lg)</td></tr> </table></td> <td>$itemPresenter.printAttrInput("item", "title_${lg}", $lang, $velocityContext, 1, 50, false)</td> </tr> #end #foreach($lg in $selectedLangs) <tr valign="top"> <td><table> <tr><td><b>Content</b></td> <td>(in <b>$itemPresenter.getLanguageName($lg)</b>)</td></tr> <tr><td colspan="2">$itemPresenter.printDescription($itemclass, "content", $lg)</td></tr> </table></td> <td>$itemPresenter.printAttrInput($itemclass, "content_${lg}", $lang, $velocityContext, 15, 80, false)</td> </tr> #end </table> <table cellspacing="10"> <tr><td><b>State</b><br/>$itemPresenter.printDescription($itemclass, "state", $lang)</td> <td>$itemPresenter.printDropDown("state", "$!state", "state", false)</td></tr> <tr><td><b>Location</b><br/>$itemPresenter.printDescription($itemclass, "location", $lang)</td> <td>$itemPresenter.printAttrInput($itemclass, "location", $lang, "$!location", 1, 50, false)</td> </tr> <tr><td><b>Origin</b><br/>$itemPresenter.printDescription($itemclass, "origin", $lang)</td> <td>$itemPresenter.printAttrInput($itemclass, "origin", $lang, "$!origin", 1, 50, false)</td> </tr> <tr><td><b>URL</b><br/>$itemPresenter.printDescription($itemclass, "url", $lang)</td> <td>$itemPresenter.printAttrInput($itemclass, "url", $lang, "$!url", 1, 50, false)</td></tr> <tr><td><b>ImageURL</b><br/>$itemPresenter.printDescription($itemclass, "imageurl", $lang)</td> <td>$itemPresenter.printAttrInput($itemclass, "imageurl", $lang, "$!imageurl", 1, 50, false)</td></tr> <tr><td><b>Expiration<br/>time</b><br/>$itemPresenter.printDescription($itemclass, "expirationtime", $lang)</td> <td>$itemPresenter.printAttrInput($itemclass, "expirationtime", $lang, "$!expirationtime", 1, 20, false)</td></tr> </table> </p> <p> <table border="0"><tr><td valign="top"> <b>Categories</b> </td><td valign="top"> $categoryPresenter.printCategorySelection("categories", "", "$lang"); </td> </tr></table> </p> #if(!($itemclass == "item")) #set($attrNames = $itemPresenter.getAttributeNames($itemclass)) #set($itemAttrs = $itemPresenter.getAttributeNames("item")) #set($attrNames = $itemPresenter.removeDuplicates($attrNames, $itemAttrs)) #set($attrNames = $corePresenter.sortList($attrNames) ) #if(!$attrNames.isEmpty()) <hr/> <p> <h3>Further Attributes:</h3> <table cellspacing="10"> #foreach($attr in $attrNames) #if($itemPresenter.isMultiLang($itemclass, $attr)) #foreach($lg in $selectedLangs) <tr valign="top"> <td><b>$attr</b> (in <b>$itemPresenter.getLanguageName($lg)</b>) <br/>$itemPresenter.printDescription($itemclass, $attr, $lg)</td> <td>$itemPresenter.printAttrInput($itemclass, "${attr}_${lg}", $lang, $velocityContext)</td> </tr> #end #else <tr valign="top"> <td><b>$attr</b> <br/>$itemPresenter.printDescription($itemclass, $attr, $lang)</td> <td>$itemPresenter.printAttrInput($itemclass, $attr, $lang, $velocityContext)</td> </tr> #end #end </table> </p> #end #end --- NEW FILE: item.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> #set ($lang = "de") #set($selectedLangs = $portalRequest.getRequestParameterValues("_languages")) #if(!$selectedLangs) #set ($selectedLangs = [$lang]) #end #set($item = $itemPresenter.getItem($itemid)) #if(!$item) <h1>Item Details</h1> <div class="error">Item with id "$!itemid" does not exist.</div> #else #set($itemclass = $item.getItemClass()) #set ( $itemname = $itemManager.getOntology().getClass("$itemclass").getDescription("de") ) #if ("$!itemname"=="") #set ($itemname = "Item") #end #if ( $itemclass!="fww") <h3>$itemname</h3> #end #if ($returnCode == 1005) <p><div class="success">Added annotation.</div></p> #elseif ($returnCode == 1006) <p><div class="success">Removed annotation.</div></p> #elseif ($returnCode == 1007) <p><div class="success">Added attachment.</div></p> #elseif ($returnCode == 1008) <p><div class="success">Removed attachment.</div></p> #elseif ($returnCode == 2005) <p><div class="error">Failed adding annotation.</div></p> #elseif ($returnCode == 2006) <p><div class="error">Failed removing annotation.</div></p> #elseif ($returnCode == 2007) <p><div class="error">Failed adding attachment.</div></p> #elseif ($returnCode == 2008) <p><div class="error">Failed removing attachment.</div></p> #end ## Print this item in the language the user has specified or, if no ## language was specified, print out the item in the default language #if (!$language) #set($language = $lang) #end ## get item display template defined in the properties #set ($itemtemplate = $itemPresenter.getItemTemplate("details", $item)) <p> $portalPresenter.parse("$itemtemplate",$portalRequest,"/ADMIN/org.cobricks.item/template.html")<br> <div align="right"><form action="/ADMIN/org.cobricks.item/itemupdate.html" method="get"> <input type="hidden" name="itemid" value="$itemid"> <input type="submit" value="Editieren"></form></div> </p> #if ("$!itemdisplayattachments"!="false") ## Print attachments <table border="1pt" width="100%" cellspacing="0pt" cellpadding="4pt"> <tr bgcolor="#eeeeee"> <td> <h3>Attachments:</h3> <ul> #foreach ($ia in $item.getAttachments()) <li>$!ia.getTitle() (<a href="/ITEM?cmd=geta&aid=$!ia.getId()">$!ia.getMimeType()</a>): $!ia.getComment() by $ia.getPublisherId() - <a href="$contextPath/ITEM?cmd=removeattachment&cmd.success=$contextPath/ADMIN/org.cobricks.item/item.html&cmd.error=$contextPath/ADMIN/org.cobricks.item/item.html&itemid=$itemid&itemaid=$ia.getId()">delete</a> #end </ul> <p>Add new attachment:<br/> <form action="$contextPath/ITEM" method="post" enctype="multipart/form-data"> <input type="hidden" name="itemid" value="$itemid"> <input type="hidden" name="cmd" value="addattachment"> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.item/item.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.item/item.html"> <table border="0"> <tr><td>Title:</td><td><input type="text" size="30" name="_fileTitle"></td></tr> <tr><td>Comment:</td><td><input type="text" size="60" name="_fileComment"></td></tr> <tr><td>File:</td><td><input type="file" name="_file"></td></tr> </table> <input type="submit" value="Add Attachment"/> </form> </td></tr></table> <br/> #end #if ("$!itemdisplayannotations"!="false") ## Print annotations and a form to insert annotations <table border="1pt" width="100%" cellspacing="0pt" cellpadding="4pt"> <tr bgcolor="#eeeeee"> <td> <h3>Annotations:</h3> <ul> #foreach ($ia in $item.getAnnotations()) <li>$!ia.getTitle() ($ia.getId()): $!ia.getContent(), rating = $!ia.getRating() by $ia.getCreatorId() - <a href="$contextPath/ITEM?cmd=removeannotation&cmd.success=$contextPath/ADMIN/org.cobricks.item/item.html&cmd.error=$contextPath/ADMIN/org.cobricks.item/item.html&itemid=$itemid&itemaid=$ia.getId()">delete</a> #end </ul> <p>Add new annotation:<br/> <form action="$contextPath/ITEM"> <input type="hidden" name="itemid" value="$itemid"> <input type="hidden" name="cmd" value="addannotation"> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.item/item.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.item/item.html"> <table border="0"> <tr><td>Title:</td><td><input type="text" size="30" name="title"></td></tr> <tr><td>Content:</td><td><input type="text" size="60" name="content"></td></tr> <tr><td>Rating:</td><td> $portalPresenter.printSelect("rating", "0,1,2,3,4,5", "0,1,2,3,4,5", "$!rating") </td></tr> </table> <input type="submit" value="Add Annotation"/> </form> </td></tr></table> <br/> #end #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: itemupdate.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> #set ($lang = "de") #set($selectedLangs = $portalRequest.getRequestParameterValues("_languages")) #if(!$selectedLangs) #set ($selectedLangs = [$lang]) #end #set ( $auserlogin = $userLogin ) #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ( $auser = $userManager.getUser($auserid)) #if($createdItem) #set($itemid= $!createdItem.getLocalId()) #set($item = $itemManager.getItem($itemid)) #elseif($itemid) #set($item = $itemPresenter.getItem($itemid)) #end #if("$!item"=="") <h1>Edit Item</h1> <p><div class="error">Item with id "$!itemid" does not exist.</div></p> #else #set ($itemclass = $item.getItemClass()) #set ($itemname = $itemManager.getOntology().getClass("$itemclass").getDescription("de") ) #if ("$!itemname"=="") #set ($itemname = "Item") #end <h1>Edit $!itemname</h1> #if ("$!returnCode" == "1003") <div class="success">Successfully updated item.</div><br/> #elseif("$!returnCode" == 2003) <div class="error">Failed updating item: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul> #end #set ($acc = $userPresenter.checkPermission("$auserid", "item", "update", "itemid=$itemid")) #if ($acc == "false") <div class="error"> You do not have sufficient access permissions to edit the item with id "$!itemid". </div> #else #set($itemclass = $item.getItemClass()) <form action="$contextPath/ITEM" method="get"> <input type="hidden" name="itemid" value="$!itemid"> <input type="hidden" name="cmd" value="updateitem"/> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.item/itemupdate.html"/> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.item/itemupdate.html"/> #foreach($lg in $selectedLangs) <input type="hidden" name="_languages" value="${lg}"/> #end #set ($itemtemplate = $itemPresenter.getItemEditTemplate("$!itemclass")) $itemPresenter.setItemAttrInContext($item, $velocityContext) $portalPresenter.parse("$itemtemplate",$portalRequest,"/ADMIN/org.cobricks.item/templateedit.html") <p> <input type="submit" value="Update $itemname"/> </p> </form> <div align="right"> <form action="$contextPath/ITEM" method="get"> <input type="hidden" name="cmd" value="deleteitem"/> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.item/itemdelete.html"/> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.item/itemdelete.html"/> <input type="hidden" name="itemid" value="$itemid"/> <input type="submit" value="Delete item"/> </form></div> #end #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: itemdelete.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> <h1>Delete Item</h1> #if ($returnCode == 1002) <p><div class="success">Item "$itemid" successfully deleted.</div></p> #elseif ($returnCode == 2002) <p><div class="error">Failed deleting item "$!itemid".</div></p> #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- index.html DELETED --- --- NEW FILE: cal-week.html --- #parse ( "pageheader.html" ) <em><a href="index.html">Item Component</a> - <a href="cal-week.html">Week View</a></em> <h1>Week View</h1> <p> $calendarPresenter.printWeekCalendarAsHtml($!datestring, $!catids, "en", "cal-day.html", "cal-week.html", "cal-month.html") </p> #parse ( "pagefooter.html" ) --- NEW FILE: itemcreate.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> #set ($lang = "de") #set($selectedLangs = $portalRequest.getRequestParameterValues("_languages")) #if(!$selectedLangs) #set ($selectedLangs = [$lang]) #end #set ( $auserlogin = $userLogin ) #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ( $auser = $userManager.getUser($auserid)) #if ("$!author"=="") #set ($author = $auser.getName()) #end #if("$!itemclass"=="") #set($itemclass = "item") #end #set ( $itemname = $itemManager.getOntology().getClass("$itemclass").getDescription("de") ) #if ("$!itemname"=="") #set ($itemname = "Item") #end <h1>Publish $!itemname</h1> #if($returnCode == 2001) <div class="error">Failed publishing item: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul></div><br/> #end #set ($acc = $userPresenter.checkPermission($auserid, "item", "create", "itemclass=$!itemclass") ) #if ($acc == "false") <div class="error"> You do not have sufficient permissions to publish an item of type "$itemclass". </div> #else <form action="$contextPath/ITEM" method="post" enctype="multipart/form-data"> <input type="hidden" name="itemclass" value="${itemclass}"/> <input type="hidden" name="cmd" value="createitem"/> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.item/index.html"/> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.item/itemcreate.html"/> <input type="hidden" name="cmd.noaccess" value="$contextPath/ADMIN/noaccess.html"/> <input type="hidden" name="creator" value="${auserid}"/> #foreach($lg in $selectedLangs) <input type="hidden" name="_languages" value="${lg}"/> #end #set ($itemtemplate = $itemPresenter.getItemEditTemplate("$!itemclass")) $portalPresenter.parse("$itemtemplate",$portalRequest,"/item/templateedit.html") <p> <input type="submit" value="Publish $itemname"/> </p> <hr/> <h2>Add attachment</h2> <table> <tr valign="top"> <td><b>Title: </b></td> <td>$itemPresenter.printNewAttrInput("_fileTitle", "$!_fileTitle", 20)</td> </tr><tr> <td><b>Comment: </b></td> <td>$itemPresenter.printNewAttrInput("_fileComment", "$!_fileComment", 80)</td> </tr> <tr> <td><b>File</b></td> <td><input type="file" name="_file" value="$!_file"></td> </tr> </table> </p> <h2>Add annotation</h2> <table> <tr><td>Title:</td><td><input type="text" size="30" name="_annTitle" value="$!_annTitle"></td></tr> <tr><td>Content:</td><td><input type="text" size="60" name="_annContent" value="$!_annContent"></td></tr> <tr><td>Rating:</td><td> $portalPresenter.printSelect("_annRating", "0,1,2,3,4,5", "0,1,2,3,4,5", "$!rating") </td></tr> </table> </p> <p> <input type="submit" value="Publish $itemname with attachments and annotation"/> </p> </form> #end $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: blog.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Item Component</a> - <a href="blog.html">Blog Example</a></em> <h1>Item Component - Blog</h1> <p>Using the item component it is possible to provide "Blog-like" functionality. This page demonstrates this.</p> <p>TBD: this currently is just how it should look like ...</p> <p>Below are the 20 most recent journal entries:</p> <center> <a href="">[<< Previous 20]</a> </center> <h3>Wednesday, June 29th, 2005</h3> <table><tr> <td><font size="-1"><em>14:22</em></font></td> <td><b>Title of contribution</b><br> Text of contribution. This can be longer than just a few words. It can be several lines and even more. It is hard to come up with text just to demonstrate this. <p> And there can be even several paragraphs. Like this one. This should be the second paragraph, just following the first one, well, that should do it now. <p align="right"> <font size="-1">(<a href="">2 Comments</a> | <a href="">Comment on this</a>)</font> <p> TBD <pre> layout: titel datum content Erstellt von <X> um X in folgenden Katgorien <X>, <X> <Kommentieren> </pre> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) Index: ontology.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.item/ontology.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ontology.html 11 Feb 2004 14:39:29 -0000 1.1 +++ ontology.html 17 Nov 2006 13:40:08 -0000 1.2 @@ -2,13 +2,10 @@ #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - -<a href="/ADMIN/org.cobricks.item/index.html">Item Component</a> - -<a href="/ADMIN/org.cobricks.item/ontology.html">Ontology</a></em> - +<a href="/ADMIN/org.cobricks.item/index.html">Item Component</a></em> <h1>Item Ontology</h1> - #foreach ( $o in $itemManager.getOntology().getClasses() ) <p><h3><b>$o.getName()</b> #set ( $tmp = $!corePresenter.getOntologyClassParentName($o) ) @@ -35,5 +32,4 @@ </table> #end - #parse ( "/ADMIN/pagefooter.html" ) --- NEW FILE: template.html --- ## default item display (if no special display was defined in the ## properties ## Divide the attributes of this item into two categories: ## 1. The standard attributes (standardAttrs): Attributes that are ## defined in the ontology ## 2. The additional attributes (additionalAttrs): Attributes that ## aren't defined in the item ontology #set($map = $itemPresenter.categorizeItemAttributes($item)) #set($standardAttrs = $map.get("standard")) #set($additionalAttrs = $map.get("additional")) <table border="1" cellspacing="0pt" cellpadding="5pt" width="100%"> <tr><td> #set($imageurl = $standardAttrs.get("imageurl")) #if("$!imageurl"!="") <img align="right" valign="top" width="80" src="$imageurl"/> #end #set($title = $item.getTitle("$!lang")) #if("$!title"!="") <b>$title</b> #else <b>$item.getTitle()</b> <br><font size="-2">(Kein Titel in der angefragten Sprache "$lang" verfügbar.)</font> #end <br/> #set($creator = $item.getAttribute("creator")) #set($creationtime = $item.getAttribute("creationtime")) #if($creator) (von <a href="$contextPath/user/user.html?auserlogin=$userPresenter.getUserLogin($creator)">$userPresenter.getUserName($creator)</a> #if("$!creationtime"!="") , at $portalPresenter.dateFormat("$!lang", $creationtime) #end ) #elseif($creationtime) (at $portalPresenter.dateFormat("$!lang", $creationtime)) #end <p> #set($location = $standardAttrs.get("location")) #if("$!location"!="") <b>Location:</b> $location<br/><br/> #end #set($expirationtime = $standardAttrs.get("expirationtime")) #if($expirationtime) Expiration Date: $portalPresenter.dateFormat("$!lang", $expirationtime)<br/><br/> #end <table width="95%"><tr bgcolor="#dfdfdf" width="100%"><td> #set($content = $item.getContent("$!lang")) #if("$content"!="") <pre>$content </pre> #else $item.getContent() <br/><font size="-2">(Kein Inhalt in der angefragten Sprache "$lang" verfügbar.)</font> #end </td></tr></table><br/> #set($uri = $standardAttrs.get("url")) #if("$!uri"!="") Link to additional information:<br/> <a href="$uri">$uri</a><br/><br/> #end #set($updater = $item.getAttribute("updater")) #set($updatetime = $item.getAttribute("updatetime")) #if($updater) Last update by <a href="$contextPath/user/user.html?auserlogin=$userPresenter.getUserLogin($updater)"> $userPresenter.getUserName($updater)</a> #if($updatetime) , at $portalPresenter.dateFormat("$!lang", $updatetime) #end <br/> #elseif($updatetime) Last update at $portalPresenter.dateFormat("$!lang", $updatetime)<br/> #end <p>Categories: <ul> #foreach ($c in $standardAttrs.get("categories")) #if ("$!c"!="0") <li>$categoryPresenter.getCategory($c).getTitle("$!lang") #end #end #if (!$standardAttrs.get("categories")) <li>no categories #end </ul> ## Enable the user to choose the language in which this item should ## be displayed <br/><p> <form action="item.html" method="get"> <input type="hidden" name="itemid" value="$itemid"> $itemPresenter.printDropDown("language", $lang, "language", false) <input type="submit" value="Show attributes for different language"/> </form> <br/> ## Print all standard attributes #if($standardAttrs) <hr/><h3>All standard attributes for this item class:</h3> </p> $itemPresenter.printAttrs($standardAttrs, $map.get("ontClass"), "$!lang") #end <br/> ## Print the additional attributes #if($additionalAttrs) <hr/><h3>Additional attributes:</h3> $itemPresenter.printAdditionalAttrs($additionalAttrs, "$!lang") #end <br/> </td></tr> </table> |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:13
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956/org.cobricks.portal Added Files: browse.html.en create.html.en createbin.html.en createfolder.html.en createwiki.html.en default.gif delete.html.en document.gif edit.html.en editbin.html.en historywiki.html.en index.html.en list.html.en listbin.html.en listwiki.html.en page-template.html template-date.html wiki.html.en wikihelp.html.en Removed Files: index.html Log Message: --- NEW FILE: list.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>List HTML Portal Objects</h1> #if ( $returnCode == 1010 ) <p><div class="success">Successfully deleted portal object.</div></p> #end <!-- tbd: "op=useronly", then only show pages editable by current user --> List of HTML pages stored in the item database: <ul> #foreach( $i in $itemManager.searchItems("/item[itemclass='portalpage']") ) <li><a href="$i.getPagePath()$i.getPageName()">$i.getPagePath()$i.getAttribute("name")</a>, id=$i.getId() - <a href="edit.html?itemid=$i.getId()">edit</a> - <a href="delete.html?itemid=$i.getId()">delete</a></li> #end </ul> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: wikihelp.html.en --- <h1>Wiki Help</h1> <p>This document describe the Wiki elements which can be used in a Wiki-page</p> <h2>Text formatting</h2> <table border="1"> <tr> <th>Commands to enter</th> <th>What will be displayed</th> </tr> <tr> <td>''italic''</td> <td><i>italic</i></td> </tr> <tr> <td>''bold''</td> <td><b>bold</b></td> </tr> <tr> <td>'''''bolditalic'''''</td> <td><b><i>bolditalic</i></b></td> </tr> <tr> <td>== caption ==</td> <td><h2>caption<h2></td> </tr> <tr> <td>=== caption 2 ===</td> <td><h3>caption 2</h3></td> </tr> <tr> <td> * one<br /> * two<br /> ** two-one<br /> ** two-two<br /> * three<br /> </td> <td> <ul> <li>one</li> <li>two</li> <ul> <li>two-one</li> <li>two-two</li> </ul> <li>three</li> </ul> </td> </tr> <tr> <td> # one<br /> # two<br /> ## two-one<br /> ## two-two<br /> # three<br /> </td> <td> <ol> <li>one</li> <li>two</li> <ol> <li>two-one</li> <li>two-two</li> </ol> <li>three</li> </ol> </td> </tr> <tr> <td> Normal text<br /> : intended<br /> :: double intended </td> <td> Normal text <dl> <dd>indented</dd> <dl> <dd>double intended</dd> </dl> </dl> </td> </tr> <tr> <td><!-- unvisible comment --></td> <td> </td> </tr> <tr> <td><nowiki>No ''Wiki-[[Syntax]]''</nowiki></td> <td>No ''Wiki-[[Syntax]]''</td> </tr> </table> <h2>Links</h2> <table border="1"> <tr> <th>Commands to enter</th> <th>What will be displayed</th> </tr> <tr> <td>A simple link to the [[wikihelp]].</td> <td>A simple link to the <a href="$portalRequest.getBaseUrl()wikihelp.html">wikihelp</a></td> </tr> <tr> <td>The same link with another name [[wikihelp|Help for WIKIs]].</td> <td>The same link with another name <a href="$portalRequest.getBaseUrl()wikihelp.html"> Help for WIKIs</a></td> </tr> <tr> <td> Weblinks:<br /> * [[http://www.google.de/]] - description<br /> * [[http://www.google.de/|Google]] </td> <td> Weblinks:<br /> <a href="http://www.google.de/">http://www.google.de/</a> - description<br /> <a href="http://www.google.de/">Google</a> </td> </tr> </table> <h2>Images</h2> <table border="1"> <tr> <th>Commands to enter</th> <th>What will be displayed</th> </tr> <tr> <td>[[:img:wikibild.jpg|Wikibild]]</td> <td><img src="$portalRequest.getBaseUrl()/wikibild.jpg" alt="Wikibild"></td> </tr> </table> <h2>Abbreviations</h2> <table border="1"> <tr> <th>Commands to enter</th> <th>What will be displayed</th> </tr> #set ( $linkMap = $portalRequest.getLinkAbbreviations() ) #set ( $keys = $linkMap.keySet() ) #foreach($key in $keys) <tr> <td>$key</td> <td>$linkMap.get($key)</td> </tr> #end </table> --- NEW FILE: template-date.html --- #set($format = $portalPresenter.getDateTimeFormatter($language, true)) <table border="1pt" cellpadding="5pt" width="100%"> <tr><td> #set($imageurl = $item.getAttributeAsString("imageurl")) #if("$!imageurl"!="") <img align="right" valign="top" width="80" src="$imageurl"/> #end #set($title = $item.getTitle("$!language")) #if($title) <b>$title</b> #else <b>$item.getTitle()</b> <br><font size="-2">(Kein Titel in der angefragten Sprache $language verfügbar.)</font> #end <br/> #set($creator = $item.getAttribute("creator")) #set($creationtime = $item.getAttribute("creationtime")) #if($creator) (von <a href="$contextPath/user/user.html?auserlogin=$creator.getUserLogin()">$creator.getName()</a> #if("$!creationtime"!="") , am/um $format.format($creationtime) #end ) #elseif($creationtime) (am/um $format.format($creationtime)) #end <p> <table width="95%"><tr bgcolor="#dfdfdf" width="100%"><td> #set($content = $item.getContent("$!language")) #if("$content"!="") <pre>$content </pre> #else $item.getContent() <br/>(Kein Inhalt in der angefragten Sprache "$language" verfügbar.) #end </td></tr></table><br/> #set($location = $item.getAttributeAsString("location")) #if("$location"!="") <b>Ort:</b> $location<br/><br/> #end #set($expirationtime = $item.getAttribute("expirationtime")) #if($expirationtime) Verfallsdatum: $format.format($expirationtime)<br/><br/> #end #set($uri = $item.getAttributeAsString("url")) #if($uri) Link zu zusätzlicher Information:<br/> <a href="$uri">$uri</a><br/><br/> #end #set($updater = $item.getAttribute("updater")) #set($updatetime = $item.getAttribute("updatetime")) #if($updater) Letzte Aktualisierung durch <a href="$contextPath/user/user.html?auserlogin=$updater.getUserLogin()"> $updater.getName()</a> #if($updatetime) , am/um $format.format($updatetime) #end <br/> #elseif($updatetime) Letzte Aktualisierung am/um $format.format($updatetime)<br/> #end <p>Kategorien, denen die Mitteilung zugeordnet ist: <ul> #foreach ($c in $item.getAttribute("categories")) <li>$c.getTitle($language) #end #if (!$item.getAttribute("categories")) <li>keine Kategorien #end </ul> </td></tr> </table> --- index.html DELETED --- --- NEW FILE: edit.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>Edit Portal Page</h1> ## TBD: check access rights ... #if ( $returnCode == 1103 ) <p><div class="success">Successfully updated portal page.</div></p> #elseif ( $returnCode == 1101 ) <p><div class="success">Successfully created portal page.</div></p> #elseif ( $returnCode > 1999 ) <p><div class="error">Failed updating portal page. #if ($errors) <div class="error">The following error(s) ocurred: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul></div><br/> #end #end #if ("$!_submit" == "Reset Page Update History") $portalManager.resetPageUpdateHistory($corePresenter.parseInt($itemid)) <p><div class="success">Reset Page Update History.</div></p> #end #set ( $page = $portalPresenter.getPage($itemid) ) <form action="$contextPath/PORTAL" method="post" enctype="multipart/form-data"> <input type="hidden" name="cmd" value="update"> <input type="hidden" name="cmd.success" value="/ADMIN/org.cobricks.portal/edit.html"> <input type="hidden" name="cmd.error" value="/ADMIN/org.cobricks.portal/edit.html"> <input type="hidden" name="itemid" value="$itemid"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <table> <tr><td width="80%" valign="top"> <table width="100%"> #set ( $name = $page.getPageName() ) <tr><td> Name: <input type="text" name="name" value="$!name" size="45"/> <p> <b>itemclass: $page.getAttribute("ontologyclassname")</b> </p> </td></tr> #if ("$!_submit" == "Add Language") #set ( $lg = ${_addlang} ) #set ( $title = $page.getAttribute("title_$lg") ) #set ( $content = $page.getPageContent("$lg") ) <input type="hidden" name="plang" value="$lg"> <tr><td> <table border="1" bgcolor="#eeeeee"><tr><td> Title ($lg): <input type="text" name="title_$lg" size="60" value="$!title"><br/> Content ($lg):<br> <textarea name="content_$lg" rows="15" cols="70" wrap="off"> $!content </textarea><br> Upload content from file: <input type="file" name="_file$lg"><br/> </td></tr></table> </td></tr> #end #set ( $langs = $page.getUsedLanguages() ) #foreach( $lg in $langs ) #set ( $title = $page.getAttribute("title_$lg") ) #set ( $content = $itemPresenter.getContentVersion("$!itemid", $lg, "$!versionid") ) <input type="hidden" name="plang" value="$lg"> <tr><td> <table border="1" bgcolor="#eeeeee"><tr><td> Title ($lg): <input type="text" name="title_$lg" size="45" value="$!title"><br/> Content ($lg):<br> <textarea name="content_$lg" rows="15" cols="70"> $!content </textarea><br> Upload content from file: <input type="file" name="_file$lg"><br/> </td></tr></table> </td></tr> #end </table> <p> #if ("wikipage" == $page.getAttribute("ontologyclassname")) <p> <a href="wikihelp.html" target="_blank">Help for Wiki</a> </p> #if ($userId == $page.getAttributeAsString("creator")) <input type="checkbox" name="newContentVersion" checked="true" value="true"> Should a new content version be created? #else <input type="hidden" name="newContentVersion" value="true"> It will be created a new content version #end #end </p> <p><input type="submit" name="_submit" value="Update Page"></p> <p><input type="submit" name="_submit" value="Add Language"> <select name="_addlang"><option value=""></option> $portalPresenter.printLanguageOptions($langs)</select> </p> </td><td valign="top"> <table><tr><td> <b>Page paths:</b><br/> #foreach( $pp in $page.getPagePaths() ) <input type="checkbox" name="_delpath" value="$pp"> $pp<br/> #end <br/> <input type="submit" name="_submit" value="Remove Checked Paths"/><br/> <p><select name="_addpath"> <option value=""></option> #foreach ($p in $portalManager.getPortalFolderPaths()) <option value="$p">$p #end </select> <p><input type="submit" name="_submit" value="Add Selected Path"/> <p><a href="createfolder.html">Create New Folder</a><br/> <p> </p> </td></tr> <tr><td> <b>Access Restrictions:</b> none <p> </p> </td></tr> <tr><td> <p>Created<br>$page.getAttributeAsString("creationtime")<br> by user $userPresenter.getUserLogin($page.getAttribute("creator"))</p> <p>Last Modified<br>$page.getAttributeAsString("updatetime")<br> by user $userPresenter.getUserLogin($page.getAttribute("updater"))</p> <p>Expires:<br/> <input type="text" name="expirationtime" value="$page.getAttributeAsString("expirationtime")" size="18"/><br> <font size="-1">(dd.mm.yyyy hh:mm)</font></p> </td></tr> </table> </td></tr> </table> </form> </p> <form action="$contextPath/ADMIN/org.cobricks.portal/delete.html?itemid=$itemid" method="post"> <p><input type="submit" name="_submit" value="Delete Portal Page"></p> </form> <p> <h3>Page Update History</h3> <ul> #foreach ( $i in $portalManager.getPageUpdateHistory($corePresenter.parseInt($itemid)) ) <li>$portalPresenter.formatDate($i.get("accdate")) by $userPresenter.getUserLogin($i.get("userid")) from $i.get("hostname") #end </ul> <form action="$contextPath/ADMIN/org.cobricks.portal/edit.html?itemid=$itemid" method="post"> <p><input type="submit" name="_submit" value="Reset Page Update History"></p> </form> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: create.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>Create Portal Page</h1> #if ( $returnCode == 1101 ) <div class="success">Successfully created portal page.</div><p> #elseif ( $returnCode > 1999 ) <div class="error">Failed creating portal page.</div><p> #if ($errors) <div class="error">The following error(s) ocurred: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul></div><br/> #end #end <form action="$contextPath/PORTAL" method="post" enctype="multipart/form-data"> <input type="hidden" name="cmd" value="create"> <input type="hidden" name="cmd.noaccess" value="$contextPath/ADMIN/noaccess.html"> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.portal/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.portal/create.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="fullcontext" value="true" /> Path: <select name="ppath"> #foreach ($p in $portalManager.getPortalFolderPaths()) <option value="$p">$p #end </select> <a href="createfolder.html">Create New Folder</a> <p> Page Name (with ".html" or similar extensions):<br> <input name="pname" size="50"> <p> Language: <select name="plang"> $portalPresenter.printLanguageOptions("") </select> <p> Title:<br> <input name="title" size="60"> <p> <!-- load standard template for new pages here ... --> <textarea name="content" rows="15" cols="75"> #include("/ADMIN/org.cobricks.portal/page-template.html") </textarea><br> You may also upload a file for the content:<br> <input type="file" name="_file"> <p> <input type="checkbox" name="itemclass" value="wikipage"> Create as Wiki Page (otherwise a non versioned HTML page will be created) </p> <p> <input type="submit" value="Create Page"> </form> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: document.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: listwiki.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>List Wiki Portal Objects</h1> #if ( $returnCode == 1010 ) <p><div class="success">Successfully deleted portal object.</div></p> #end <!-- tbd: "op=useronly", then only show pages editable by current user --> List of Wiki pages stored in the item database: <ul> #foreach( $i in $itemManager.searchItems("/item[itemclass~'wikipage']") ) <li><a href="$i.getPagePath()$i.getPageName()">$i.getAttribute("name")</a>, id=$i.getId() - <a href="edit.html?itemid=$i.getId()">edit</a> - <a href="delete.html?itemid=$i.getId()">delete</a></li> #end </ul> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: wiki.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Portal Component</a> - <a href="wiki.html">Wiki Example</a></em> <h1>Portal Component - Wiki</h1> <p>Using the item and portal components it is possible to provide "Wiki-like" functionality. This page demonstrates this.</p> <h2>Create Wiki pages</h2> <p> To create Wiki pages there are two possibilities. First you can use the <a href="/portal/create.html">Create new HTML page</a> Link, where you can choose, if should be created a HTML page or a Wiki page. Otherwise you can use <a href="/portal/createwiki.html">Create new Wiki page</a>, where only Wiki pages can be created. </p> <h2>List Wiki pages</h2> <p> To list all Wiki pages that were created on the platform you can use the <a href="/portal/listwiki.html">List Wiki pages</a> form. </p> <h2>Edit Wiki pages</h2> <p> To edit the content of a Wiki page you can use the <a href="/portal/edit.html">Edit form</a>. It is the same form which can be used to edit HTML pages. The parameter 'itemid' must be passed. </p> <h2>History of a Wiki page</h2> <p> The form <a href="/portal/historywiki.html">History Wiki</a> list the changes of the content for a Wiki page. The parameter 'itemid' must be passed. </p> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: index.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>Portal Component</h1> #if ( $returnCode == 1010 ) <p><div class="success">Successfully deleted portal object.</div></p> #end The Portal Component implements functionality for providing a Web-based user interface for the components. This includes functionality for Web page management. <p> The following admin functionality is available for the Portal Component: <p> <ul> <li>Creating new portal objects <ul> <li><a href="create.html">Create new HTML page</a> <li><a href="createwiki.html">Create new Wiki page</a> <li><a href="createbin">Create new binary object</a> <li><a href="createfolder.html">Create new Portal Folder (directory)</a> </ul> <p> <li>Listing/Browsing Portal Objects <ul> <li><a href="browse.html">List and browse Portal Folders</a> <li><a href="list.html">List HTML pages</a> <li><a href="listwiki.html">List Wiki pages</a> <li><a href="listbin.html">List binary objects</a> </ul> </ul> <h3>Session Handler</h3> Active Sessions:<br> <table border="0"> #foreach ( $i in $portalManager.getSessionHandler().getSessionIds() ) #set ( $s = $portalManager.getSession($i) ) <tr><td>$i</td><td> #foreach ( $j in $s.getAttributeNames() ) $j, #end </td></tr> #end </table> <h3>Request Object</h3> <table border="1"> <tr><td>page name</td><td width="8"></td><td>$portalRequest.getPageName()</td></tr> <tr><td>page path</td><td></td><td>$portalRequest.getPagePath()</td></tr> <tr><td>lang</td><td></td><td>$portalRequest.getLang()</td></tr> <tr><td>portalUser</td><td></td><td>$portalRequest.getPortalUser().getUserLogin()</td></tr> <tr><td>request URI</td><td></td><td>$portalRequest.getHttpRequestURI()</td></tr> </table> <h3>HttpServletRequest</h3> <table border="0" width="100%"> <tr><td width="50%" valign="top"> <table border="1"> <tr><td>serverName</td><td></td><td>$!portalRequest.getHttpServletRequest().getServerName()</td></tr> <tr><td>serverPort</td><td></td><td>$!portalRequest.getHttpServletRequest().getServerPort()</td></tr> <tr><td>authType</td><td></td><td>$!portalRequest.getHttpServletRequest().getAuthType()</td></tr> <tr><td>contextPath</td><td></td><td>$!portalRequest.getHttpServletRequest().getContextPath()</td></tr> <tr><td>method</td><td></td><td>$!portalRequest.getHttpServletRequest().getMethod()</td></tr> <tr><td>pathInfo</td><td></td><td>$!portalRequest.getHttpServletRequest().getPathInfo()</td></tr> <tr><td>pathTranslated</td><td></td><td>$!portalRequest.getHttpServletRequest().getPathTranslated()</td></tr> <tr><td>queryString</td><td></td><td>$!portalRequest.getHttpServletRequest().getQueryString()</td></tr> <tr><td>remoteUser</td><td></td><td>$!portalRequest.getHttpServletRequest().getRemoteUser()</td></tr> <tr><td>requestedSessionId</td><td></td><td>$!portalRequest.getHttpServletRequest().getRequestedSessionId()</td></tr> <tr><td>requestURI</td><td></td><td>$!portalRequest.getHttpServletRequest().getRequestURI()</td></tr> <tr><td>requestURL</td><td></td><td>$!portalRequest.getHttpServletRequest().getRequestURL()</td></tr> <tr><td>servletPath</td><td></td><td>$!portalRequest.getHttpServletRequest().getServletPath()</td></tr> </table> </td><td> </td><td width="50%" valign="top"> <b>Request Headers:</b> <p> #foreach ( $i in $portalRequest.getHttpServletRequest().getHeaderNames() ) $i = $portalRequest.getHttpServletRequest().getHeader($i)<br> #end </td></tr> </table> <h3>Velocity Context</h3> The Velocity Context contains the following keys and values: <p> <table border="1"> #foreach ( $i in $portalPresenter.getContextKeys($velocityContext) ) <tr><td>$i</td> <td>$portalPresenter.getContextObject("$!i",$velocityContext)</td></tr> #end </table> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: createwiki.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Portal Component</a> - <a href="createwiki.html">Create Wiki Page</a></em> <h1>Create Wiki Page</h1> #if ( $returnCode == 1101 ) <div class="success">Successfully created portal page.</div><p> #elseif ( $returnCode > 1999 ) <div class="error">Failed creating portal page.</div><p> #if ($errors) <div class="error">The following error(s) ocurred: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul></div><br/> #end #end <form action="$contextPath/PORTAL" method="post"> <input type="hidden" name="cmd" value="create"> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"> <input type="hidden" name="cmd.success" value="$contextPath/portal/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/portal/create.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="fullcontext" value="true" /> <input type="hidden" name="itemclass" value="wikipage" /> Path: <select name="ppath"> #foreach ($p in $portalManager.getPortalFolderPaths()) $portalPresenter.printOption("$p", "$p", "$!ppath") #end </select> <a href="createfolder.html">Create New Folder</a> <p> Page Name (with ".html" or similar extensions):<br> <input name="pname" size="50" value="$!pname"> <p> Language: <select name="plang"> $portalPresenter.printLanguageOptions("") </select> <p> Title:<br> <input name="title" size="60" value="$!title"> <p> <textarea name="content" rows="15" cols="75"> </textarea><br> You may also upload a file for the content:<br> <input type="file" name="_file"> <p> <input type="submit" value="Create Wiki Page"> </form> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: delete.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>Delete Portal Object</h1> #if ( $returnCode > 1999 ) <font color="red">Failed deleteing PortalPage object.</font><p> #end #set ( $page = $portalPresenter.getPage($itemid) ) Deleting portal object $itemid <p> The page exists in the language versions: #foreach( $l in $page.getLanguages() ) $l #end <p> Do you really want to delete #if ( "$!plang" == "" ) all language versions of this portal object? #else the language version $plang? #end <p> <form action="$contextPath/PORTAL" method="post"> <input type="hidden" name="cmd" value="delete"> <input type="hidden" name="cmd.noaccess" value="$contextPath/ADMIN/noaccess.html"> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.portal/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.portal/delete.html"> <input type="hidden" name="itemid" value="$itemid"> <input type="hidden" name="plang" value="$!plang"> <p> <input type="submit" value="Yes"> </form> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: editbin.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Portal Component</a> - <a href="createbin.html">Create Object</a></em> <h1>Update Portal Object</h1> #if ( $returnCode == 1101 ) <div class="success">Successfully/updated created portal object.</div><p> #elseif ( $returnCode > 1999 ) <div class="error">Failed creating portal object.</div><p> #if ($errors) <div class="error">The following error(s) ocurred: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul></div><br/> #end #end #set($item = $itemPresenter.getItem($itemid)) #if ("$!pname"=="") #set ($pname = $item.getAttribute("name")) #end #if ("$!plang"=="") Language versions: #foreach ( $l in $portalPresenter.getBinaryLangs($corePresenter.parseInt($itemid))) <a href="editbin.html?itemid=$itemid&plang=$l">$l</a> - #set ($plang = $l) #end #end <form action="$contextPath/PORTAL" method="post" enctype="multipart/form-data"> <input type="hidden" name="cmd" value="updatebin"> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"> <input type="hidden" name="cmd.success" value="$contextPath/portal/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/portal/createbin.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> <input type="hidden" name="itemid" value="$!itemid"/> Path: TBD show the paths <p> Page Name (if no name is given, the filename is taken; if no extension is given, the extension from the filename is append to the page name):<br> <input name="pname" size="50" value="$!pname"> <p> Language: $!plang <p> <input type="file" name="_file" value="$_file"> <p> <input type="submit" value="Update Object"> </form> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: page-template.html --- $portalPresenter.parse("/pageheader.html", $portalRequest) Fill in your page content here ... $portalPresenter.parse("/pagefooter.html", $portalRequest) --- NEW FILE: listbin.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>List Binary Portal Objects</h1> #if ( $returnCode == 1010 ) <p><div class="success">Successfully deleted portal object.</div></p> #end List of binary objects stored in the item database: <ul> #foreach( $i in $itemManager.searchItems("/item[itemclass='portalfile']") ) <li><a href="$i.getPagePath()$i.getPageName()">$i.getAttribute("name")</a>, id=$i.getId() - <a href="editbin.html?itemid=$i.getId()">edit</a> - <a href="delete.html?itemid=$i.getId()">delete</a></li> #end </ul> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: createfolder.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>Create Portal Folder</h1> #if ( $returnCode > 1999 ) <font color="red">Failed creating PortalFolder object.</font><p> #end <form action="$contextPath/PORTAL" method="post"> <input type="hidden" name="cmd" value="createfolder"> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"> <input type="hidden" name="cmd.success" value="$contextPath/portal/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/portal/createfolder.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> Parent Folder: <select name="ppath"> #foreach ($p in $portalManager.getPortalFolderPaths()) <option value="$p">$p #end </select> <p> Folder Name:<br> <input name="pname" size="50"> <p> Title:<br> <input name="title" size="60"> <p> <input type="submit" value="Create Folder"> </form> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) --- NEW FILE: createbin.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Portal Component</a> - <a href="createbin.html">Create Object</a></em> <h1>Create Portal Object</h1> #if ( $returnCode == 1101 ) <div class="success">Successfully created portal object.</div><p> #elseif ( $returnCode > 1999 ) <div class="error">Failed creating portal object.</div><p> #if ($errors) <div class="error">The following error(s) ocurred: <ul>#foreach($error in $errors) <li>$corePresenter.printErrorMessage($error, "$!lang")</li> #end</ul></div><br/> #end #end <form action="$contextPath/PORTAL" method="post" enctype="multipart/form-data"> <input type="hidden" name="cmd" value="createbin"> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"> <input type="hidden" name="cmd.success" value="$contextPath/portal/index.html"> <input type="hidden" name="cmd.error" value="$contextPath/portal/createbin.html"> <input type="hidden" name="path" value="$portalRequest.getPagePath()"/> Path: <select name="ppath"> #foreach ($p in $portalManager.getPortalFolderPaths()) <option value="$p">$p #end </select> <a href="createfolder.html">Create New Folder</a> <p> Page Name (if no name is given, the filename is taken; if no extension is given, the extension from the filename is appended to the page name):<br> <input name="pname" size="50" value="$!pname"> <p> Language: <select name="plang"> $portalPresenter.printLanguageOptions("$!plang") </select> <p> <input type="file" name="_file" value="$_file"> <p> <input type="checkbox" name="storedb" checked="checked"> Store object in database (otherwise the file will be stored in the file system and cannot be edited) </p> <p> <input type="submit" value="Create Object"> </form> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: default.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: historywiki.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Portal Component</a> - <a href="historywiki.html">List Wiki history Objects</a></em> #set ( $page = $portalPresenter.getPage($itemid) ) <h1>Content history of $page.getPageName()</h1> <ul> #foreach( $i in $itemManager.getContentVersions($corePresenter.parseInt($itemid), "$lang") ) <li> Creatoruserid: $i.get("creatoruserid") - Version: <a href="$page.getPagePath()$page.getPageName()?lang=$lang&versionid=$i.get("versionid")">$i.get("versionid")</a> - Created: $i.get("creationtime") </li> #end </ul> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: browse.html.en --- $portalPresenter.parse("$contextPath/ADMIN/pageheader.html", $portalRequest) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.portal/index.html">Portal Component</a></em> <h1>Browse Webspace</h1> #if ( $returnCode == 1002 ) <p><div class="success">Successfully deleted portal objects.</div></p> #end #if ( $returnCode == 1105 ) <p><div class="success">Successfully deleted portal folder.</div></p> #end ## rootFolder = $portalManager.getRootPortalFolder() <table border="0"> <tr><td> #set ($folders = $portalManager.getPortalFolders()) #foreach ($f in $folders) <a href="/ADMIN/org.cobricks.portal/browse.html?fpath=$f">$f</a><br> #end </td> <td> </td> <td valign="top"> #if ("$!fpath"=="") #set ($fpath = "/") #end #set ( $count = 0 ) <b>Portal objects in folder "$!fpath":</b><p> <form action="$contextPath/ITEM" method="post"> <input type="hidden" name="cmd" value="deleteitem"/> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.portal/browse.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.portal/browse.html"> #set ($pages = $portalPresenter.getPagesForFolderPath("$fpath")) #foreach ($p in $pages) #set ( $count = $count +1 ) #set ($iclass = $p.getItemClass()) #set ($name = $p.getAttribute("name")) #if ("$!name"=="") #set ($name = "<no name>") #end <input type="checkbox" name="itemid" value="$p.getId()"> #if ("$!iclass"=="portalpage") <img src="/ADMIN/org.cobricks.portal/document.gif"> #else #if ("$!iclass"=="portalinclude") <img src="/ADMIN/org.cobricks.portal/document.gif"> #else #if ("$!iclass"=="portalinclude") <img src="/ADMIN/org.cobricks.portal/document.gif"> #else <img src="/ADMIN/org.cobricks.portal/default.gif"> #end #end #end <a href="/ADMIN/org.cobricks.portal/edit.html?path=$fpath&itemid=$p.getId()">$name ($p.getItemClass(), $p.getId())</a><br> #end #if ( $count > 0 ) <p><input type="submit" value="Delete selected portal objects"/> #end </form> #if ( $count == 0 ) <p>There are no portal objects in this folder. #set ( $f = $portalManager.getPortalFolder("$fpath") ) <p><form action="$contextPath/PORTAL" method="post"> <input type="hidden" name="cmd" value="deletefolder"/> <input type="hidden" name="cmd.success" value="$contextPath/ADMIN/org.cobricks.portal/browse.html"> <input type="hidden" name="cmd.error" value="$contextPath/ADMIN/org.cobricks.portal/browse.html"> <input type="hidden" name="cid" value="$f.getId()"/> <input type="submit" value="Delete portal folder"/> </form> #end <p><em>There could be additional objects in the <b>file system webspace</b> which will not be displayed here. This list only includes the portal objects which are stored in the database.</em></p> <p>Actions to create new portal objects (in this portal folder): <ul> <li><a href="/ADMIN/org.cobricks.portal/create.html">Create new page</a> <li><a href="/ADMIN/org.cobricks.portal/createwiki.html">Create new Wiki page</a> <li><a href="/ADMIN/org.cobricks.portal/createbin.html">Create new binary object</a> </ul></p> </td> </tr> </table> $portalPresenter.parse("$contextPath/ADMIN/pagefooter.html", $portalRequest) |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:11
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.user In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956/org.cobricks.user Modified Files: create.html index.html search.html Log Message: Index: search.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.user/search.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- search.html 31 May 2006 06:04:18 -0000 1.5 +++ search.html 17 Nov 2006 13:40:08 -0000 1.6 @@ -16,14 +16,14 @@ <input type="hidden" name="path" value="$portalRequest.getPagePath()" /> #set ( $tmp = "$!auserlogin$!firstname$!lastname$!email" ) -#if ( $tmp.length() > 0 ) - #set ($attrsInit = true) -Search for users with search criteria -#else +#if ( $tmp.length() < 1 ) #set ($attrsInit = false) - All users (no search criteria): -#end + It is not possible to search for all users (no search criteria).<br> + Please specify a search criterium. +#else +#set ($attrsInit = true) +Search for users with search criteria <table> <tr> #set ( $tmp = "$!auserlogin" ) @@ -101,7 +101,7 @@ #if ($result) #if ($attrsInit == true) <p> - has $result.size() results + has returned $result.size() results. </p> #end @@ -111,20 +111,21 @@ Please, try to change one or more search criteria. </p> #end +#end <table width="100%"> <tr bgcolor="#dfdfdf"> <td> - <b>User Id</b> + <b>Id</b> </td> <td> - <b>User Login</b> + <b>Login</b> </td> <td> <b>Name</b> </td> <td> - <b>E-Mail</b> + <b>Email</b> </td> </tr> #set( $number = 0 ) @@ -145,11 +146,15 @@ $i.getName() </td> <td> + #if ($!i.getAttribute("basic.contact.online.email")) + $!i.getAttribute("basic.contact.online.email") + #else #if ($!i.getAttribute("basic.contact-work.online.email")) $!i.getAttribute("basic.contact-work.online.email") #else $!i.getAttribute("basic.contact-priv.online.email") #end + #end </td> <td> <a href="/ADMIN/org.cobricks.user/user.html?auserlogin=$i.getUserLogin()">edit</a> - @@ -165,67 +170,37 @@ field.</p> <table border="0"> - <tr> - <TD>Login Name:</TD> - <TD><input name="auserlogin" size=20 value="$!auserlogin"></td> - <td> <select width="15" name="compare_func_auserlogin" > - <option value="1">is equal - <option value="2">like - </select> - </td> - </tr> - <tr> - <TD>Firstname:</TD><TD><input name="firstname" size=20 value="$!firstname"></td> - <td> <select width="15" name="compare_func_firstname" > - <option value="1">is equal - <option value="2">like - </select> - </td> - </tr> - <tr> - <TD>Lastname:</TD><TD><input name="lastname" size=20 value="$!lastname"></td> - <td> - <select width="15" name="compare_func_lastname" > - <option value="1">is equal - <option value="2">like - </select> - </td> - </tr> - - <tr> - <TD>Email:</TD><TD><input name="email" size=20 value="$!email"></td> - <td> <select width="15" name="compare_func_email" > - <option value="1">is equal - <option value="2">like - </select> - </td> - </tr> - <tr> - <td> - order by: - </td> - <td> - <select width="40" name="sort" > - <option value="1">Login name - <option value="2">Lastname - <option value="3">Firstname - <option value="5">E-Mail - </select> - </td> - <td width="100"></td> - </tr> +<tr><TD>Login Name:</TD> +<td><input name="auserlogin" size=20 value="$!auserlogin"></td> +<td>$portalPresenter.printSelect("compare_func_auserlogin","is equal,like","1,2","$!compare_func_auserlogin") +</td></tr> +<tr> +<td>Firstname:</TD><TD><input name="firstname" size=20 value="$!firstname"></td> +<td>$portalPresenter.printSelect("compare_func_firstname","is equal,like","1,2","$!compare_func_firstname") +</td></tr> +<tr> +<td>Lastname:</TD><TD><input name="lastname" size=20 value="$!lastname"></td> +<td>$portalPresenter.printSelect("compare_func_lastname","is equal,like","1,2","$!compare_func_lastname") +</td></tr> +<tr> +<td>Email:</TD><TD><input name="email" size=20 value="$!email"></td> +<td>$portalPresenter.printSelect("compare_func_email","is equal,like","1,2","$!compare_func_email") +</td></tr> +<tr> +<td>order by:</td> +<td>$portalPresenter.printSelect("sort","login name,lastname,firstname,email","1,2,3,5","$!sort") +</td> +<td width="100"></td> +</tr> </table> <TABLE BORDER="0"> - <tr> - <td> - <input type="radio" name="SearchLogik" value="or"> OR - </td> - <td> - <input type="radio" name="SearchLogik" value="and" checked> AND - </td> - <td> - </td> - </tr> +<tr><td> +<input type="radio" name="SearchLogik" value="or"> OR +</td><td> +<input type="radio" name="SearchLogik" value="and" checked> AND +</td><td> +</td> +</tr> </table> <p><input type="submit" value="Search"></p> Index: index.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.user/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.html 31 May 2006 16:39:24 -0000 1.2 +++ index.html 17 Nov 2006 13:40:08 -0000 1.3 @@ -1,21 +1,30 @@ -#parse ( "/ADMIN/pageheader.html" ) +#parse ( "$contextPath/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - <a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>User Component</h1> -The following actions can be performed in the user component: +#if ( $returnCode == 1000 ) +<p><div class="success">Successfully created new user.</div></p> +#end +#if ( $returnCode == 1050 ) +<p><div class="success">Successfully deleted user.</div></p> +#end + +The following admin actions are available for the user component: <p> <ul> -<li><a href="search.html">Search for registered users</a> (and edit or +<li><a href="/ADMIN/org.cobricks.user/search.html">Search for registered users</a> (and edit or delete the accounts) <p> -<li><a href="create.html">Directly (without email notification) create a +<li><a href="/ADMIN/org.cobricks.user/create.html">Directly (without email notification) create a new user</a> <p> -<li><a href="ontology.html">Show user ontology</a> +<li><a href="/ADMIN/org.cobricks.user/role.html">Edit user roles (and access permissions)</a> +<p> +<li><a href="/ADMIN/org.cobricks.user/ontology.html">Show user ontology</a> </ul> -#parse ( "/ADMIN/pagefooter.html" ) +#parse ( "$contextPath/ADMIN/pagefooter.html" ) Index: create.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.user/create.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- create.html 11 Feb 2004 14:39:29 -0000 1.1 +++ create.html 17 Nov 2006 13:40:08 -0000 1.2 @@ -2,9 +2,7 @@ #parse ( "/ADMIN/pageheader.html" ) <em><a href="/ADMIN/index.html">Admin</a> - -<a href="/ADMIN/org.cobricks.user/index.html">User Component</a> - -<a href="/ADMIN/org.cobricks.user/create.html">Create User</a></em> - +<a href="/ADMIN/org.cobricks.user/index.html">User Component</a></em> <h1>Create User</h1> @@ -19,6 +17,10 @@ <font color="red">Failed creating user.</font> #end +<p>Using this form you can create a new user account. The user is not +notified about the new account automatically - this has to be done +manually.</p> + <p>Please enter the following basic attributes for the new user.<p> <form action="/USER" method="post"> @@ -33,6 +35,7 @@ <tr><td> </td></tr> <tr><td>Password:</td><td><input name="password" type="password" size="30"></td></tr> <tr><td>Retype Password:</td><td><input name="password2" type="password" size="30"></td></tr> +<tr><td>Userclass:</td><td><input name="userclass" size="40" value="universityuser"></td></tr> </table><br> <input type="submit" value="Create User"> </form> |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:10
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/images In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956/images Added Files: cobricks2-logo.png Log Message: --- NEW FILE: cobricks2-logo.png --- (This appears to be a binary file; contents omitted.) |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:40:10
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.category In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25956/org.cobricks.category Modified Files: index.html Log Message: Index: index.html =================================================================== RCS file: /cvsroot/cobricks/cobricks2/web/ADMIN/org.cobricks.category/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- index.html 11 Feb 2004 14:39:29 -0000 1.1 +++ index.html 17 Nov 2006 13:40:07 -0000 1.2 @@ -1,15 +1,22 @@ -#parse ( "/ADMIN/pageheader.html" ) - -<em><a href="/ADMIN/index.html">Admin</a> - -<a href="/ADMIN/org.cobricks.category/index.html">Category Component</a></em> +$portalPresenter.parse("$contextPath/ADMIN/pageheader.html",$portalRequest) +<em><a href="$contextPath/ADMIN/index.html">Admin</a> - +<a href="$contextPath/ADMIN/org.cobricks.category/index.html">Category Component</a></em> <h1>Category Component</h1> +#if ( $returnCode == 1011 ) +<div class="success">Successfully created category object.</div><p> +#end +#if ( $returnCode == 1013 ) +<div class="success">Successfully updated category object.</div><p> +#end + <ul> -<li><a href="ontology.html">Show category ontology</a> +<li><a href="/ADMIN/org.cobricks.category/search.html">Search/List categories</a> +<p> +<li><a href="/ADMIN/org.cobricks.category/ontology.html">Show category ontology</a> </ul> - -#parse ( "/ADMIN/pagefooter.html" ) +$portalPresenter.parse("$contextPath/ADMIN/pagefooter.html",$portalRequest) |
|
From: Michael K. <ko...@us...> - 2006-11-17 13:35:45
|
Update of /cvsroot/cobricks/cobricks2/web/ADMIN/images In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24379/images Log Message: Directory /cvsroot/cobricks/cobricks2/web/ADMIN/images added to the repository |
|
From: Michael K. <ko...@us...> - 2006-11-16 14:20:17
|
Update of /cvsroot/cobricks/drehscheibe-in/src/de/tum/cobricks/course In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11240 Modified Files: importModules.java Log Message: ---------------------------------------------------------------------- Index: importModules.java =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/src/de/tum/cobricks/course/importModules.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- importModules.java 2 Oct 2006 09:47:14 -0000 1.2 +++ importModules.java 16 Nov 2006 14:20:11 -0000 1.3 @@ -278,7 +278,7 @@ attr = ""; else attr += "\n"; - attr += "<ExportNotizen><![CDATA["+tmps+"]]</ExportNotizen>"; + attr += "<ExportNotizen><![CDATA["+tmps+"]]></ExportNotizen>"; attrs.put("cmaddxml", attr); } if (tagName.equals("ModulVerantwortlicher")) { |
|
From: Michael K. <ko...@us...> - 2006-11-16 13:59:33
|
Update of /cvsroot/cobricks/drehscheibe-in/web/course In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3818 Modified Files: c.html.de ccreate.html.de cm.html.de cm.html.en cupdate.html.de Added Files: c.html.en Log Message: ---------------------------------------------------------------------- Index: c.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/c.html.de,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- c.html.de 6 Nov 2006 09:13:44 -0000 1.4 +++ c.html.de 16 Nov 2006 13:59:29 -0000 1.5 @@ -106,6 +106,7 @@ <td>$coursePresenter.printPrerequ("$tmps")</td> </tr> #end +<!-- #set ($tmps = "") #set ($tmps = $!course.getCert()) #if ("$!tmps"=="") @@ -128,6 +129,7 @@ <td>$tmps</td> </tr> #end +--> </table> <h3>Dozent(en)</h3> <table border="0"> Index: cm.html.en =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cm.html.en,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cm.html.en 6 Nov 2006 09:13:44 -0000 1.4 +++ cm.html.en 16 Nov 2006 13:59:29 -0000 1.5 @@ -26,7 +26,7 @@ </tr> <tr> <td valign=top>Title</td> -<td>$!cm.getNameEn()</td> +<td>$!cm.getName("en")</td> </tr> <tr> <td>Short title</td> @@ -96,13 +96,14 @@ <td>$!cm.getContent("en")</td> </tr> <tr> -<td valign="top">Learning target</td> +<td valign="top">Learning goal</td> <td>$!cm.getTarget("en")</td> </tr> <tr> <td valign="top">Prerequisites</td> <td>$coursePresenter.printPrerequ($cm)</td> </tr> +<!-- <tr> <td valign="top">Certificate</td> <td>$coursePresenter.printCert($cm)</td> @@ -115,6 +116,7 @@ <td valign="top">Comment</td> <td>$!cm.getComment()</td> </tr> +--> #set ( $tmps = "" ) #set ( $tmps = $cm.getImport() ) #if ( "$!tmps" == "1" ) Index: ccreate.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/ccreate.html.de,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ccreate.html.de 6 Nov 2006 09:13:44 -0000 1.5 +++ ccreate.html.de 16 Nov 2006 13:59:29 -0000 1.6 @@ -128,11 +128,23 @@ <tr> <td>Semesterwochenstunden</td> <td> +#set ($cmsws=$cm.getHoursLecture()+$cm.getHoursExercises()+$cm.getHoursSeminar()+$cm.getHoursLab()) +#if ("$!cmsws"=="0") Vorlesung: <input name="chours_lec" size="2" value="$!cm.getHoursLecture()"> Übungen: <input name="chours_ex" size="2" value="$!cm.getHoursExercises()"> Seminar: <input name="chours_sem" size="2" value="$!cm.getHoursSeminar()"> Praktikum: <input name="chours_lab" size="2" value="$!cm.getHoursLab()"> </td> +#else + Vorlesung: $!cm.getHoursLecture() + Übung: $!cm.getHoursExercises() + Seminar: $!cm.getHoursSeminar() + Praktikum: $!cm.getHoursLab() +<input name="chours_lec" type="hidden" value="$!cm.getHoursLecture()"> +<input name="chours_ex" type="hidden" value="$!cm.getHoursExercises()"> +<input name="chours_sem" type="hidden" value="$!cm.getHoursSeminar()"> +<input name="chours_lab" type="hidden" value="$!cm.getHoursLab()"> +#end </tr> <tr><td colspan="2"><b>Die nachfolgenden Informationen sind aus dem Eintrag des zugehörigen Moduls übernommen und können nicht geändert werden.</b> --- NEW FILE: c.html.en --- $portalPresenter.parse("/pageheader.html",$portalRequest) #set ($cid = $!cid) #set( $course = $coursePresenter.getCourse($cid) ) #set( $cm = $course.getCourseModule() ) <h1>$!course.getFullName("en")</h1> <table border="0"> <tr> <td>Module</td> <td> <a href="cm.html?id=$cm.getSId()">$cm.getName("en")</a> </td> </tr> <tr> <td>Type</td> <td> $cm.getType() </td> </tr> <tr> <td>Semester</td> <td> $!coursePresenter.getTermName("$course.getTerm()") </td> </tr> #set ($tmps = "") #set ($tmps = $!course.getComment("en")) #if ("$!tmps"!="") <tr> <td>Comment</td> <td>$tmps</td> </tr> #end <tr> <td>Language</td> <td> #set ($seloption = "$course.getLang()") #if ( $seloption == "en") English #else German #end </td> </tr> #set ($tmps = "") #set ($tmps = $!course.getUrl()) #if ("$!tmps"!="") <tr> <td>URL</td> <td><a href="$!course.getUrl()">$!course.getUrl()</a></td> </tr> #end <tr> <td>Participants</td> <td>$!course.getCapacity()</td> </tr> <tr> <td>ECTS Credits</td> <td>$!course.getEctsCredits()</td> </tr> <tr> <td>Hours per term</td> <td>$coursePresenter.printSWS($course)</td> </tr> #set ($tmpid = $course.getExaminerId()) #if ("$!tmpid"!="") #if ("$!tmpid"!="0") <tr><td>Examiner</td><td> $courseManager.getLecturer($tmpid).getName() </td></tr> #end #end #set ($tmps = "") #set ($tmps = $!course.getContent("en")) #if ("$!tmps"=="") #set ($tmps = $!cm.getContent("en")) #end #if ("$!tmps"!="") <tr> <td valign="top">Content</td> <td>$tmps</td> </tr> #end #set ($tmps = "") #set ($tmps = $!course.getTarget("en")) #if ("$!tmps"=="") #set ($tmps = $!cm.getTarget("en")) #end #if ("$!tmps"!="") <tr> <td valign="top">Learning goal</td> <td>$tmps</td> </tr> #end #set ($tmps = "") #set ($tmps = $!course.getPrerequ("en")) #if ("$!tmps"=="") #set ($tmps = $!cm.getPrerequ("en")) #end #if ("$!tmps"!="") <tr> <td valign="top">Prerequisites</td> <td>$coursePresenter.printPrerequ("$tmps")</td> </tr> #end <!-- #set ($tmps = "") #set ($tmps = $!course.getCert("en")) #if ("$!tmps"=="") #set ($tmps = $!cm.getCert("en")) #end #if ("$!tmps"!="") <tr> <td valign="top">Certificates</td> <td>$coursePresenter.printCert($tmps)</td> </tr> #end #set ($tmps = "") #set ($tmps = $!course.getDidactics("en")) #if ("$!tmps"=="") #set ($tmps = $!cm.getDidactics("en")) #end #if ("$!tmps"!="") <tr> <td valign="top">Didactics</td> <td>$tmps</td> </tr> #end --> </table> <h3>Lecturer(s)</h3> <table border="0"> #foreach ( $c in $coursePresenter.getLecturersForCourse($cid) ) #set ($curl = $c.getUrl()) #if ("$!curl"!="") <tr> <td><a href="$curl">$!c.getFirstName() $!c.getLastName()</a></td> </tr> #else <tr> <td>$!c.getFirstName() $!c.getLastName()</td> </tr> #end #end </table> <h3>Dates</h3> <table border="0"> #set ( $courseDates = $coursePresenter.getCourseDates($cid) ) #foreach ( $cDate in $courseDates ) <tr> <td> #set ($seloption = "$cDate.getWeekday()") #if ( $seloption == $coursePresenter.MONDAY ) Mo #elseif ( $seloption == $coursePresenter.TUESDAY ) Tu #elseif ( $seloption == $coursePresenter.WEDNESDAY ) We #elseif ( $seloption == $coursePresenter.THURSDAY ) Th #elseif ( $seloption == $coursePresenter.FRIDAY ) Fr #elseif ( $seloption == $coursePresenter.SATURDAY ) Sa #elseif ( $seloption == $coursePresenter.SUNDAY ) Su #end </td> <td>$!cDate.getStartHour():$!cDate.getStartMin()</td><td>-</td> <td>$!cDate.getEndHour():$!cDate.getEndMin()</td> <td> </td> <td> #foreach ( $cr in $coursePresenter.searchCourseRooms("") ) #set ($sel = "") #if ($cr.getId() == $cDate.getRoomId()) $!cr.getName() #end #end </td> <td> </td> <td>von $portalPresenter.dateFormatShort("$!lang", $!cDate.getStartDate())</td> <td>bis $portalPresenter.dateFormatShort("$!lang", $!cDate.getEndDate())</td> <td> #set ($seloption = "$cDate.getCycle()") #if ( $seloption == "0" ) daily/once #elseif ( $seloption == "1" ) weekly #elseif ( $seloption == "2" ) 2-weekly #end </td> <td> #set ($seloption = "$cDate.getType()") #if ( $seloption == "0" ) #elseif ( $seloption == "1" ) Exercise #elseif ( $seloption == "2" ) Central Exercise #end </td> </tr> #end </table> <p> #if ($!userLogin != "anonymous") <form action="$!contextPath/COURSE" method="post"> <input type="hidden" name="cmd" value="addcoursett"/> <input type="hidden" name="cid" value="$cid"/> <input type="hidden" name="uid" value="$auserid"/> <input type="hidden" name="cmd.success" value="$!contextPath/course/timetable.html"/> <input type="hidden" name="cmd.error" value="$!contextPath/course/timetable.html"/> <input type="submit" value="Add to personal schedule"> </form> #end <p> $portalPresenter.parse("/pagefooter.html",$portalRequest) Index: cm.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cm.html.de,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cm.html.de 6 Nov 2006 09:13:44 -0000 1.4 +++ cm.html.de 16 Nov 2006 13:59:29 -0000 1.5 @@ -22,7 +22,7 @@ </tr> <tr> <td valign=top>Titel (en)</td> -<td>$!cm.getName('en')</td> +<td>$!cm.getName("en")</td> </tr> <tr> <td>Kurztitel</td> @@ -99,6 +99,7 @@ <td valign="top">Vorkenntnisse</td> <td>$coursePresenter.printPrerequ($cm)</td> </tr> +<!-- <tr> <td valign="top">Prüfungsdetails</td> <td>$coursePresenter.printCert($cm)</td> @@ -111,6 +112,7 @@ <td valign="top">Kommentar</td> <td>$!cm.getComment()</td> </tr> +--> #set ( $tmps = "" ) #set ( $tmps = $cm.getImport() ) #if ( "$!tmps" == "1" ) Index: cupdate.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/cupdate.html.de,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cupdate.html.de 6 Nov 2006 09:13:44 -0000 1.6 +++ cupdate.html.de 16 Nov 2006 13:59:29 -0000 1.7 @@ -117,11 +117,23 @@ <tr> <td>Semesterwochenstunden</td> <td> +#set ($cmsws=$courseModule.getHoursLecture()+$courseModule.getHoursExercises()+$courseModule.getHoursSeminar()+$courseModule.getHoursLab()) +#if ("$!cmsws"=="0") Vorlesung: <input name="chours_lec" size="2" value="$!course.getHoursLecture()"> Übung: <input name="chours_ex" size="2" value="$!course.getHoursExercises()"> Seminar: <input name="chours_sem" size="2" value="$!course.getHoursSeminar()"> Praktikum: <input name="chours_lab" size="2" value="$!course.getHoursLab()"> - </td> +#else + Vorlesung: $!course.getHoursLecture() + Übung: $!course.getHoursExercises() + Seminar: $!course.getHoursSeminar() + Praktikum: $!course.getHoursLab() +<input name="chours_lec" type="hidden" value="$!course.getHoursLecture()"> +<input name="chours_ex" type="hidden" value="$!course.getHoursExercises()"> +<input name="chours_sem" type="hidden" value="$!course.getHoursSeminar()"> +<input name="chours_lab" type="hidden" value="$!course.getHoursLab()"> +#end +</td> </tr> <tr> <tr><td colspan="2"> |
|
From: Michael K. <ko...@us...> - 2006-11-16 12:46:02
|
Update of /cvsroot/cobricks/drehscheibe-in/web/course In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9012 Modified Files: index.html.de navigation.html.de Log Message: Index: index.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/index.html.de,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- index.html.de 6 Nov 2006 09:13:44 -0000 1.7 +++ index.html.de 16 Nov 2006 12:45:57 -0000 1.8 @@ -1,7 +1,7 @@ $portalPresenter.parse("/pageheader.html", $portalRequest) -<h1>Course Management</h1> +<h1>Kursverwaltung</h1> #set ( $auserid = $userManager.getUserIdForUserLogin($userLogin) ) #if ( $auserid != 0 ) @@ -26,11 +26,11 @@ <p><div class="info">Modul wurde erfolgreich aktualisiert. <p> Die Information wurde per E-Mail an den Prüfungsausschuss gesandt.</div></p> -#set ($tmps = $portalPresenter.sendEmail("$!portal_drehscheibe_courseemail","[Drehscheibe] Moduldaten geaendert","cmupdateres.txt",$portalRequest)) +#set ($tmps = $portalPresenter.sendEmail("$!portal_drehscheibe_courseemail","[Drehscheibe] Moduldaten geändert","cmupdateres.txt",$portalRequest)) #elseif ( $returnCode == 1013 ) <p><div class="info">Modul wurde erfolgreich gelöscht.<br> Die Information wurde per E-Mail an den Prüfungsausschuss gesandt.</div></p> -#set ($tmps = $portalPresenter.sendEmail("$!portal_drehscheibe_courseemail","[Drehscheibe] Modul geloescht","cmdeleteres.txt",$portalRequest)) +#set ($tmps = $portalPresenter.sendEmail("$!portal_drehscheibe_courseemail","[Drehscheibe] Modul gelöscht","cmdeleteres.txt",$portalRequest)) #elseif ( $returnCode == 1021 ) <p><div class="info">Raum wurde erfolgreich angelegt.</div></p> #elseif ( $returnCode == 1022 ) @@ -77,7 +77,7 @@ #else <p>Diese Seite bietet Ihnen Zugang zur Verwaltung von Veranstaltungen -und Veranstaltungsklassen/Modulen, sowie allem, was dazu gehört +und Veranstaltungsklassen bzw. Modulen, sowie allem, was dazu gehört (Räumen, Dozenten)</p> <p>Die Daten werden regelmäßig (momentan einmal Index: navigation.html.de =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/web/course/navigation.html.de,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- navigation.html.de 18 Oct 2006 16:51:06 -0000 1.5 +++ navigation.html.de 16 Nov 2006 12:45:58 -0000 1.6 @@ -13,38 +13,31 @@ #end #end #end -<BR><A class=hnav href="/index.html.de"><B>HOME</B></A><BR> -<BR><A class=hnav href="/course/"><B>COURSE MANAGEMENT</B></A> -<BR> -<BR> <A class=sub href="csearch.html" >Veranstaltungssuche</A> -<BR> <A class=sub href="cmsearch.html">Modulsuche</A> -<BR> <A class=sub href="cmall.html">Modulkatalog</A> -<BR> <A class=sub href="cpsearch.html">Studiengänge suchen</a> +<table class="navtable" > +<tr class="nav0" ><td><a class="nav0" href="/index.html">HOME</a></td></tr> +<tr class="space"><td> </td></tr> +<tr class="nav0" ><td><a class="nav0" href="/course/index.html" >Kursverwaltung</a></td></tr> +<tr class="space"><td> </td></tr> +<tr class="nav1" ><td><a class="nav1" href="csearch.html">Veranstaltungssuche</A></td></tr> +<tr class="nav1" ><td><a class="nav1" href="cmsearch.html">Modulsuche</A></td></tr> +<tr class="nav1" ><td><a class="nav1" href="cmall.html">Modulkatalog</A></td></tr> +<tr class="nav1" ><td><a class="nav1" href="cpsearch.html">Studiengänge suchen</a></td></tr> #if ( "$!acc" != "" ) -<BR> -<BR> <A class=sub href="ccreatepreselect.html">Veranstaltung anlegen</A> +<tr class="space"><td> </td></tr> +<tr class="nav1" ><td><a class="nav1" href="ccreatepreselect.html">Veranstaltung anlegen</A></td></tr> #if ( "$!acc" == "module" ) -<BR> <A class=sub href="cmcreate.html">Modul anlegen</A> -<BR> <A class=sub href="cpcreate.html">Studiengang anlegen</a> +<tr class="nav1" ><td><a class="nav1" href="cmcreate.html">Modul anlegen</A></td></tr> +<tr class="nav1" ><td><a class="nav1" href="cpcreate.html">Studiengang anlegen</a></td></tr> #else -<BR> <A class=sub href="ccreate.html">Modul beantragen</A> -#end -<BR> -<BR> <a class=sub href="crsearch.html">Räume suchen</a> -<BR> <a class=sub href="crcreate.html">Raum anlegen</a> -<BR> -<BR> <a class=sub href="clsearch.html">Dozenten suchen</a> -<BR> <a class=sub href="clcreate.html">Dozent anlegen</a> +<tr class="nav1" ><td><a class="nav1" href="ccreate.html">Modul beantragen</A></td></tr> #end -<p> -<HR> -<BR><A class=hnav - href="/about.html.de">Impressum</A> -<BR><A class=hnav - href="mailto:dre...@in...">Feedback</A><BR> -#if ($!userLogin != "anonymous") - <P><A class=hnav - href="/admin/index.html.de">Admin</A><BR> +<tr class="space"><td> </td></tr> +<tr class="nav1" ><td><a class="nav1" href="crsearch.html">Räume suchen</a></td></tr> +<tr class="nav1" ><td><a class="nav1" href="crcreate.html">Raum anlegen</a></td></tr> +<tr class="space"><td> </td></tr> +<tr class="nav1" ><td><a class="nav1" href="clsearch.html">Dozenten suchen</a></td></tr> +<tr class="nav1" ><td><a class="nav1" href="clcreate.html">Dozent anlegen</a></td></tr> #end -<IMG src="/images/spacer160.gif" width=110><BR> +<tr class="space2"><td> </td></tr> +</table> |
|
From: Michael K. <ko...@us...> - 2006-11-13 16:59:28
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7517 Modified Files: PortalManagerImpl.java PortalPresenter.java PortalRequest.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- PortalPresenter.java 3 Nov 2006 16:12:38 -0000 1.50 +++ PortalPresenter.java 13 Nov 2006 16:59:18 -0000 1.51 @@ -1148,11 +1148,11 @@ } return result; } + /** * Returns a substring of the specified string */ - public final String substr (String str, int n) { if (str.length() > n) @@ -1160,6 +1160,15 @@ return str; } + + /** + * Prepare a text for being displayed in a textbox for editing + * reserving all HTML entities by escaping & characters + */ + public final String escapeHTML(String s) + { + return s.replaceAll("&", "&"); + } } Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- PortalManagerImpl.java 18 Oct 2006 16:47:50 -0000 1.91 +++ PortalManagerImpl.java 13 Nov 2006 16:59:18 -0000 1.92 @@ -485,8 +485,6 @@ } // ... otherwise send file content directly - logger.debug("identified non text file ... "+mimetype); - Object content = page.getPageContent(lang); if (content == null) { if (!pageName.equals("favicon.ico")) { @@ -1563,8 +1561,13 @@ this.prefix = prefix; } public boolean accept(File dir, String name) { - if ((name!=null) && (name.startsWith(prefix))) - return true; + if ((name!=null) && (name.startsWith(prefix))) { + if (name.equals(prefix)) + return true; + // language postfix ... + if (name.length()==prefix.length()+3) + return true; + } return false; } public String toString() { Index: PortalRequest.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalRequest.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- PortalRequest.java 5 Oct 2006 15:07:45 -0000 1.21 +++ PortalRequest.java 13 Nov 2006 16:59:18 -0000 1.22 @@ -135,7 +135,6 @@ } } // and now the request specific Velocity context - velocityContext = new VelocityContext(velocityContext); velocityContext.put("lang", lang); velocityContext.put("pageLang", pageLang); velocityContext.put("pitemid", ""); |
|
From: Michael K. <ko...@us...> - 2006-11-13 10:04:49
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/message In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14445 Modified Files: ChannelEmail.java MessageManager.java MessageManagerImpl.java MessagePresenter.java Log Message: Index: MessagePresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/MessagePresenter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MessagePresenter.java 23 Feb 2004 08:20:59 -0000 1.3 +++ MessagePresenter.java 13 Nov 2006 10:04:46 -0000 1.4 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Cobricks Group. All rights reserved. + * Copyright (c) 2003-2006 Cobricks Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted under the terms of the Cobricks Software @@ -65,8 +65,47 @@ return result; } -} - + /** + * + */ + public void updateSubscriptions(int userid, String sdomain, + String saction, String scondition, + String channelname, String templatename) + { + logger.debug("updateSubscriptions"); + try { + deleteSubscriptions(userid, sdomain, saction, scondition); + // create new one + messageManager.createSubscription(userid, sdomain, saction, + -1, -1, -1, "*", + scondition, channelname, + templatename); + } catch (Throwable e) { + logger.error(LogUtil.ex("failed", e)); + } + } + public void deleteSubscriptions(int userid, String sdomain, + String saction, String scondition) + { + logger.debug("deleteSubscriptions"); + try { + List l = messageManager.getSubscriptions(userid, sdomain, + saction, scondition); + if (l!=null && l.size()>0) { + // delete old subscriptions + Iterator i = l.iterator(); + while (i.hasNext()) { + Subscription subscr = (Subscription)i.next(); + logger.error("delete subscription "+subscr.getId()); + messageManager.deleteSubscription(subscr.getId(), null); + } + } + } catch (Throwable e) { + logger.error(LogUtil.ex("failed", e)); + } + } + +} Index: MessageManager.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/MessageManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MessageManager.java 16 Feb 2006 15:21:08 -0000 1.7 +++ MessageManager.java 13 Nov 2006 10:04:46 -0000 1.8 @@ -44,6 +44,8 @@ public void removeNewsletterMessages(int userid, String nlname); public List getSubscriptions(int userid); + public List getSubscriptions(int userid, String sdomain, String saction, + String scondition); public Set getSubscriptions(String domain, String action, int userid, int objectid, int objecttype, String sourcecomponentid); @@ -52,6 +54,10 @@ String sourcecompid, String scondition, String channelname, String templatename, User caller); + public int createSubscription(int userid, String sdomain, String saction, + int senderid, int objectid, int objecttype, + String sourcecompid, String scondition, + String channelname, String templatename); public void deleteSubscription(int subscrid, User caller); } Index: MessageManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/MessageManagerImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MessageManagerImpl.java 8 May 2006 07:47:59 -0000 1.10 +++ MessageManagerImpl.java 13 Nov 2006 10:04:46 -0000 1.11 @@ -406,6 +406,34 @@ return result; } + public List getSubscriptions(int userid, String sdomain, String saction, + String scondition) + { + List result = new ArrayList(); + String sql = "select subscrid, userid, sdomain, saction, senderid, " + +"objectid, objecttype, sourcecompid, templatename, channelname, " + +"scondition from msg_subscriptions where userid = " + +Integer.toString(userid); + if ((sdomain != null) && (sdomain.length()>0)) { + sql = sql +" and sdomain = '"+sdomain+"'"; + } + if ((saction != null) && (saction.length()>0)) { + sql = sql +" and saction = '"+saction+"'"; + } + if ((scondition != null) && (scondition.length()>0)) { + sql = sql +" and scondition = '"+scondition+"'"; + } + sql = sql +" order by sdomain, saction"; + List sqlresult = dbAccess.sqlQuery(sql); + Iterator i = sqlresult.iterator(); + while (i.hasNext()) { + Map map = (Map)i.next(); + Subscription subscr = new Subscription(map); + result.add(subscr); + } + return result; + } + /** * Return the subscriptions that match the given component @@ -475,6 +503,17 @@ public int createSubscription(int userid, String sdomain, String saction, int senderid, int objectid, int objecttype, String sourcecompid, String scondition, + String channelname, String templatename) + { + return createSubscription(userid, sdomain, saction, + senderid, objectid, objecttype, + sourcecompid, scondition, channelname, + templatename, null); + } + + public int createSubscription(int userid, String sdomain, String saction, + int senderid, int objectid, int objecttype, + String sourcecompid, String scondition, String channelname, String templatename, User caller) { Index: ChannelEmail.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/ChannelEmail.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChannelEmail.java 16 Feb 2006 15:21:08 -0000 1.5 +++ ChannelEmail.java 13 Nov 2006 10:04:46 -0000 1.6 @@ -87,14 +87,14 @@ User user = userManager.getUser(recipientId); if (user == null) return false; - String emailto = user.getAttributeAsString(User.EMAIL); + String emailto = user.getEmail(); // from address String emailfrom = this.fromemail; int fromUserid = message.getSenderId(); if (fromUserid > 0) { User fromUser = userManager.getUser(fromUserid); - String tmps = fromUser.getAttributeAsString(User.EMAIL); + String tmps = fromUser.getEmail(); if (tmps!=null && tmps.trim().length()>0) emailfrom = tmps; } |