Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: appengine/monorail/templates/framework/project-access-part.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/monorail/templates/framework/project-access-part.ezt
diff --git a/appengine/monorail/templates/framework/project-access-part.ezt b/appengine/monorail/templates/framework/project-access-part.ezt
new file mode 100644
index 0000000000000000000000000000000000000000..2400dfea2b262451f4554f1119733dc1980a3aa9
--- /dev/null
+++ b/appengine/monorail/templates/framework/project-access-part.ezt
@@ -0,0 +1,36 @@
+[# Diplay a widget to choose project access level, or read-only text showing
+ the access level. Read-only text is used when the user does not have
+ permission to edit, or if there is only one available choice.
+]
+
+[define access_menu_was_shown]False[end]
+
+[if-any read_only][else]
+ [if-any offer_access_level]
+ <select name="access" id="access">
+ <option value="" disabled="disabled" [if-any initial_access][else]selected="selected"[end]>
+ Select an access level...
+ </option>
+ [for available_access_levels]
+ <option value="[available_access_levels.key]"
+ [if-any initial_access]
+ [is initial_access.key available_access_levels.key]selected="selected"[end]
+ [end]>
+ [available_access_levels.name]
+ </option>
+ [end]
+ </select>
+ [define access_menu_was_shown]True[end]
+ [end]
+[end]
+
+[is access_menu_was_shown "False"]
+ [initial_access.name]
+ <input type="hidden" name="access" value="[initial_access.key]">
+[end]
+
+<div class="formerror">
+ [if-any errors.access]
+ <div class="emphasis">[errors.access]</div>
+ [end]
+</div>

Powered by Google App Engine
This is Rietveld 408576698