Commit c12695f1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add preview page for appearance settings

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 4f830817
......@@ -4,6 +4,9 @@ class Admin::AppearancesController < Admin::ApplicationController
def show
end
def preview
end
def create
@appearance = Appearance.new(appearance_params)
......
%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'
%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"
%h3.page-title
Appearance settings
%p.light
You can modify look of sign-in and sign-up pages here
%hr
= render 'form'
......@@ -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
......
Markdown is supported
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