mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-10 19:28:51 +01:00
Added code to hide the admin_email field from non-admin users. It should only be set by the admin user, and other users don't need to see it unless they encounter the /login/nosignup page.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@189 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
e1a1d7b128
commit
8e26b58a58
2 changed files with 7 additions and 2 deletions
|
|
@ -5,7 +5,9 @@
|
|||
<li><strong>staleness_starts:</strong> the number of days before items with no due date get marked as stale (with a yellow highlight)</li>
|
||||
<li><strong>date_format:</strong> the format in which you'd like dates to be shown. For example, for the date 31st January 2006, %d/%m/%Y will show 31/01/2006, %b-%e-%y will show Jan-31-06. See the <a href="http://uk2.php.net/strftime" title="PHP strftime manual">strftime manual</a> for more formatting options for the date.</li>
|
||||
<li><strong>no_completed:</strong> number of completed actions to show on the home page</li>
|
||||
<li><strong>admin_email:</strong> email address for the admin user of Tracks (displayed on the signup page for users to contact to obtain an account)</li>
|
||||
<% if @user.is_admin? %>
|
||||
<li><strong>admin_email:</strong> email address for the admin user of Tracks (displayed on the signup page for users to contact to obtain an account)</li>
|
||||
<% end %>
|
||||
<li><strong>week_starts:</strong> day of the week shown as the start of the week on the popup calendar. 0 = Sunday, 1 = Monday etc.</li>
|
||||
<li><strong>due_style:</strong> style in which due dates for the range 2-7 days away is shown. 0 = "Due in 3 days", 1 = "Due on Wednesday"</li>
|
||||
</ul>
|
||||
|
|
@ -15,6 +17,7 @@
|
|||
<%= start_form_tag :action => 'update_preferences' %>
|
||||
<table>
|
||||
<% @prefs.each do |k,v| %>
|
||||
<% next if !@user.is_admin? and k == "admin_email" %>
|
||||
<tr>
|
||||
<td><label><%= k %>:</label></td>
|
||||
<td><input name="prefs[<%= k %>]" type="text" value="<%= v %>" /></td>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@
|
|||
<li>Show the last <span class="highlight"><%= @prefs["no_completed"] %></span> completed items on the home page</li>
|
||||
<li>Staleness starts after <span class="highlight"><%= @prefs["staleness_starts"] %></span> days</li>
|
||||
<li>Due style: <span class="highlight"><%= @prefs["due_style"] %></span></li>
|
||||
<li>Admin email: <span class="highlight"><%= @prefs["admin_email"] %></span></li>
|
||||
<% if @user.is_admin? %>
|
||||
<li>Admin email: <span class="highlight"><%= @prefs["admin_email"] %></span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= link_to "Edit preferences", :controller => 'user', :action => 'edit_preferences' %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue