blob: 6f066fb7a6b2b253107dc29152bf29194b6b9072 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001[define show_search_metadata]True[end]
2[define robots_no_index]true[end]
3[define category_css]css/ph_list.css[end]
4
5[include "../framework/header.ezt" "hidesearch"]
6
7[define prod_hosting_base_url]/hosting/[end]
8
9[if-any read_only][else]
10 [if-any can_create_project learn_more_link]
11 <div style="margin-top:3em; text-align:center;">
12 <div style="text-align:center;margin:1em">
13 [if-any can_create_project]
14 <a href="/hosting/createProject">Create a new project</a>
15 [end]
16
17 [if-any learn_more_link]
18 <a href="[learn_more_link]">Learn more about [site_name]</a>
19 [end]
20 </div>
21 </div>
22 [end]
23[end]
24
25<a href="/projects" style="display: block; padding: 0.5em 8px; width: 50%;
26 text-align: center; margin: auto; border: var(--chops-normal-border);
27 border-radius: 8px;">
28Preview a new project list for Monorail.
29</a>
30
31<div id="controls">
32 [include "../sitewide/project-list-controls.ezt" arg1]
33</div>
34
35<div id="project_list">
36 [if-any projects]
37 <table id="resultstable" class="resultstable results" width="100%" border="0" cellspacing="0" cellpadding="18">
38 <tr>
39 [if-any logged_in_user]<th></th>[end]
40 <th style="text-align:left">Name</th>
41 [if-any logged_in_user]<th style="text-align:left; white-space:nowrap">Your role</th>[end]
42 <th style="text-align:left">Stars</th>
43 <th style="text-align:left">Updated</th>
44 <th style="text-align:left">Summary</th>
45 </tr>
46 [for projects]
47 <tr data-url="[projects.relative_home_url]">
48 [include "project-list-row.ezt"]
49 </tr>
50 [end]
51 </table>
52 [else]
53 <p style="text-align:center;padding:0; margin:2em">
54 There were no visible projects found.
55 </p>
56 [end]
57</div>
58
59
60<script type="text/javascript" nonce="[nonce]">
61runOnLoad(function() {
62 var stars = document.getElementsByClassName("star");
63 for (var i = 0; i < stars.length; ++i) {
64 var star = stars[[]i];
65 star.addEventListener("click", function (event) {
66 var projectName = event.target.getAttribute("data-project-name");
67 _TKR_toggleStar(event.target, projectName);
68 });
69 }
70
71 function _handleResultsClick(event) {
72 var target = event.target;
73 if (target.tagName == "A" || target.type == "checkbox" || target.className == "cb")
74 return;
75 while (target && target.tagName != "TR") target = target.parentNode;
76 _go(target.attributes[[]"data-url"].value,
77 (event.metaKey || event.ctrlKey || event.button == 1));
78 };
79 _addClickListener($("resultstable"), _handleResultsClick);
80
81
82});
83</script>
84
85[include "../framework/footer.ezt"]