Fix Mailman subscription by installing /usr/local/sbin/portalsub
[bpt/portal.git] / apps.mlt
index af6e1bf..82dccaa 100644 (file)
--- a/apps.mlt
+++ b/apps.mlt
@@ -6,7 +6,37 @@ val root = Group.inGroupNum 0;
 
 ref showNormal = true;
 
-if $"vote" <> "" then
+if $"show" <> "" then
+       showNormal := false;
+       val usr = Web.stoi ($"show");
+       val user = Init.lookupUser usr;
+       val appl = App.lookupApp (#app user) %>
+
+       <table class="blanks">
+       <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+       <tr> <td>Approved by:</td> <td><%
+               ref first = true;
+               ref found = false;
+               val votes = App.votes (#id appl);
+               foreach (id, name) in votes do
+                       if first then
+                               first := false
+                       else
+                               %>, <%
+                       end
+                       %><a href="user?id=<% id %>"><% name %></a><%
+                       if id = you then
+                               found := true
+                               %> <a href="apps?unvote=<% #id appl %>">[Unvote]</a><%
+                       end
+               end %> <% if (iff board then not found else false) then %><a href="apps?vote=<% #id appl %>">[Vote]</a><% end %></td> </tr>
+       <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
+       <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
+       <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
+       <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
+       <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
+       </table>        
+<% elseif $"vote" <> "" then
        Group.requireGroupName "board";
        App.vote (you, Web.stoi ($"vote"))
        %><h3>Vote registered</h3><%
@@ -37,7 +67,7 @@ elseif $"approve" <> "" then
        %><h3>Approve application for <% #name appl %></h3>
        <form action="apps" method="post">
        <input type="hidden" name="approve2" value="<% $"approve" %>">
-       <b>Message</b>:<br>
+       <b>Message</b> (will be added at the end of <tt>~hcoop/portal/welcome.txt</tt>, so you might want to include some introductory text):<br>
        <textarea name="msg" rows="5" cols="80" wrap="soft"></textarea><br>
        <input type="submit" value="Submit">
        </form><%
@@ -71,6 +101,12 @@ elseif $"cmd" = "approved" then
        <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
        <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
        <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
+       <% switch #paypal appl of
+         SOME s => %><tr> <td>PayPal:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+       <% end;
+       switch #checkout appl of
+         SOME s => %><tr> <td>Google Checkout:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+       <% end %>
        <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
        <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
        <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
@@ -87,10 +123,8 @@ elseif $"add" <> "" then
        val appl = App.lookupApp id;
        App.add id %>
 
-First, create this UNIX user:
-<blockquote><tt>portal_adduser <% #name appl %> "<% #rname appl %>"<% if #forward appl then %> "<% #email appl %>"<% end %></tt></blockquote>
-
-<p>You should then run <tt>visudo</tt> to add <% #name appl %> to the <tt>MEMBERS</tt> group.  If you're not transmitting <% #name appl %>'s password to him by other means, run <tt>savepass <% #name appl %> &lt;password&gt;</tt> to save it in <tt>~<% #name appl %>/.pass</tt>.  If <% #name appl %> is bootstrapping with public-key ssh, don't forget to run <tt>savekey <% #name appl %> &lt;authorized_keys file location&gt;</tt>.</p>
+First, run this on deleuze:
+<blockquote><tt>new-user <% #name appl %> "<% #rname appl %>"<% if #forward appl then %> "<% #email appl %>"<% end %></tt></blockquote>
 
 <form action="users" method="post">
 <input type="hidden" name="app" value="<% #id appl %>">
@@ -104,8 +138,8 @@ First, create this UNIX user:
 <% end %>
 </select></td></tr>
 <tr> <td>Initial transaction amount:</td> <td><input name="amount"></td> </tr>
-<tr> <td>Initial transaction description:</td> <td><input name="descr" value="PayPal"></td> </tr>
-<tr> <td><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
+<tr> <td>Initial transaction description:</td> <td><input name="descr"></td> </tr>
+<!--tr> <td><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr-->
 <tr> <td>Groups:</td> <td><select name="grp" size="5" multiple>
 <% foreach group in Group.listGroups () do %>
        <option value="<% #id group %>"<% if #name group = "paying" then %> selected<% end %>><% Web.html (#name group) %></option>
@@ -149,6 +183,12 @@ end %>
        <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
        <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
        <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
+       <% switch #paypal appl of
+         SOME s => %><tr> <td>PayPal:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+       <% end;
+       switch #checkout appl of
+         SOME s => %><tr> <td>Google Checkout:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+       <% end %>
        <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
        <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
        <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
@@ -161,4 +201,4 @@ end %>
 <% end
 end %>
 
-<% @footer[] %>
\ No newline at end of file
+<% @footer[] %>