From c92276a265f94bb6498a694e9250a16599d91909 Mon Sep 17 00:00:00 2001 From: Jeroen Massar Date: Tue, 21 Feb 2017 10:07:56 +0100 Subject: [PATCH 1/3] Page_show -> PageShow --- src/ui/group.go | 8 ++++---- src/ui/recover.go | 2 +- src/ui/user.go | 2 +- src/ui/vcp.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ui/group.go b/src/ui/group.go index 6bd6416..59995b2 100644 --- a/src/ui/group.go +++ b/src/ui/group.go @@ -61,7 +61,7 @@ func h_group_member(cui pu.PfUI) { isadmin := cui.IAmGroupAdmin() p := Page{cui.Page_def(), grp, members, offset, total, search, isadmin} - cui.Page_show("group/members.tmpl", p) + cui.PageShow("group/members.tmpl", p) } type NominateAdd struct { @@ -119,7 +119,7 @@ func h_group_nominate_existing(cui pu.PfUI) { na := &NominateAdd{group: grp, Vouchee: vouchee.GetUserName(), Action: "nominate", Message: msg, Error: errmsg} p := Page{cui.Page_def(), vouchee.GetUserName(), grp.GetGroupName(), na} - cui.Page_show("group/nominate_existing.tmpl", p) + cui.PageShow("group/nominate_existing.tmpl", p) } type NominateNew struct { @@ -219,7 +219,7 @@ func h_group_nominate(cui pu.PfUI) { newform := &NominateNew{group: grp, Action: "nominate", Email: search, Message: msg, Error: errmsg, Search: search, FullName: descr, Affiliation: affil, Biography: bio, Comment: comment} p := Page{cui.Page_def(), search, grp.GetGroupName(), list, notfound, newform} - cui.Page_show("group/nominate.tmpl", p) + cui.PageShow("group/nominate.tmpl", p) } func h_vouches_csv(cui pu.PfUI) { @@ -268,7 +268,7 @@ func h_vouches(cui pu.PfUI) { } p := Page{cui.Page_def(), vouches} - cui.Page_show("group/vouches.tmpl", p) + cui.PageShow("group/vouches.tmpl", p) } func h_group(cui pu.PfUI, menu *pu.PfUIMenu) { diff --git a/src/ui/recover.go b/src/ui/recover.go index 9db6e6b..8bf974c 100755 --- a/src/ui/recover.go +++ b/src/ui/recover.go @@ -83,5 +83,5 @@ func h_recover(cui pu.PfUI) { "

\n") p := Page{cui.Page_def(), intro, rec{usr, usp, nmp, "", "", "", msg, errmsg}, msg, errmsg} - cui.Page_show("misc/recover.tmpl", p) + cui.PageShow("misc/recover.tmpl", p) } diff --git a/src/ui/user.go b/src/ui/user.go index f9c121c..66b932a 100755 --- a/src/ui/user.go +++ b/src/ui/user.go @@ -167,5 +167,5 @@ func h_user_vouches(cui pu.PfUI) { p.Error += err.Error() } - cui.Page_show("user/profile_vouches.tmpl", p) + cui.PageShow("user/profile_vouches.tmpl", p) } diff --git a/src/ui/vcp.go b/src/ui/vcp.go index f9d2b87..68bebda 100644 --- a/src/ui/vcp.go +++ b/src/ui/vcp.go @@ -156,5 +156,5 @@ func h_group_vcp(cui pu.PfUI) { } p := Page{cui.Page_def(), offset, total, cui.SelectedGroup().GetGroupName(), vcps, action, criteria, criterias, limit, limits} - cui.Page_show("group/vcp.tmpl", p) + cui.PageShow("group/vcp.tmpl", p) } From bd8871bcf03b8fd85239c782f9a2ee287036be9f Mon Sep 17 00:00:00 2001 From: Jeroen Massar Date: Thu, 23 Feb 2017 09:34:23 +0100 Subject: [PATCH 2/3] Use GetPriEmail instead of the String variant + update 'E-mail Address' to 'Email address' so that it is consistent around the code --- doc/Trident.md | 4 ++-- share/dbschemas/test_data.psql | 2 +- share/templates/group/nominate.tmpl | 2 +- share/templates/user/profile_vouches.tmpl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/Trident.md b/doc/Trident.md index d8b4a46..d0dc3c3 100644 --- a/doc/Trident.md +++ b/doc/Trident.md @@ -184,7 +184,7 @@ With formatting: [WikiPage](WikiPage/) [WikiPage](WikiPage/) [External Site](https://example.net) -[Email Address](mailto:user@example.net) +[Email address](mailto:user@example.net) ``` ##### Importing from other Wikis (FosWiki) @@ -544,7 +544,7 @@ server { } ``` -### E-mail setup +### Email setup Trident can be run behind both Postfix and Sendmail or likely other SMTP servers. diff --git a/share/dbschemas/test_data.psql b/share/dbschemas/test_data.psql index 3c48592..7f2eff2 100644 --- a/share/dbschemas/test_data.psql +++ b/share/dbschemas/test_data.psql @@ -128,7 +128,7 @@ INSERT INTO trustgroup (ident, shortname, descr, min_invouch, target_invouch, INSERT into attestations (ident,descr,trustgroup) VALUES ('know','LONG DESCRIPTION','test2'); --- Add E-mail addresses +-- Add Email addresses INSERT INTO member_email (member, email, verified) VALUES ('testuser', 'test@user.com', true); INSERT INTO member_email (member, email, verified) diff --git a/share/templates/group/nominate.tmpl b/share/templates/group/nominate.tmpl index f87762a..1b00627 100644 --- a/share/templates/group/nominate.tmpl +++ b/share/templates/group/nominate.tmpl @@ -29,7 +29,7 @@ {{ if $user.GetHideEmail }} [Email Hidden] {{ else }} -{{ $user.GetPriEmailString $.UI false }} +{{ ($user.GetPriEmail $.UI false).Email }} {{ end }} {{ $user.GetAffiliation }} diff --git a/share/templates/user/profile_vouches.tmpl b/share/templates/user/profile_vouches.tmpl index d4648a4..349d4f5 100644 --- a/share/templates/user/profile_vouches.tmpl +++ b/share/templates/user/profile_vouches.tmpl @@ -14,7 +14,7 @@

Group {{ .Group.GetGroupName }}

- +
E-mail Address:{{ $user.GetPriEmailString $.UI false }}
Email address:{{ ($user.GetPriEmail $.UI false).Email }}
From 350baf06ec5f1b0d60ae80b21f9a03b9d78d2cbc Mon Sep 17 00:00:00 2001 From: Ben April Date: Thu, 23 Feb 2017 15:42:03 -0500 Subject: [PATCH 3/3] tweak some test values --- share/test/case_create_tg | 2 +- share/test/case_ml_subscribe | 2 +- share/test/case_nomination | 2 +- share/test/case_profile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/test/case_create_tg b/share/test/case_create_tg index 6aa5852..11720f9 100644 --- a/share/test/case_create_tg +++ b/share/test/case_create_tg @@ -84,7 +84,7 @@ assertText id=-message - Updated 2 fields, 13 fields where not modified + Updated 2 fields, 14 fields where not modified clickAndWait diff --git a/share/test/case_ml_subscribe b/share/test/case_ml_subscribe index 3180b7b..3c0f101 100644 --- a/share/test/case_ml_subscribe +++ b/share/test/case_ml_subscribe @@ -164,7 +164,7 @@ assertText id=PfML-message - 5 fields where not modified + 9 fields where not modified clickAndWait diff --git a/share/test/case_nomination b/share/test/case_nomination index 08c9026..4c2a409 100644 --- a/share/test/case_nomination +++ b/share/test/case_nomination @@ -239,7 +239,7 @@ assertText id=-message - Updated 5 fields, 10 fields where not modified + Updated 5 fields, 11 fields where not modified clickAndWait diff --git a/share/test/case_profile b/share/test/case_profile index 1b4f865..956f197 100644 --- a/share/test/case_profile +++ b/share/test/case_profile @@ -139,7 +139,7 @@ assertText id=-message - Updated 8 fields, 9 fields where not modified + Updated 8 fields, 14 fields where not modified clickAndWait