Author: rhirsch
Date: Mon Oct 19 08:50:56 2009
New Revision: 826610
URL: http://svn.apache.org/viewvc?rev=826610&view=rev
Log:
[ESME-40] Static Texts in Resource File
Now scala files
Modified:
incubator/esme/trunk/server/src/main/resources/ESMEBase.properties
incubator/esme/trunk/server/src/main/resources/ESMEUI.properties
incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/HttpSender.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/UserMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Privilege.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UrlStore.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/User.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TagDisplay.scala
incubator/esme/trunk/server/src/main/webapp/action_view/index.html
incubator/esme/trunk/server/src/main/webapp/info_view/user.html
Modified: incubator/esme/trunk/server/src/main/resources/ESMEBase.properties
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/resources/ESMEBase.properties?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/resources/ESMEBase.properties
(original)
+++ incubator/esme/trunk/server/src/main/resources/ESMEBase.properties Mon Oct
19 08:50:56 2009
@@ -1,15 +1,53 @@
base_nav_list_users=List all users
base_signup_submit=Let me in
-base_error_not_logged_in="Please logon"
+base_error_not_logged_in=Please logon to use this functionality
+base_error_general=An error has occurred. Please contact your ESME
administrator
+base_error_exception=An error has occurred. Please contact your ESME
administrator $s
+
+base_ui_follow=Follow
+base_ui_unfollow=Unfollow
+base_ui_no_user_found=User not found
base_menu_logout=Log out
base_menu_signup=Sign Up
base_menu_search=Search
base_menu_logout_error=You must be logged in to log out
-base_action_menu=Pools
-base_action_error_name_short=Pool name is too short
+base_pool_menu=Pools
+base_pool_error_name_short=Pool name is too short
+base_pool_msg_new_pool=A new pool has been created.
+base_pool_msg_duplicate_name_pool=A pool with this name already exists. Please
choose a different one
+base_pool_msg_choose_pool=--choose pool--
+base_pool_err_user_not_found=User not found
+base_pool_err_pool_not_found=Pool not found
+base_pool_msg_permission_set=User permissions set successfully
+base_pool_ui_empty_date=NA
+base_pool_err_no_admin_users=No other admin users in pool!
+base_pool_err_dup_name=A pool with this name already exists
+base_pool_err_dup_name_in_realm=A pool with this name '%s' already exists in
realm '%s'
+
+base_urlstore_err_too_short=The minimum URL length is 3 characters
+
+base_user_msg_change=User % changed profile. Name: %, Image: %s.
+base_user_msg_login=User % logged in
+base_user_msg_welcome=Welcome %s
+base_user_ui_signup=Sign Up
+base_user_ui_first_name=First Name
+base_user_ui_last_name=Last Name
+base_user_ui_email=Email
+base_user_ui_timezone=Timezone
+base_user_ui_locale=Locale
+base_user_msg_follow=User %s followed %s.
+base_user_msg_unfollow=User %s unfollowed %s.
+base_user_err_unknown_creds=Unknown credentials
+base_user_err_bad_email=Bad email address
+base_user_err_mismatch_password=Passwords do not match
+base_user_err_password_too_short=Passwords must be 6 characters or longer
+base_user_err_openid_not_reg=Your OpenID '%s' is not registered
+base_user_err_login=Unable to log you in: %s
+base_user_err_no_auth=Failed to authenticate
+
base_token_menu=Tokens
base_token_error_name_short=Token description too short!
@@ -18,3 +56,34 @@
base_track_menu=Tracks
base_track_error_name_short=Track is too short!
base_track_msg_success=Now tracking %s
+
+base_streams_menu=Streams
+base_streams_resend_any=--any--
+base_streams_pool_default=--default--
+
+base_actions_menu=Actions
+base_action_msg_new_action=A new action has been created.
+base_action_error_min_len=The name must be at least 2 characters long!
+
+base_twitter_api_err_user_not_found=User was not found
+base_twitter_api_err_user_not_included=Message was not included
+base_twitter_api_err_message_not_found=Message was not found
+base_twitter_api_err_user_not_follow=User can't be followed
+base_twitter_api_err_user_not_unfollow=User can't be unfollowed
+base_twitter_api_err_user_a_not_specified=User A wasn't provided
+base_twitter_api_err_user_b_not_specified=User B wasn't provided
+base_twitter_api_err_user_a_not_found=User A can't not found
+base_twitter_api_err_user_b_not_found=User B can't not found
+base_twitter_api_err_user_logged_out=User was already logged out
+base_twitter_api_err_auth_failed=User authentication failed
+
+base_rest_api_err_not_logged_in=User wasn't logged in
+base_rest_api_err_missing_param=The '%s' parameter was missing
+base_rest_api_err_param_not_found=The %s wasn't found
+
+base_conv_menu=Conversations
+
+base_users_menu=Users
+
[email protected]
+custom_mail_subject=Message from ESME
\ No newline at end of file
Modified: incubator/esme/trunk/server/src/main/resources/ESMEUI.properties
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/resources/ESMEUI.properties?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/resources/ESMEUI.properties (original)
+++ incubator/esme/trunk/server/src/main/resources/ESMEUI.properties Mon Oct 19
08:50:56 2009
@@ -37,6 +37,7 @@
ui_action_table_enabled=Active
ui_action_table_test=Test
ui_action_table_action=Action
+ui_action_table_create_date=Created
ui_action_table_delete=Delete
ui_action_table_item_enabled=Activate
ui_action_table_item_delete=X
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/HttpSender.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/HttpSender.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/HttpSender.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/HttpSender.scala
Mon Oct 19 08:50:56 2009
@@ -64,7 +64,7 @@
case None => XHTMLMailBodyType(msg.digestedXHTML)
case Some(t) => PlainMailBodyType(expandText(t, msg, user, reason))
}
- Mailer.sendMail(From("[email protected]"), Subject("Message"),
+ Mailer.sendMail(From(S.?("custom_mail_from_adress")),
Subject(S.?("custom_mail_subject")),
To(who), body)
case HttpTo(url, username, password, headers, data) =>
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala
Mon Oct 19 08:50:56 2009
@@ -109,18 +109,18 @@
}
def findAction: Box[Action] =
- for (user <- User.currentUser ?~ "Not Logged In";
- id <- S.param("actionid") ?~ "id param not supplied";
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in");
+ id <- S.param("actionid") ?~ S.?("base_rest_api_err_missing_param",
"id");
action <- Action.find(By(Action.user, user),
By(Action.id, id.toLong),
By(Action.removed, false))) yield action
def addAction(): LiftResponse = {
val ret: Box[NodeSeq] =
- for (user <- User.currentUser ?~ "Not logged in";
- name <- S.param("name") ?~ "'name' param not supplied";
- test <- S.param("test") ?~ "'test' param not supplied";
- action <- S.param("action") ?~ "'action' param not supplied";
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in");
+ name <- S.param("name") ?~ S.?("base_rest_api_err_missing_param",
"name");
+ test <- S.param("test") ?~ S.?("base_rest_api_err_missing_param",
"test");
+ action <- S.param("action") ?~ S.?("base_rest_api_err_missing_param",
"action");
val a = Action.create.user(user).name(name);
a2 <- a.setTest(test);
a3 <- a.setAction(action)) yield a3.saveMe.toXml
@@ -130,7 +130,7 @@
def getActions(): LiftResponse = {
val ret: Box[NodeSeq] =
- for (user <- User.currentUser ?~ "Not logged in")
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in"))
yield user.performing.flatMap(_.toXml)
ret
@@ -139,7 +139,7 @@
def enableAction(): LiftResponse = {
val ret: Box[Boolean] =
for (action <- findAction;
- enabled <- S.param("enabled").map(toBoolean) ?~ "enabled param not
supplied")
+ enabled <- S.param("enabled").map(toBoolean) ?~
S.?("base_rest_api_err_missing_param", "enable"))
yield action.disabled(!enabled).save
ret
@@ -159,15 +159,15 @@
def getTracking(): LiftResponse = {
val ret: Box[NodeSeq] =
- for (user <- User.currentUser ?~ "Not logged in")
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in"))
yield Tracking.findAll(By(Tracking.user, user)).flatMap(_.toXml)
ret
}
def getConversation(): LiftResponse = {
val ret: Box[NodeSeq] =
- for (user <- User.currentUser ?~ "Not logged in";
- id <- S.param("conversationid").map(toLong) ?~ "id param missing"
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in");
+ id <- S.param("conversationid").map(toLong) ?~
S.?("base_rest_api_err_missing_param", "id")
) yield <conversation id={id.toString}>{
Message.findAndPrime(By(Message.conversation, id),
OrderBy(Message.id, Ascending)).map(_.toXml)
@@ -178,8 +178,8 @@
def removeTracking(): LiftResponse = {
val ret: Box[Boolean] =
- for (user <- User.currentUser ?~ "Not logged in";
- id <- S.param("trackid") ?~ "id param missing";
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in");
+ id <- S.param("trackid") ?~ S.?("base_rest_api_err_missing_param",
"id");
track <- Tracking.find(By(Tracking.id, id.toLong),
By(Tracking.user, user)) ?~ "Couldn't find
tracking item"
) yield track.removed(true).save
@@ -189,8 +189,8 @@
def addTracking(): LiftResponse = {
val ret: Box[Boolean] =
- for (user <- User.currentUser ?~ "Not logged in";
- toTrack <- (S.param("track") ?~ "No track param") if
toTrack.trim.length > 0)
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in");
+ toTrack <- (S.param("track") ?~
S.?("base_rest_api_err_missing_param", "track")) if toTrack.trim.length > 0)
yield
Tracking.create.user(user).regex(toTrack).save
@@ -243,7 +243,7 @@
def login(): LiftResponse = {
val res: Box[Boolean] = if (User.loggedIn_?) Empty else
- for (token <- S.param("token") ?~ "No 'token' param";
+ for (token <- S.param("token") ?~ S.?("base_rest_api_err_missing_param",
"token");
auth <- AuthToken.find(By(AuthToken.uniqueId, token))
?~ "Token not found";
user <- auth.user.obj;
@@ -292,8 +292,8 @@
def sendMsg(theUser: Box[Long], params: HasParams): LiftResponse = {
val r: Box[Boolean] =
- for (user <- theUser ?~ "User not found";
- msg <- params.param("message") ?~ "Message not included")
+ for (user <- theUser ?~ S.?("base_rest_api_err_param_not_found", "User");
+ msg <- params.param("message") ?~
S.?("base_rest_api_err_missing_param", "message"))
yield {
val from: String = params.param("via") openOr "api"
val pool = for (poolName <- params.param("pool");
@@ -325,7 +325,7 @@
yield tag.findMessages.map(_.toXml)
val r: Box[NodeSeq] =
- t or (for (user <- calcUser ?~ "User not found";
+ t or (for (user <- calcUser ?~ S.?("base_rest_api_err_param_not_found",
"User");
val lst = Mailbox.mostRecentMessagesFor(user.id, 40))
yield lst.flatMap{ case (msg, why, _) => msg.toXml % why.attr})
@@ -338,7 +338,7 @@
val numMsgs = 40 //(params.param("numMsgs") openOr "40").toInt
val r: Box[NodeSeq] =
- for (user <- calcUser ?~ "User not found";
+ for (user <- calcUser ?~ S.?("base_rest_api_err_param_not_found", "User");
val lst = Mailbox.mostRecentMessagesFor(user.id, numMsgs).map(_._1))
yield
<tag_cloud>
@@ -371,13 +371,13 @@
def addUserToPool(): LiftResponse = {
val r: Box[Boolean] =
for (adminUser <- User.currentUser;
- poolName <- S.param("pool") ?~ "Pool not specified";
+ poolName <- S.param("pool") ?~ S.?("base_rest_api_err_missing_param",
"pool");
realm <- (S.param("realm") or Full(AccessPool.Native));
- pool <- AccessPool.findPool(poolName, realm) ?~ "Pool not found";
- userName <- S.param("user") ?~ "User to add to pool not specified";
- user <- User.findFromWeb(userName) ?~ "User not found";
+ pool <- AccessPool.findPool(poolName, realm) ?~
S.?("base_rest_api_err_param_not_found", "Pool");
+ userName <- S.param("user") ?~ S.?("base_rest_api_err_missing_param",
"user");
+ user <- User.findFromWeb(userName) ?~
S.?("base_rest_api_err_param_not_found", "User");
permissionName <- (S.param("permission") or Full("Write"));
- permission <- Box(Permission.valueOf(permissionName)) ?~ "Unknown
permission type"
+ permission <- Box(Permission.valueOf(permissionName)) ?~
S.?("base_rest_api_err_param_not_found", "Permission")
) yield if(Privilege.hasPermission(adminUser.id.is, pool.id.is,
Permission.Admin)) {
val result = try {
Privilege.create.user(user).pool(pool).permission(permission).save
@@ -393,7 +393,7 @@
def getPools(): LiftResponse = {
val ret: Box[NodeSeq] =
- for (user <- User.currentUser ?~ "Not logged in")
+ for (user <- User.currentUser ?~ S.?("base_rest_api_err_not_logged_in"))
yield AccessPool.findAll(In(AccessPool.id, Privilege.pool,
By(Privilege.user, user)),
OrderBy(AccessPool.id, Descending),
MaxRows(20)).
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
Mon Oct 19 08:50:56 2009
@@ -242,8 +242,8 @@
def update(): Box[TwitterResponse] = {
for (req <- S.request;
- user <- calcUser ?~ "User not found";
- text <- req.param("status") ?~ "Message not included";
+ user <- calcUser ?~ S.?("base_twitter_api_err_user_not_found");
+ text <- req.param("status") ?~
S.?("base_twitter_api_err_user_not_included");
msg <- Message.create.author(user.id.is).when(millis).
source(req.param("source") openOr "twitterapi").
setTextAndTags(text, Nil, None))
@@ -258,7 +258,7 @@
}
def friends(userName: String): Box[TwitterResponse] = {
- User.findFromWeb(userName).map(friends) ?~ "User not found"
+ User.findFromWeb(userName).map(friends) ?~
S.?("base_twitter_api_err_user_not_found")
}
def friends(): Box[TwitterResponse] = {
@@ -270,7 +270,7 @@
}
def followers(userName: String): Box[TwitterResponse] = {
- User.findFromWeb(userName).map(followers) ?~ "User not found"
+ User.findFromWeb(userName).map(followers) ?~
S.?("base_twitter_api_err_user_not_found")
}
def followers(): Box[TwitterResponse] = {
@@ -278,50 +278,50 @@
}
def showUser(name: String): Box[TwitterResponse] = {
- for (user <- User.findFromWeb(name) ?~ "User not found")
+ for (user <- User.findFromWeb(name) ?~
S.?("base_twitter_api_err_user_not_found"))
yield Right(Map("user" -> extendedUserData(user)))
}
def showStatus(statusId: String): Box[TwitterResponse] = {
- for (status <- Message.find(statusId) ?~ "Message not found")
+ for (status <- Message.find(statusId) ?~
S.?("base_twitter_api_err_message_not_found"))
yield Right(Map("status" -> msgData(status)))
}
def createFriendship(other: String): Box[TwitterResponse] = {
for (user <- calcUser;
- other <- User.findFromWeb(other) ?~ "User not found")
+ other <- User.findFromWeb(other) ?~
S.?("base_twitter_api_err_user_not_found"))
yield {
if (user follow other)
Right(Map("user" -> userData(other)))
else
- Right(Map("hash" -> Map("error" -> "Could not follow user")))
+ Right(Map("hash" -> Map("error" ->
S.?("base_twitter_api_err_user_not_follow"))))
}
}
def destroyFriendship(other: String): Box[TwitterResponse] = {
for (user <- calcUser;
- other <- User.findFromWeb(other) ?~ "User not found")
+ other <- User.findFromWeb(other) ?~
S.?("base_twitter_api_err_user_not_found"))
yield {
if (user unfollow other)
Right(Map("user" -> userData(other)))
else
- Right(Map("hash" -> Map("error" -> "Could not unfollow user")))
+ Right(Map("hash" -> Map("error" ->
S.?("base_twitter_api_err_user_not_unfollow"))))
}
}
def existsFriendship(): Box[TwitterResponse] = {
for (req <- S.request;
- param_a <- req.param("user_a") ?~ "User A not specified";
- param_b <- req.param("user_b") ?~ "User B not specified";
- user_a <- User.findFromWeb(param_a) ?~ "User A not found";
- user_b <- User.findFromWeb(param_b) ?~ "User B not found")
+ param_a <- req.param("user_a") ?~
S.?("base_twitter_api_err_user_a_not_specified");
+ param_b <- req.param("user_b") ?~
S.?("base_twitter_api_err_user_b_not_specified");
+ user_a <- User.findFromWeb(param_a) ?~
S.?("base_twitter_api_err_user_a_not_found");
+ user_b <- User.findFromWeb(param_b) ?~
S.?("base_twitter_api_err_user_b_not_found"))
yield Right(Map("friends" -> user_a.following_?(user_b)))
}
def endSession(): Box[TwitterResponse] = {
calcUser map { _ =>
User.logUserOut
- Right(Map("hash" -> Map("error" -> "User logged out.")))
+ Right(Map("hash" -> Map("error" ->
S.?("base_twitter_api_err_user_logged_out"))))
}
}
@@ -347,7 +347,7 @@
user <- User.findFromWeb(cred._1))
yield user
}
- userBox ?~ "User authentication failed"
+ userBox ?~ S.?("base_twitter_api_err_auth_failed")
}
protected def unbox(x: () => Box[TwitterResponse]) = {
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
Mon Oct 19 08:50:56 2009
@@ -49,10 +49,10 @@
object AccessPoolMgr {
def loggedIn_? = User.loggedIn_?
- val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("You must be
logged in")))
+ val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() =>
S.?("base_error_not_logged_in")))
val menuItems =
- Menu(Loc("accessPools", List("pools_view", "index"),
S.?("base_action_menu"), ifIsLoggedIn,
+ Menu(Loc("accessPools", List("pools_view", "index"), S.?("base_pool_menu"),
ifIsLoggedIn,
Loc.Snippet("addPool", addPool),
Loc.Snippet("editPool", editPool),
Loc.Snippet("poolUsers", displayPoolUsers),
@@ -70,23 +70,23 @@
def addPool(in: NodeSeq): NodeSeq = {
val theInput = "new_pool"
- val user = User.currentUser
+ val user = User.currentUser
def addNewPool(name: String) = {
name.trim match {
- case x if x.length < 3 => S.error(S.?("base_action_error_name_short"))
+ case x if x.length < 3 => S.error(S.?("base_pool_error_name_short"))
case x => {
val pool = AccessPool.create.realm(AccessPool.Native).setName(name)
pool match {
- case Failure(_,_,_) => S.error("Duplicate pool name!")
+ case Failure(_,_,_) =>
S.error(S.?("base_pool_msg_duplicate_name_pool"))
case Full(p: AccessPool) => val privilegeSaved =
Privilege.create.pool(p.saveMe).user(user).permission(Permission.Admin).save
if(privilegeSaved && user.isDefined) {
Distributor ! Distributor.AllowUserInPool(user.get.id.is,
p.id.is)
- S.notice("New pool added")
+ S.notice(S.?("base_pool_msg_new_pool"))
} else
- S.error("Could not add pool!")
- case _ => S.error("Could not add pool!")
+ S.error(S.?("base_error_general"))
+ case _ => S.error(S.?("base_error_general"))
}
}
}
@@ -116,7 +116,7 @@
val editPermission = "edit_permission"
val adminUser = User.currentUser
- val adminPools = ("0", "--choose pool--") ::
+ val adminPools = ("0", S.?("base_pool_msg_choose_pool")) ::
(adminUser match {
case Full(u)=> Privilege.findAdminPools(u.id).map(
p => (p.toString, AccessPool.find(p).get.getName)).toList
@@ -128,8 +128,8 @@
def addPoolUser(permission: String): JsCmd = {
val r: Box[Boolean] =
for (admin <- adminUser;
- p <- AccessPool.find(pool) ?~ "Pool not found";
- user <- User.findFromWeb(username) ?~ "User not found"
+ p <- AccessPool.find(pool) ?~ S.?("base_pool_err_pool_not_found");
+ user <- User.findFromWeb(username) ?~
S.?("base_pool_err_user_not_found")
) yield if(Privilege.hasPermission(admin.id.is, p.id.is,
Permission.Admin)) {
val result = try {
Privilege.create.user(user).pool(p).permission(Permission(permission.toInt)).save
@@ -141,8 +141,8 @@
} else false // "User has no permission to administer pool"
r match {
case Failure(m,_,_) => S.error(m)
- case Full(true) => S.notice("Successfully set user privileges in pool")
- case _ => S.error("Could not set user privileges in pool")
+ case Full(true) => S.notice(S.?("base_pool_msg_permission_set"))
+ case _ => S.error(S.?("base_error_general"))
}
poolId.set(pool.toLong)
@@ -171,7 +171,7 @@
//XXX display date, should we have a common dateFormat?
val dateFormat = new SimpleDateFormat("yyyy/MM/dd")
def getDateHtml(date: Date) : Text = date match {
- case null => Text("---")
+ case null => Text(S.?("base_pool_ui_empty_date"))
case d => Text(dateFormat.format(d))
}
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala
Mon Oct 19 08:50:56 2009
@@ -38,6 +38,9 @@
import model._
+import java.util.Date
+import java.text.{DateFormat,SimpleDateFormat}
+
import scala.xml._
/**
@@ -46,15 +49,22 @@
object ActionMgr {
def loggedIn_? = User.loggedIn_?
- val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("You must be
logged in")))
+ val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() =>
S.?("base_menu_logout_error")))
val menuItems =
- Menu(Loc("actionMgt", List("action_view", "index"), "Action Management",
ifIsLoggedIn,
+ Menu(Loc("actionMgt", List("action_view", "index"),
S.?("base_actions_menu"), ifIsLoggedIn,
Loc.Snippet("displayActions", displayActions),
Loc.Snippet("main", mainActions))) ::
Nil
object updateActions extends RequestVar[() => JsCmd](() => Noop)
+
+ //XXX display date, should we have a common dateFormat?
+ val dateFormat = new SimpleDateFormat("yyyy/MM/dd")
+ def getDateHtml(date: Date) : Text = date match {
+ case null => Text(S.?("base_pool_ui_empty_date"))
+ case d => Text(dateFormat.format(d))
+ }
def displayActions(in: NodeSeq): NodeSeq = {
// get the span name to update
@@ -75,6 +85,7 @@
e
=> {i.disabled(!e).save; Noop} ),
"test" -> i.testText,
"action" -> i.actionText,
+ "createdDate" ->
getDateHtml(i.createdDate),
"remove" ->
((bt: NodeSeq) =>
ajaxButton(bt, () => {i.removed(true).save ; updateSpan()}))
@@ -107,8 +118,8 @@
act match {
case Full(Nil) =>
- toSave.save
- S.notice("Action added")
+ toSave.save
+ S.notice(S.?("base_action_msg_new_action"))
redisplay() &
SetValById(mainName, "") &
SetValById(mainAction, "") &
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala
Mon Oct 19 08:50:56 2009
@@ -46,10 +46,10 @@
object ConversationMgr {
def loggedIn_? = User.loggedIn_?
- val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("You must be
logged in")))
+ val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() =>
S.?("base_error_not_logged_in")))
val menuItems =
- Menu(Loc("conversation", List("info_view", "conversation"), "Manage
Conversations", ifIsLoggedIn,
+ Menu(Loc("conversation", List("info_view", "conversation"),
S.?("base_conv_menu"), ifIsLoggedIn,
Loc.Snippet("displayConversation", displayConversation))) ::
Nil
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
Mon Oct 19 08:50:56 2009
@@ -49,10 +49,10 @@
def loggedIn_? = User.loggedIn_?
- val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("You must be
logged in")))
+ val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() =>
S.?("base_error_not_logged_in")))
val menuItems =
- Menu(Loc("streams", List("info_view", "streams"), "Streams", ifIsLoggedIn,
+ Menu(Loc("streams", List("info_view", "streams"), S.?("base_streams_menu"),
ifIsLoggedIn,
Loc.Snippet("displayStream", displayStream),
Loc.Snippet("streamFilters", streamFilters))) ::
Nil
@@ -127,13 +127,13 @@
var filterResent = false
var filterPools = false
- val following = (AnyResender.toString, "--any--") ::
+ val following = (AnyResender.toString, S.?("base_streams_resend_any")) ::
(user match {
case Full(u) => u.following.map(u => (u.id.is.toString, u.nickname.is) )
case _ => Nil
- })
+ })
- val pools = (PublicPool.toString, "--default--") ::
+ val pools = (PublicPool.toString, S.?("base_streams_pool_default")) ::
(user match {
case Full(u)=> Privilege.findViewablePools(u.id).map(
p => (p.toString, AccessPool.find(p).get.getName)).toList
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/UserMgr.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/UserMgr.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/UserMgr.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/UserMgr.scala
Mon Oct 19 08:50:56 2009
@@ -44,10 +44,10 @@
object UserMgr {
def loggedIn_? = User.loggedIn_?
- val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("You must be
logged in")))
+ val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() =>
S.?("base_error_not_logged_in")))
val menuItems =
- Menu(Loc("list_users", List("info_view", "users"), "List Users",
ifIsLoggedIn,
+ Menu(Loc("list_users", List("info_view", "users"), S.?("base_users_menu"),
ifIsLoggedIn,
Loc.Snippet("displayUsers", displayUsers))) ::
Nil
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
Mon Oct 19 08:50:56 2009
@@ -61,7 +61,7 @@
def checkDuplicate(in: String): List[FieldError] =
sameName(in).map(p =>
- FieldError(this, Text("Duplicate pool: " + in + " in realm " +
p.realm.is ))
+ FieldError(this, Text(S.?("base_pool_err_dup_name_in_realm", in,
p.realm.is)))
)
}
@@ -73,7 +73,7 @@
Full(this.lastModifyDate(new Date()))
Full(this.modifier(User.currentUser))
}
- case List(_,_*) => Failure("Duplicate access pool name!")
+ case List(_,_*) => Failure(S.?("base_pool_err_dup_name"))
}
def getName() = name.is
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
Mon Oct 19 08:50:56 2009
@@ -32,6 +32,7 @@
import external._
import java.util.Calendar
+import java.util.Date
import scala.xml.{Text, Node, Elem => XmlElem}
object Action extends Action with LongKeyedMetaMapper[Action] {
@@ -40,6 +41,9 @@
private def notifyDistributor(in: Action) {
Distributor ! Distributor.UpdateTrackingFor(in.user,
Distributor.PerformTrackingType)
+
+
+
}
override def afterSave = startStopActors _ :: super.afterSave
@@ -188,6 +192,9 @@
def getSingleton = Action // what's the "meta" server
def primaryKeyField = id
+
+ //define createfields
+ object createdDate extends MappedDateTime(this)
object id extends MappedLongIndex(this)
@@ -195,7 +202,7 @@
object name extends MappedPoliteString(this, 64) {
override def validations =
- valMinLen(2, "The name must be at least 2 characters long") _ ::
super.validations
+ valMinLen(2, S.?("base_action_error_min_len")) _ :: super.validations
}
private[model] object theAction extends MappedText(this) {
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Privilege.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Privilege.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Privilege.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Privilege.scala
Mon Oct 19 08:50:56 2009
@@ -22,8 +22,21 @@
*/
import net.liftweb._
+import http._
+import SHtml._
+import js._
+import JsCmds._
+import JE._
+
+import sitemap._
+import Loc._
+
import mapper._
+
import util._
+import Helpers._
+
+import model._
object Privilege extends Privilege with LongKeyedMetaMapper[Privilege] {
@@ -39,7 +52,7 @@
isDefined
) bulkDelete_!!(By(pool, in.pool),
By(user, in.user))
- else throw new Exception("No other admin users in pool!")
+ else throw new Exception(S.?("base_pool_err_no_admin_users"))
}
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UrlStore.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UrlStore.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UrlStore.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UrlStore.scala
Mon Oct 19 08:50:56 2009
@@ -62,7 +62,7 @@
object url extends MappedPoliteString(this, 512) {
override def validations =
- this.valMinLen(3, "The minimum group length is 3 characters") _ ::
+ this.valMinLen(3, S.?("base_urlstore_err_too_short")) _ ::
super.validations
override def setFilter = trim _ :: super.setFilter
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/User.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/User.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/User.scala
(original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/User.scala
Mon Oct 19 08:50:56 2009
@@ -59,7 +59,7 @@
Message.create.author(in.id).
when(Helpers.timeNow.getTime).
source("profile").
- setTextAndTags("User " + in.nickname + " changed profile. Name: " +
in.wholeName + ", Image: " + in.imageUrl, Nil, Empty).
+ setTextAndTags(S.?("base_user_msg_change",in.nickname, in.wholeName,
in.imageUrl), Nil, Empty).
foreach{ msg =>
if (msg.save) {
Distributor ! Distributor.AddMessageToMailbox(in.id, msg,
ProfileReason(in.id))
@@ -89,7 +89,7 @@
user.save
auth.save(user)
User.logUserIn(user)
- S.notice(S.?("Welcome")+" "+user.niceName)
+ S.notice(S.?("base_user_msg_welcome", user.niceName))
S.redirectTo(from)
case fe =>
@@ -106,7 +106,7 @@
"timezone" _id_> user.timezone.toForm,
"locale" _id_> user.locale.toForm,
"credentials" -> auth.toForm,
- "submit" _id_> SHtml.submit(S.?("Sign Up"), doSubmit))
+ "submit" _id_> SHtml.submit(S.?("base_user_ui_signup"), doSubmit))
}
@@ -198,7 +198,7 @@
Message.create.author(who.id).
when(Helpers.timeNow.getTime).
source("followed").
- setTextAndTags("User " + this.nickname + " followed " + who.nickname +
".", Nil, Empty).
+ setTextAndTags(S.?("base_user_msg_follow",
this.nickname,who.nickname), Nil, Empty).
foreach { msg =>
if (msg.save) {
Distributor ! Distributor.AddMessageToMailbox(who.id, msg,
FollowedReason(this.id))
@@ -216,7 +216,7 @@
if (r.delete_!) Message.create.author(who.id).
when(Helpers.timeNow.getTime).
source("unfollowed").
- setTextAndTags("User " + this.nickname + " unfollowed " + who.nickname +
".", Nil, Empty).
+ setTextAndTags(S.?("base_user_msg_unfollow",
this.nickname,who.nickname), Nil, Empty).
foreach{ msg =>
if (msg.save) {
Distributor ! Distributor.AddMessageToMailbox(who.id, msg,
UnfollowedReason(this.id))
@@ -274,7 +274,7 @@
override val fieldId = Some(Text("txtFirstName"))
}
- def firstNameDisplayName = ??("First Name")
+ def firstNameDisplayName = S.?("base_user_ui_first_name")
// Last Name
object lastName extends MappedString(this, 32) {
@@ -282,9 +282,9 @@
override val fieldId = Some(Text("txtLastName"))
}
- def lastNameDisplayName = ??("Last Name")
+ def lastNameDisplayName = S.?("base_user_ui_last_name")
- // def emailDisplayName = ??("Email")
+ def emailDisplayName = S.?("base_user_ui_email")
// Password
object superUser extends MappedBoolean(this) {
@@ -351,7 +351,7 @@
def niceName: String = nickname
- def timezoneDisplayName = ??("Time Zone")
+ def timezoneDisplayName = S.?("base_user_ui_timezone")
- def localeDisplayName = ??("Locale")
+ def localeDisplayName = S.?("base_user_ui_locale")
}
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala
Mon Oct 19 08:50:56 2009
@@ -119,10 +119,10 @@
} yield user) match {
case Full(user) =>
User.logUserIn(user)
- S.notice(S.?("Welcome")+" "+user.niceName)
+ S.notice(S.?("base_user_msg_welcome", user.niceName))
case _ =>
- S.error(S.?("Unknown credentials"))
+ S.error(S.?("base_user_err_unknown_creds"))
}
S.redirectTo(from)
@@ -153,7 +153,7 @@
def validate: List[FieldError] = (
if (MappedEmail.validEmailAddr_?(email)) Nil else {
- val msg = S.?("Bad email address")
+ val msg = S.?("base_user_err_bad_email")
S.error(msg)
List(FieldError(new FieldIdentifier {
override def uniqueFieldId: Box[String] = Full("email")
@@ -161,13 +161,13 @@
}
) ::: (
if (pwd1 != pwd2) {
- val msg = S.?("Passwords do not match")
+ val msg = S.?("base_user_err_mismatch_password")
S.error(msg)
List(FieldError(new FieldIdentifier {
override def uniqueFieldId: Box[String] = Full("pwd1")
}, Text(msg)))
} else if (pwd1.length < 6) {
- val msg = S.?("Passwords must be 6 characters or longer")
+ val msg = S.?("base_user_err_password_too_short")
S.error(msg)
List(FieldError(new FieldIdentifier {
override def uniqueFieldId: Box[String] = Full("pwd1")
@@ -197,12 +197,12 @@
(openid, exp) match {
case (Full(OpenIDAuthModule(user)), _) =>
User.logUserIn(user)
- S.notice(S.?("Welcome")+" "+user.niceName)
+ S.notice(S.?("base_user_msg_welcome",user.niceName))
Message.create.author(user.id).
when(Helpers.timeNow.getTime).
source("login").
- setTextAndTags("User " + user.nickname + " logged in.", Nil,
Empty).
+ setTextAndTags(S.?("base_user_msg_login", user.nickname), Nil,
Empty).
foreach{ msg =>
if (msg.save) {
Distributor ! Distributor.AddMessageToMailbox(user.id, msg,
LoginReason(user.id))
@@ -212,16 +212,16 @@
RedirectResponse(from, S responseCookies :_*)
case (Full(id), _) =>
- S.error(S.?("Your OpenID is not registered")+":
"+id.getIdentifier())
+ S.error(S.?("base_user_err_openid_not_reg",id.getIdentifier()))
RedirectResponse(from, S responseCookies :_*)
case (_, Full(exp)) =>
- S.error(S.?("Got an exception")+": "+exp.getMessage)
+ S.error(S.?("base_error_exception", exp.getMessage))
RedirectResponse(from, S responseCookies :_*)
case _ =>
- S.error(S.?("Unable to log you in")+": "+fo.map(_.getStatusMsg))
+ S.error(S.?("base_user_err_login", fo.map(_.getStatusMsg)))
RedirectResponse(from, S responseCookies :_*)
}
@@ -274,18 +274,19 @@
case Full(OpenIDAuthModule(user)) =>
// val user: User = OpenIDAuthModule.findOrCreate(id.getIdentifier())
User.logUserIn(user)
- S.notice(S.?("Welcome")+" "+user.niceName)
+ S.notice(S.?("base_user_msg_welcome",user.niceName))
case Full(id) =>
- S.error(S.?("Your OpenID is not registered")+": "+id.getIdentifier())
+ S.error(S.?("base_user_err_openid_not_reg",id.getIdentifier()))
+
case _ =>
logUserOut()
- S.error("Failed to authenticate")
+ S.error(S.?("base_user_err_no_auth"))
}
}
- def displayUser(in: User): NodeSeq = Text(S.?("Welcome")+" "+in.niceName)
+ def displayUser(in: User): NodeSeq =
Text(S.?("base_user_msg_welcome",User.niceName))
def createAConsumer = new ESMEOpenIDConsumer
}
Modified:
incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TagDisplay.scala
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TagDisplay.scala?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
---
incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TagDisplay.scala
(original)
+++
incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TagDisplay.scala
Mon Oct 19 08:50:56 2009
@@ -42,19 +42,20 @@
object TagDisplay {
def userInfo(in: NodeSeq): NodeSeq = {
val user: User = S.param("uid").flatMap(User.findFromWeb) openOr {
- S.error("User not found")
+ S.error(S.?("base_ui_no_user_found"))
S.redirectTo(S.referer openOr "/")
}
def updateFollow: JsCmd = SetHtml("following", followOrNot)
+
def followOrNot: NodeSeq = {
User.currentUser match {
case Full(u) if u != user =>
if (u.following_?(user))
- ajaxButton("Unfollow", () => {u.unfollow(user); updateFollow})
- else ajaxButton("Follow", () => {u.follow(user); updateFollow})
+ ajaxButton(S.?("base_ui_unfollow"), () => {u.unfollow(user);
updateFollow})
+ else ajaxButton(S.?("base_ui_follow"), () => {u.follow(user);
updateFollow})
case _ => NodeSeq.Empty
}
Modified: incubator/esme/trunk/server/src/main/webapp/action_view/index.html
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/action_view/index.html?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/action_view/index.html
(original)
+++ incubator/esme/trunk/server/src/main/webapp/action_view/index.html Mon Oct
19 08:50:56 2009
@@ -1,6 +1,7 @@
<lift:surround with="default" at="content">
<lift:Style.header />
+ <lift:TableSorterSnip/>
<!-- STYLESHEETS <lift:Style.header /> -->
<link rel="stylesheet" type="text/css"
href="../style/reset.css" media="screen" />
@@ -15,6 +16,7 @@
<script type="text/javascript"
src="../scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript"
src="../scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript"
src="../scripts/esme.js"></script>
+ <script type="text/javascript"
src="../scripts/esme_table_sorter.js"></script>
<div class="demo">
@@ -34,25 +36,33 @@
-->
</lift:ignore>
<lift:displayActions the_id="TokenSpan">
- <table border="1">
+ <table id="esme-table" class="tablesorter">
+ <thead>
<tr>
<td><b><lift:loc>ui_action_table_name</lift:loc></b></td>
<td
halign="center"><b><lift:loc>ui_action_table_enabled</lift:loc></b></td>
<td
halign="center"><b><lift:loc>ui_action_table_test</lift:loc></b></td>
<td
halign="center"><b><lift:loc>ui_action_table_action</lift:loc></b></td>
+ <td
halign="center"><b><lift:loc>ui_action_table_create_date</lift:loc></b></td>
<td
halign="center"><b><lift:loc>ui_action_table_delete</lift:loc></b></td>
</tr>
+ </thead>
+
<disp:item>
+ <tbody>
<tr>
<td><item:name/></td>
<td><item:enabled/></td>
- <td><pre><item:test/></pre></td>
- <td><pre><item:action/></pre></td>
+ <td><<item:test/></td>
+ <td><item:action/></td>
+ <td><item:createdDate/></td>
<td>
<item:remove><img src="/images/delete.png"/></item:remove>
</td>
</tr>
+ </tbody>
</disp:item>
+
</table>
</lift:displayActions>
</span>
Modified: incubator/esme/trunk/server/src/main/webapp/info_view/user.html
URL:
http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/info_view/user.html?rev=826610&r1=826609&r2=826610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/info_view/user.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/info_view/user.html Mon Oct 19
08:50:56 2009
@@ -1,12 +1,38 @@
<lift:surround with="default" at="content">
- <lift:user_info>
- <div>
- <div id="tabs" class="b-view tab1">
+
+ <lift:Style.header />
+
+ <!-- STYLESHEETS <lift:Style.header /> -->
+ <link rel="stylesheet" type="text/css"
href="../style/reset.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="../style/text.css"
media="screen" />
+ <link rel="stylesheet" type="text/css" href="../style/grid.css"
media="screen" />
+ <link rel="stylesheet" type="text/css"
href="../style/layout.css" media="screen" />
+ <link type="text/css"
href="../style/smoothness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
+ <!--[if IE 6]><link rel="stylesheet" type="text/css"
href="../style/ie6.css" media="screen" /><![endif]-->
+ <!--[if gte IE 7]><link rel="stylesheet" type="text/css"
href="../style/ie.css" media="screen" /><![endif]-->
+
+ <!-- JAVASCRIPT -->
+ <script type="text/javascript"
src="../scripts/jquery-1.3.2.min.js"></script>
+ <script type="text/javascript"
src="../scripts/jquery-ui-1.7.2.custom.min.js"></script>
+ <script type="text/javascript"
src="../scripts/esme.js"></script>
+
+<div class="demo">
+
+<lift:user_info>
+
+<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
+ <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix
ui-widget-header ui-corner-all">
+ <li class="ui-state-default ui-corner-top ui-tabs-selected
ui-state-active"><a
href="#tabs-1"><user:nicename/><lift:loc>ui_user_timeline</lift:loc></a></li>
+ <li class="ui-state-default ui-corner-top"><a
href="#tabs-2"><user:nicename/><lift:loc>ui_user_messages</lift:loc></a></li>
+ <li class="ui-state-default ui-corner-top"><a
href="#tabs-3"><lift:loc>ui_user_contacts</lift:loc></a></li>
+ </ul>
+
+
+ <div class="ui-tabs-panel ui-widget-content ui-corner-bottom"
id="tabs-1">
<dl class="messages">
- <fieldset><legend>
<user:nicename/><lift:loc>ui_user_timeline</lift:loc></legend>
<span id="following"><user:followButton/></span>
<dd>
- <table>
+ <table id="esme-table" class="tablesorter">
<user:timeline>
<tr>
<td><item:author/></td>
@@ -16,12 +42,11 @@
</user:timeline>
</table>
</dd>
- </fieldset>
- </dl>
- <dl class="">
-
<fieldset><legend><user:nicename/><lift:loc>ui_user_messages</lift:loc></legend>
-
- <dd class="b-clouds">
+ </dl>
+ </div>
+ <div class="ui-tabs-panel ui-widget-content ui-corner-bottom
ui-tabs-hide" id="tabs-2">
+ <dl class="">
+ <dd class="b-clouds">
<table>
<user:messages>
<tr>
@@ -32,23 +57,26 @@
</user:messages>
</table>
</dd>
- </fieldset>
</dl>
- <dl class="">
- <fieldset><legend><lift:loc>ui_user_contacts</lift:loc></legend>
+ </div>
+ <div class="ui-tabs-panel ui-widget-content ui-corner-bottom
ui-tabs-hide" id="tabs-3">
- <dd class="b-contacts" style="height: 240px; overflow: auto">
- <lift:loc>ui_user_following</lift:loc>
+ <dl class="">
+ <dd class="b-contacts" style="height: 240px; overflow: auto">
+ <b><lift:loc>ui_user_following</lift:loc></b>
<lift:UserSnip.following user:userId=""/>
</dd>
<dd class="b-contacts" style="height: 240px; overflow: auto">
- <lift:loc>ui_user_followers</lift:loc>
+ <b><lift:loc>ui_user_followers</lift:loc></b>
<lift:UserSnip.followers user:userId=""/>
</dd>
- </fieldset>
</dl>
- </div>
- </div>
- </lift:user_info>
+ </div>
+
+</div>
+ </lift:user_info>
+
+</div><!-- End demo -->
+
</lift:surround>