Commit 79534a11 authored by o@immerda.ch's avatar o@immerda.ch
Browse files

better rendering of aliases

parent 5ac149f0
......@@ -134,6 +134,16 @@ class ApplicationController < ActionController::Base
end
helper_method :canonical_resources_edit_link
def canonical_resources_format(which, uid)
name = uid.split(":", 2)[1]
if which == 'mail_alias'
name = name.split('@')
"#{name[0]}@#{name[1]}"
else
name
end
end
helper_method :canonical_resources_format
def admin?
@is_admin ||= Admin::Enabled && session[:is_admin]
......
......@@ -20,7 +20,7 @@
<%= form_tag do %>
<%= hidden_field_tag 'uid', res %>
<%= res.split(":", 2)[1] %>
<%= canonical_resources_format(@resource_name, res) %>
<% if link = canonical_resources_edit_link(@resource_name, res) %>
<a href="<%= link %>" class="btn btn-primary"><%= t(:edit) %></a>
......
......@@ -206,6 +206,9 @@ de:
schleuder: "Verschlüsselte Emaillisten"
schleuder_description: "Verschlüsselte (Schleuder) Emaillisten zur Gruppenkommunikation oder Kommunikation mit externen Personen."
schleuder_edit_description: "Zum Bearbeiten muss ein zusätzlicher \"Schleuder Account\" erstellt werden."
mail_alias: "Email Alias"
mail_alias_description: "Eine zweite E-Mail Adresse, die auf dein bestehendes Postfach zeigt."
mail_alias_edit_description: ""
activerecord:
errors:
......
......@@ -207,6 +207,9 @@ en:
schleuder: "Encrypted Lists"
schleuder_description: "Encrypted mailing lists based on schleuder, for group communication or communicating externally."
schleuder_edit_description: "For editing a dedicated \"schleuder account\" must be created."
mail_alias: "Email Alias"
mail_alias_description: "A second address pointing to your existing mailbox."
mail_alias_edit_description: ""
activerecord:
errors:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment