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
fbbab298
Commit
fbbab298
authored
Sep 02, 2019
by
Birger Schacht
Browse files
Redesign the app passwords page
parent
8d9af89f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/views/app_passwords/show.html.erb
View file @
fbbab298
...
...
@@ -14,54 +14,47 @@
<%=
link_to
t
(
:back
),
app_passwords_path
%>
<%
else
%>
<p
>
<div
class=
"alert alert-info"
role=
"alert"
>
<%=
t
(
:app_passwords_help
)
%>
</p
>
</div
>
<%
if
@passwords
.
present?
%>
<br
/>
<hr
/>
<ul>
<table
class=
"table table-hover"
>
<thead>
<tr
class=
"border"
>
<th
scope=
"col"
>
<%=
t
(
:app_name
)
%>
</th>
<th
scope=
"col"
>
<%=
t
(
:last_used
)
%>
</th>
<th
scope=
"col"
></th>
</tr>
</thead>
<tbody>
<%
@passwords
.
each
do
|
pw
,
lastlogin
|
%>
<li>
<%=
form_tag
(
app_passwords_path
,
method:
"post"
)
do
%>
<%=
pw
%>
(
<%-
if
lastlogin
%>
<%=
t
(
:last_used
)
%>
:
<%=
lastlogin
%>
<%-
else
%>
<%=
t
(
:never_used
)
%>
<%-
end
%>
)
<%=
hidden_field_tag
(
:delete
,
''
,
value:
pw
)
%>
<%=
submit_tag
t
(
:delete
)
%>
<%
end
%>
</li>
<%
end
%>
</ul>
<hr/ >
<%
end
%>
<br
/>
<p>
<b>
<%=
t
(
:new_app_passwords
)
%>
:
</b>
</p>
<%=
form_tag
(
app_passwords_path
,
method:
"post"
)
do
%>
<table>
<tr><td>
<%=
label_tag
(
:app_name
,
t
(
:app_name
))
%>
</td><td>
<%=
text_field_tag
(
:app_name
,
''
,
value:
t
(
:app_name
),
autocomplete:
'off'
)
%>
</td></tr><tr><td>
<%=
label_tag
(
:password
,
t
(
:your_main_pw
))
%>
</td><td>
<%=
password_field_tag
(
:password
,
nil
,
placeholder:
t
(
:enter_your_current_pw
))
%>
</td></tr>
<tr
class=
"border"
>
<td
class=
"align-middle"
>
<%=
pw
%>
</td>
<td
class=
"align-middle"
>
<%-
if
lastlogin
%><%=
t
(
:last_used
)
%>
:
<%=
lastlogin
%><%-
else
%><%=
t
(
:never_used
)
%><%-
end
%>
</td>
<td>
<%=
form_tag
(
app_passwords_path
,
method:
"post"
)
do
%><%=
hidden_field_tag
(
:delete
,
''
,
value:
pw
)
%><%=
submit_tag
(
t
(
:delete
),
class:
"btn btn-danger"
)
%><%
end
%>
</td>
</tr>
<%
end
%>
</tbody>
</table>
<p>
<%=
submit_tag
t
(
:generate
)
%>
<%=
link_to
t
(
:back
),
root_path
%>
</p>
<%
end
%>
<div
class=
"card"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
<%=
t
(
:new_app_passwords
)
%>
</h5>
<%=
form_tag
(
app_passwords_path
,
method:
"post"
)
do
%>
<div
class=
"row mb-2"
>
<div
class=
"col"
>
<%=
label_tag
(
:app_name
,
t
(
:app_name
))
%>
<%=
text_field_tag
(
:app_name
,
''
,
value:
t
(
:app_name
),
autocomplete:
'off'
,
class:
"form-control"
)
%>
</div>
<div
class=
"col"
>
<%=
label_tag
(
:password
,
t
(
:your_main_pw
))
%>
<%=
password_field_tag
(
:password
,
nil
,
placeholder:
t
(
:enter_your_current_pw
),
class:
"form-control"
)
%>
</div>
</div>
<%=
submit_tag
(
t
(
:generate
),
class:
"btn btn-primary"
)
%>
<%
end
%>
</div>
</div>
<%
end
%>
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