diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-30 08:52:56 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-30 08:52:56 +0000 |
commit | 815adf95622e0d2a31383e9dc7469108db03597f (patch) | |
tree | e79eab8ee023de717bb55cc6e9eae6ab404a8fb3 /sca-cpp/trunk/modules/edit/dashboard.py | |
parent | 1b037113fa3f05890a0fd7dcd4851d2141701e16 (diff) |
Add logic to list, add, remove apps and link to the edit page.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1053825 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/edit/dashboard.py')
-rw-r--r-- | sca-cpp/trunk/modules/edit/dashboard.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sca-cpp/trunk/modules/edit/dashboard.py b/sca-cpp/trunk/modules/edit/dashboard.py index c93924b68e..990476a84e 100644 --- a/sca-cpp/trunk/modules/edit/dashboard.py +++ b/sca-cpp/trunk/modules/edit/dashboard.py @@ -34,7 +34,7 @@ def getworkspace(id, cache): # Post a new app to the user's workspace def post(collection, app, user, cache): id = (str(uuid.uuid1()),) - workspace = cons((car(app), id, caddr(app)), getworkspace(workspaceid(user), cache)) + workspace = cons((car(app), car(id), caddr(app)), getworkspace(workspaceid(user), cache)) cache.put(workspaceid(user), workspace) return id @@ -56,13 +56,13 @@ def get(id, user, cache): def findapp(id, workspace): if isNil(workspace): return None - if id == cadr(car(workspace)): + if car(id) == cadr(car(workspace)): return car(workspace) return findapp(id, cdr(workspace)) if isNil(id): return ("Your Apps", user.id()) + getworkspace(workspaceid(user), cache) - return findapp(car(id), getworkspace(workspaceid(user), cache)) + return findapp(id, getworkspace(workspaceid(user), cache)) # Delete apps from the user's workspace def delete(id, user, cache): @@ -72,7 +72,7 @@ def delete(id, user, cache): def deleteapp(id, workspace): if isNil(workspace): return () - if id == cadr(car(workspace)): + if car(id) == cadr(car(workspace)): return cdr(workspace) return cons(car(workspace), deleteapp(id, cdr(workspace))) |