Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
79534a11
Commit
79534a11
authored
May 16, 2021
by
o@immerda.ch
Browse files
better rendering of aliases
parent
5ac149f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/controllers/application_controller.rb
View file @
79534a11
...
...
@@ -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
]
...
...
app/views/resources/show.html.erb
View file @
79534a11
...
...
@@ -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>
...
...
config/locales/de.yml
View file @
79534a11
...
...
@@ -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
:
...
...
config/locales/en.yml
View file @
79534a11
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment