Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c12695f1
Commit
c12695f1
authored
Apr 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add preview page for appearance settings
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4f830817
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
8 deletions
+44
-8
app/controllers/admin/appearances_controller.rb
app/controllers/admin/appearances_controller.rb
+3
-0
app/views/admin/appearances/_form.html.haml
app/views/admin/appearances/_form.html.haml
+1
-7
app/views/admin/appearances/preview.html.haml
app/views/admin/appearances/preview.html.haml
+28
-0
app/views/admin/appearances/show.html.haml
app/views/admin/appearances/show.html.haml
+7
-0
config/routes.rb
config/routes.rb
+5
-1
No files found.
app/controllers/admin/appearances_controller.rb
View file @
c12695f1
...
...
@@ -4,6 +4,9 @@ class Admin::AppearancesController < Admin::ApplicationController
def
show
end
def
preview
end
def
create
@appearance
=
Appearance
.
new
(
appearance_params
)
...
...
app/views/admin/appearances/_form.html.haml
View file @
c12695f1
%h3
.page-title
Appearance settings
%p
.light
You can modify look of sign-in and sign-up pages here
%hr
=
form_for
@appearance
,
url:
admin_appearances_path
,
html:
{
class:
'form-horizontal'
}
do
|
f
|
-
if
@appearance
.
errors
.
any?
.alert.alert-danger
...
...
@@ -31,3 +24,4 @@
Logo size is limited with 1MB
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-save'
=
link_to
'Preview'
,
preview_admin_appearances_path
,
class:
'btn'
,
target:
'_blank'
app/views/admin/appearances/preview.html.haml
0 → 100644
View file @
c12695f1
%h3
.page-title
Appearance settings - Preview
%hr
.ui-box
.title
Sign-in page
%div
.login-page
.container
.content
.login-title
%h1
=
brand_title
%hr
.container
.content
.row
.col-sm-7
.brand-image
=
brand_image
.brand_text
=
brand_text
.col-sm-4
.login-box
%h3
.page-title
Sign in
=
text_field_tag
:login
,
nil
,
class:
"form-control top"
,
placeholder:
"Username or Email"
=
password_field_tag
:password
,
nil
,
class:
"form-control bottom"
,
placeholder:
"Password"
=
button_tag
"Sign in"
,
class:
"btn-create btn"
app/views/admin/appearances/show.html.haml
View file @
c12695f1
%h3
.page-title
Appearance settings
%p
.light
You can modify look of sign-in and sign-up pages here
%hr
=
render
'form'
config/routes.rb
View file @
c12695f1
...
...
@@ -100,7 +100,11 @@ Gitlab::Application.routes.draw do
end
end
resource
:appearances
resource
:appearances
do
member
do
get
:preview
end
end
root
to:
"dashboard#index"
end
...
...
Write
Preview
Markdown
is supported
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