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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
00028702
Commit
00028702
authored
Mar 01, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
design tab improved. Themes added
parent
ed75afbb
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
64 additions
and
21 deletions
+64
-21
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+9
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+8
-0
app/models/user.rb
app/models/user.rb
+1
-1
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-1
app/views/layouts/error.html.haml
app/views/layouts/error.html.haml
+1
-1
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+1
-1
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+1
-1
app/views/profile/design.html.haml
app/views/profile/design.html.haml
+22
-8
db/migrate/20120301185805_add_theme_to_user.rb
db/migrate/20120301185805_add_theme_to_user.rb
+6
-0
db/schema.rb
db/schema.rb
+14
-8
No files found.
app/assets/stylesheets/common.scss
View file @
00028702
...
@@ -642,3 +642,12 @@ p.time {
...
@@ -642,3 +642,12 @@ p.time {
}
}
}
}
}
}
.styled_image
{
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
-moz-box-shadow
:
0
0
5px
#888
;
-webkit-box-shadow
:
0
0
5px
#888
;
box-shadow
:
0
0
5px
#888
;
}
app/helpers/application_helper.rb
View file @
00028702
...
@@ -113,4 +113,12 @@ module ApplicationHelper
...
@@ -113,4 +113,12 @@ module ApplicationHelper
def
layout
def
layout
controller
.
send
:_layout
controller
.
send
:_layout
end
end
def
app_theme
if
current_user
&&
current_user
.
theme_id
==
1
"ui_basic"
else
"ui_mars"
end
end
end
end
app/models/user.rb
View file @
00028702
...
@@ -6,7 +6,7 @@ class User < ActiveRecord::Base
...
@@ -6,7 +6,7 @@ class User < ActiveRecord::Base
# Setup accessible (or protected) attributes for your model
# Setup accessible (or protected) attributes for your model
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
,
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
,
:name
,
:projects_limit
,
:skype
,
:linkedin
,
:twitter
,
:dark_scheme
:name
,
:projects_limit
,
:skype
,
:linkedin
,
:twitter
,
:dark_scheme
,
:theme_id
has_many
:users_projects
,
:dependent
=>
:destroy
has_many
:users_projects
,
:dependent
=>
:destroy
has_many
:projects
,
:through
=>
:users_projects
has_many
:projects
,
:through
=>
:users_projects
...
...
app/views/layouts/application.html.haml
View file @
00028702
!!! 5
!!! 5
%html
{
:lang
=>
"en"
}
%html
{
:lang
=>
"en"
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_basic.application
%body
{
:class
=>
"#{app_theme} application"
}
=
render
"layouts/flash"
=
render
"layouts/flash"
=
render
"layouts/head_panel"
,
:title
=>
"Dashboard"
=
render
"layouts/head_panel"
,
:title
=>
"Dashboard"
.container
.container
...
...
app/views/layouts/error.html.haml
View file @
00028702
!!! 5
!!! 5
%html
{
:lang
=>
"en"
}
%html
{
:lang
=>
"en"
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_basic.application
%body
{
:class
=>
"#{app_theme} application"
}
=
render
"layouts/flash"
=
render
"layouts/flash"
=
render
"layouts/head_panel"
,
:title
=>
""
=
render
"layouts/head_panel"
,
:title
=>
""
.container
.container
...
...
app/views/layouts/profile.html.haml
View file @
00028702
!!! 5
!!! 5
%html
{
:lang
=>
"en"
}
%html
{
:lang
=>
"en"
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_basic.profile
%body
{
:class
=>
"#{app_theme} profile"
}
=
render
"layouts/flash"
=
render
"layouts/flash"
=
render
"layouts/head_panel"
,
:title
=>
"Profile"
=
render
"layouts/head_panel"
,
:title
=>
"Profile"
.container
.container
...
...
app/views/layouts/project.html.haml
View file @
00028702
!!! 5
!!! 5
%html
{
:lang
=>
"en"
}
%html
{
:lang
=>
"en"
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_basic.project
%body
{
:class
=>
"#{app_theme} project"
}
=
render
"layouts/flash"
=
render
"layouts/flash"
=
render
"layouts/head_panel"
,
:title
=>
@project
.
name
=
render
"layouts/head_panel"
,
:title
=>
@project
.
name
.container
.container
...
...
app/views/profile/design.html.haml
View file @
00028702
%h3
Design
=
form_for
@user
,
:url
=>
profile_update_path
,
:remote
=>
true
,
:method
=>
:put
do
|
f
|
%hr
%h3
Application theme
=
form_for
@user
,
:url
=>
profile_update_path
,
:method
=>
:put
do
|
f
|
%hr
.clearfix
=
label_tag
do
=
f
.
radio_button
:theme_id
,
1
Default
=
label_tag
do
=
f
.
radio_button
:theme_id
,
2
Classic
%br
%h3
Code review
%hr
.row
.row
%label
.span4
{
:for
=>
"user_dark_scheme_false"
}
%label
.span4
{
:for
=>
"user_dark_scheme_false"
}
=
image_tag
"white.png"
,
:width
=>
210
%center
%center
%h4
%h4
=
f
.
radio_button
:dark_scheme
,
false
=
f
.
radio_button
:dark_scheme
,
false
White code preview
White code preview
=
image_tag
"white.png"
,
:width
=>
210
,
:class
=>
"styled_image"
%label
.span4
{
:for
=>
"user_dark_scheme_true"
}
%label
.span4
{
:for
=>
"user_dark_scheme_true"
}
=
image_tag
"dark.png"
,
:width
=>
210
%center
%center
%h4
%h4
=
f
.
radio_button
:dark_scheme
,
true
=
f
.
radio_button
:dark_scheme
,
true
Dark code preview
Dark code preview
.clearfix
=
image_tag
"dark.png"
,
:width
=>
210
,
:class
=>
"styled_image"
.actions
=
f
.
submit
'Save'
,
:class
=>
"btn"
:javascript
$
(
function
(){
$
(
"
.edit_user input
"
).
bind
(
"
click
"
,
function
()
{
$
(
"
.edit_user
"
).
submit
();
});
})
db/migrate/20120301185805_add_theme_to_user.rb
0 → 100644
View file @
00028702
class
AddThemeToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:theme_id
,
:integer
,
:null
=>
false
,
:default
=>
1
end
end
db/schema.rb
View file @
00028702
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended to check this file into your version control system.
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
20120
228134252
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
20120
301185805
)
do
create_table
"events"
,
:force
=>
true
do
|
t
|
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
t
.
string
"target_type"
...
@@ -24,6 +24,18 @@ ActiveRecord::Schema.define(:version => 20120228134252) do
...
@@ -24,6 +24,18 @@ ActiveRecord::Schema.define(:version => 20120228134252) do
t
.
integer
"action"
t
.
integer
"action"
end
end
create_table
"features"
,
:force
=>
true
do
|
t
|
t
.
string
"name"
t
.
string
"branch_name"
t
.
integer
"assignee_id"
t
.
integer
"author_id"
t
.
integer
"project_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
string
"version"
t
.
integer
"status"
,
:default
=>
0
,
:null
=>
false
end
create_table
"issues"
,
:force
=>
true
do
|
t
|
create_table
"issues"
,
:force
=>
true
do
|
t
|
t
.
string
"title"
t
.
string
"title"
t
.
integer
"assignee_id"
t
.
integer
"assignee_id"
...
@@ -150,6 +162,7 @@ ActiveRecord::Schema.define(:version => 20120228134252) do
...
@@ -150,6 +162,7 @@ ActiveRecord::Schema.define(:version => 20120228134252) do
t
.
string
"twitter"
,
:default
=>
""
,
:null
=>
false
t
.
string
"twitter"
,
:default
=>
""
,
:null
=>
false
t
.
string
"authentication_token"
t
.
string
"authentication_token"
t
.
boolean
"dark_scheme"
,
:default
=>
false
,
:null
=>
false
t
.
boolean
"dark_scheme"
,
:default
=>
false
,
:null
=>
false
t
.
integer
"theme_id"
,
:default
=>
1
,
:null
=>
false
end
end
add_index
"users"
,
[
"email"
],
:name
=>
"index_users_on_email"
,
:unique
=>
true
add_index
"users"
,
[
"email"
],
:name
=>
"index_users_on_email"
,
:unique
=>
true
...
@@ -163,13 +176,6 @@ ActiveRecord::Schema.define(:version => 20120228134252) do
...
@@ -163,13 +176,6 @@ ActiveRecord::Schema.define(:version => 20120228134252) do
t
.
integer
"project_access"
,
:default
=>
0
,
:null
=>
false
t
.
integer
"project_access"
,
:default
=>
0
,
:null
=>
false
end
end
create_table
"web_hook_urls"
,
:force
=>
true
do
|
t
|
t
.
string
"url"
t
.
integer
"project_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
end
create_table
"web_hooks"
,
:force
=>
true
do
|
t
|
create_table
"web_hooks"
,
:force
=>
true
do
|
t
|
t
.
string
"url"
t
.
string
"url"
t
.
integer
"project_id"
t
.
integer
"project_id"
...
...
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