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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
7f6e41fa
Commit
7f6e41fa
authored
Jan 28, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap: application layout
parent
05d76fc4
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
951 additions
and
204 deletions
+951
-204
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+24
-0
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+0
-17
app/assets/stylesheets/projects.css.scss.bak
app/assets/stylesheets/projects.css.scss.bak
+384
-0
app/assets/stylesheets/projects.css.scss~
app/assets/stylesheets/projects.css.scss~
+385
-0
app/views/dashboard/_issues_feed.html.haml
app/views/dashboard/_issues_feed.html.haml
+4
-4
app/views/dashboard/_projects_feed.html.haml
app/views/dashboard/_projects_feed.html.haml
+14
-15
app/views/dashboard/_sidebar.html.haml
app/views/dashboard/_sidebar.html.haml
+0
-16
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+2
-0
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+5
-0
app/views/dashboard/merge_requests.html.haml
app/views/dashboard/merge_requests.html.haml
+2
-0
app/views/layouts/_app_side.html.haml
app/views/layouts/_app_side.html.haml
+10
-0
app/views/layouts/_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+0
-25
app/views/layouts/_projects_side.html.haml
app/views/layouts/_projects_side.html.haml
+35
-0
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+12
-14
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+6
-2
app/views/projects/_form.html.haml
app/views/projects/_form.html.haml
+26
-55
app/views/projects/_tile.html.haml
app/views/projects/_tile.html.haml
+8
-17
app/views/projects/create.js.haml
app/views/projects/create.js.haml
+1
-0
app/views/projects/index.html.haml
app/views/projects/index.html.haml
+15
-27
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+16
-11
app/views/projects/update.js.haml
app/views/projects/update.js.haml
+1
-0
spec/requests/merge_requests_spec.rb
spec/requests/merge_requests_spec.rb
+1
-1
No files found.
app/assets/stylesheets/common.scss
View file @
7f6e41fa
...
@@ -105,6 +105,19 @@ $blue_link: "#2fa0bb";
...
@@ -105,6 +105,19 @@ $blue_link: "#2fa0bb";
border-right
:
1px
solid
$border_color
;
border-right
:
1px
solid
$border_color
;
height
:
100%
;
height
:
100%
;
min-height
:
450px
;
min-height
:
450px
;
.fixed
{
position
:fixed
;
}
aside
a
{
display
:block
;
position
:relative
;
padding
:
15px
10px
;
margin
:
10px
0
0
0
;
font-size
:
13px
;
font-weight
:bold
;
}
}
}
.container-fluid
>
.content
{
.container-fluid
>
.content
{
...
@@ -112,6 +125,17 @@ $blue_link: "#2fa0bb";
...
@@ -112,6 +125,17 @@ $blue_link: "#2fa0bb";
margin-top
:
20px
;
margin-top
:
20px
;
}
}
aside
.projects
{
margin-left
:
0
;
padding-left
:
20px
;
}
img
.avatar
{
width
:
32px
;
float
:left
;
padding-right
:
5px
;
}
@import
"reset_bootstrap.scss"
;
@import
"reset_bootstrap.scss"
;
@import
"top_panel.scss"
;
@import
"top_panel.scss"
;
@import
"projects.css.scss"
;
@import
"projects.css.scss"
;
...
...
app/assets/stylesheets/projects.css.scss
View file @
7f6e41fa
.git_url_wrapper
{
.git_url_wrapper
{
margin-right
:
50px
margin-right
:
50px
}
}
.project
{
.sidebar
{
.fixed
{
position
:fixed
;
}
aside
a
{
display
:block
;
position
:relative
;
padding
:
15px
10px
;
margin
:
10px
0
0
0
;
font-size
:
13px
;
font-weight
:bold
;
}
}
}
.file_stats
{
.file_stats
{
span
{
span
{
img
{
img
{
...
...
app/assets/stylesheets/projects.css.scss.bak
0 → 100644
View file @
7f6e41fa
.git_url_wrapper { margin-right:50px }
.sidebar aside a{
display: block;
position: relative;
padding: 15px 10px;
margin: 10px 0 0 0;
span.number{
float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px;
}
&.current {
color: white;
background: $active_bg_color;
border: 1px solid $active_bd_color;
border-radius:5px;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 0;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-right: -1px;
}
}
body table .commit a{color: #{$blue_link}}
body table th, body table td{ border-bottom: 1px solid #DEE2E3;}
body .fixed{position: fixed; }
/** File stat **/
.file_stats {
span {
img {
width:14px;
float:left;
margin-right: 6px;
padding:2px 0;
}
}
}
.round-borders {
@include round-borders-all(4px);
padding: 4px 0px;
}
table.round-borders {
float:left;
text-align: left;
}
/** PROJECTS **/
input.ssh_project_url {
padding:5px;
margin:0px;
float:right;
width:400px;
text-align:center;
}
#projects-list .project {
height:50px;
}
#tree-slider .tree-item,
#projects-list .project,
#snippets-table .snippet,
#issues-table .issue{
cursor:pointer;
}
.clear {
clear: both;
}
#user_projects_limit{
width: 60px;
}
.handle:hover{
cursor: move;
}
.project-refs-form {
span {
background: none !important;
position:static !important;
width:auto !important;
height: auto !important;
}
}
.project-refs-select {
width:200px;
}
.filter .left { margin-right:15px; }
body table .commit {
a.tree-commit-link {
color:#444;
&:hover {
text-decoration:underline;
}
}
}
/** NEW PROJECT **/
.new-project-hodler {
.icon span { background-position: -31px -70px; }
td { border-bottom: 1px solid #DEE2E3; }
}
/** Feed entry **/
.commit,
.snippet,
.message {
.title {
color:#666;
a { color:#666 !important; }
p { margin-top:0px; }
}
.author { color: #999 }
}
/** JQuery UI **/
.ui-autocomplete { @include round-borders-all(5px); }
.ui-menu-item { cursor: pointer }
.ui-selectmenu{
@include round-borders-all(4px);
margin-right:10px;
font-size:1.5em;
height:auto;
font-weight:bold;
.ui-selectmenu-status {
padding:3px 10px;
}
}
#holder {
background:#FAFAFA;
border: 1px solid #EEE;
cursor: move;
height: 70%;
overflow: hidden;
}
/* Project Dashboard Page */
html, body { height: 100%; }
.news-feed h2{float: left;}
.news-feed .project-updates {margin-bottom: 20px; display: block; width: 100%;}
.news-feed .project-updates .data{ padding: 0}
.news-feed .project-updates a.project-update {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
.news-feed .project-updates a.project-update:last-child{border-bottom: 0}
.news-feed .project-updates a.project-update img{float: left; margin-right: 10px;}
.news-feed .project-updates a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;}
.news-feed .project-updates a.project-update span.update-title{margin-bottom: 10px}
.news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;}
.news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;}
/* eo Dashboard Page */
/** Update entry **/
.update-data { padding: 0 }
.update-data { width:100%; }
.update-data.ui-box .data { padding:0; }
a.update-item {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
a.update-item:last-child{border-bottom: 0}
a.update-item img{float: left; margin-right: 10px;}
a.update-item span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;}
a.update-item span.update-title{margin-bottom: 10px}
a.update-item span.update-author{color: #999; font-weight: normal; font-style: italic;}
a.update-item span.update-author strong{font-weight: bold; font-style: normal;}
body .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; }
body.projects-page input.text.git-url.project_list_url { width:165px; }
body table.no-borders th {
background:none;
border-bottom:1px solid #CCC;
color:#333;
}
body table.no-borders tr,
body table.no-borders td{
border:none;
}
.ajax-tab-loading {
padding:40px;
display:none;
}
#tree-content-holder { float:left; width:100%; }
#tree-readme-holder {
float:left;
width:100%;
.readme {
@include round-borders-all(4px);
padding: 4px 15px;
background:#F7F7F7;
}
}
/* Commit Page */
.entity-info {float: right;}
.entity-button{
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4));
background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4);
background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4);
background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4);
box-shadow: 0 -1px 0 white inset;
display: block;
border: 1px solid #eee;
border-radius: 5px;
margin-bottom: 2px;
position: relative;
padding: 4px 10px;
font-size: 11px;
padding-right: 20px;
}
.entity-button i{
background: url('images.png') no-repeat -138px -27px;
width: 6px;
height: 9px;
float: right;
position: absolute;
top: 6px;
right: 5px;
}
.box-arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999; margin: 1.5em 0;}
h4.dash-tabs {
margin: 0;
border-bottom: 1px solid #ccc;
padding: 10px 10px;
font-size: 11px;
padding-left:20px;
font-weight: bold; text-transform: uppercase;
background: #F7F7F7;
margin-bottom:20px;
height:13px;
}
.dash-button {
border-right: 1px solid #ddd;
background:none;
padding: 10px 15px;
float:left;
position:relative;
top:-10px;
left:0px;
height:13px;
&:first-child {
border-left: 1px solid #ddd;
}
&.active {
background: #eaeaea;
}
}
.dashboard-loader {
float:right;
margin-right:30px;
display:none;
}
.merge-tabs {
margin: 0;
border: 1px solid #ccc;
padding: 5px;
font-size: 12px;
background: #F7F7F7;
margin-bottom:20px;
height:26px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
.tab {
font-weight: bold;
border-right: 1px solid #ddd;
background:none;
padding: 10px;
min-width:60px;
float:left;
position:relative;
top:-5px;
left:-5px;
height:16px;
padding-left:34px;
span {
width: 20px;
height: 20px;
display: inline-block;
position: absolute;
left: 8px;
top: 8px;
}
&.active {
background: #eaeaea;
}
}
}
.merge-tabs.repository .tab span{ background: url("images.png") no-repeat -38px -77px; }
.activities-tab span { background: url("images.png") no-repeat -161px -1px; }
.stat-tab span,
.team-tab span,
.snippets-tab span { background: url("images.png") no-repeat -38px -77px; }
.files-tab span { background: url("images.png") no-repeat -112px -23px; }
.merge-notes-tab span { background: url("images.png") no-repeat -161px -1px; }
.merge-commits-tab span { background: url("images.png") no-repeat -86px 1px; }
.merge-diffs-tab span { background: url("images.png") no-repeat -118px 1px; }
.merge-tabs .dashboard-loader { padding:8px; }
.user-mention {
color: #2FA0BB;
font-weight: bold;
}
.author {
color: #999;
}
.dark_scheme_box {
padding:20px 0;
label {
float:left;
box-shadow: 0 0px 5px rgba(0,0,0,.3);
img {
}
}
}
a.project-update.titled {
position: relative;
padding-left: 235px !important;
.title-block {
padding: 10px;
width: 205px;
position: absolute;
left: 0;
top: 0;
}
}
.add_new {
float: right;
background: #A6B807;
color: white;
padding: 4px 10px;
@include round-borders-all(4px);
font-size:11px;
margin: 10px 0;
}
app/assets/stylesheets/projects.css.scss~
0 → 100644
View file @
7f6e41fa
.git_url_wrapper { margin-right:50px }
.sidebar aside a{
display: block;
position: relative;
padding: 15px 10px;
margin: 10px 0 0 0;
font-size:13px;
font-weight:bold;
color:#333;
&.current {
color: white;
background: $active_bg_color;
border: 1px solid $active_bd_color;
border-radius:5px;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 0;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-right: -1px;
}
}
body table .commit a{color: #{$blue_link}}
body table th, body table td{ border-bottom: 1px solid #DEE2E3;}
body .fixed{position: fixed; }
/** File stat **/
.file_stats {
span {
img {
width:14px;
float:left;
margin-right: 6px;
padding:2px 0;
}
}
}
.round-borders {
@include round-borders-all(4px);
padding: 4px 0px;
}
table.round-borders {
float:left;
text-align: left;
}
/** PROJECTS **/
input.ssh_project_url {
padding:5px;
margin:0px;
float:right;
width:400px;
text-align:center;
}
#projects-list .project {
height:50px;
}
#tree-slider .tree-item,
#projects-list .project,
#snippets-table .snippet,
#issues-table .issue{
cursor:pointer;
}
.clear {
clear: both;
}
#user_projects_limit{
width: 60px;
}
.handle:hover{
cursor: move;
}
.project-refs-form {
span {
background: none !important;
position:static !important;
width:auto !important;
height: auto !important;
}
}
.project-refs-select {
width:200px;
}
.filter .left { margin-right:15px; }
body table .commit {
a.tree-commit-link {
color:#444;
&:hover {
text-decoration:underline;
}
}
}
/** NEW PROJECT **/
.new-project-hodler {
.icon span { background-position: -31px -70px; }
td { border-bottom: 1px solid #DEE2E3; }
}
/** Feed entry **/
.commit,
.snippet,
.message {
.title {
color:#666;
a { color:#666 !important; }
p { margin-top:0px; }
}
.author { color: #999 }
}
/** JQuery UI **/
.ui-autocomplete { @include round-borders-all(5px); }
.ui-menu-item { cursor: pointer }
.ui-selectmenu{
@include round-borders-all(4px);
margin-right:10px;
font-size:1.5em;
height:auto;
font-weight:bold;
.ui-selectmenu-status {
padding:3px 10px;
}
}
#holder {
background:#FAFAFA;
border: 1px solid #EEE;
cursor: move;
height: 70%;
overflow: hidden;
}
/* Project Dashboard Page */
html, body { height: 100%; }
.news-feed h2{float: left;}
.news-feed .project-updates {margin-bottom: 20px; display: block; width: 100%;}
.news-feed .project-updates .data{ padding: 0}
.news-feed .project-updates a.project-update {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
.news-feed .project-updates a.project-update:last-child{border-bottom: 0}
.news-feed .project-updates a.project-update img{float: left; margin-right: 10px;}
.news-feed .project-updates a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;}
.news-feed .project-updates a.project-update span.update-title{margin-bottom: 10px}
.news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;}
.news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;}
/* eo Dashboard Page */
/** Update entry **/
.update-data { padding: 0 }
.update-data { width:100%; }
.update-data.ui-box .data { padding:0; }
a.update-item {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
a.update-item:last-child{border-bottom: 0}
a.update-item img{float: left; margin-right: 10px;}
a.update-item span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;}
a.update-item span.update-title{margin-bottom: 10px}
a.update-item span.update-author{color: #999; font-weight: normal; font-style: italic;}
a.update-item span.update-author strong{font-weight: bold; font-style: normal;}
body .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; }
body.projects-page input.text.git-url.project_list_url { width:165px; }
body table.no-borders th {
background:none;
border-bottom:1px solid #CCC;
color:#333;
}
body table.no-borders tr,
body table.no-borders td{
border:none;
}
.ajax-tab-loading {
padding:40px;
display:none;
}
#tree-content-holder { float:left; width:100%; }
#tree-readme-holder {
float:left;
width:100%;
.readme {
@include round-borders-all(4px);
padding: 4px 15px;
background:#F7F7F7;
}
}
/* Commit Page */
.entity-info {float: right;}
.entity-button{
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4));
background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4);
background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4);
background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4);
box-shadow: 0 -1px 0 white inset;
display: block;
border: 1px solid #eee;
border-radius: 5px;
margin-bottom: 2px;
position: relative;
padding: 4px 10px;
font-size: 11px;
padding-right: 20px;
}
.entity-button i{
background: url('images.png') no-repeat -138px -27px;
width: 6px;
height: 9px;
float: right;
position: absolute;
top: 6px;
right: 5px;
}
.box-arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999; margin: 1.5em 0;}
h4.dash-tabs {
margin: 0;
border-bottom: 1px solid #ccc;
padding: 10px 10px;
font-size: 11px;
padding-left:20px;
font-weight: bold; text-transform: uppercase;
background: #F7F7F7;
margin-bottom:20px;
height:13px;
}
.dash-button {
border-right: 1px solid #ddd;
background:none;
padding: 10px 15px;
float:left;
position:relative;
top:-10px;
left:0px;
height:13px;
&:first-child {
border-left: 1px solid #ddd;
}
&.active {
background: #eaeaea;
}
}
.dashboard-loader {
float:right;
margin-right:30px;
display:none;
}
.merge-tabs {
margin: 0;
border: 1px solid #ccc;
padding: 5px;
font-size: 12px;
background: #F7F7F7;
margin-bottom:20px;
height:26px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
.tab {
font-weight: bold;
border-right: 1px solid #ddd;
background:none;
padding: 10px;
min-width:60px;
float:left;
position:relative;
top:-5px;
left:-5px;
height:16px;
padding-left:34px;
span {
width: 20px;
height: 20px;
display: inline-block;
position: absolute;
left: 8px;
top: 8px;
}
&.active {
background: #eaeaea;
}
}
}
.merge-tabs.repository .tab span{ background: url("images.png") no-repeat -38px -77px; }
.activities-tab span { background: url("images.png") no-repeat -161px -1px; }
.stat-tab span,
.team-tab span,
.snippets-tab span { background: url("images.png") no-repeat -38px -77px; }
.files-tab span { background: url("images.png") no-repeat -112px -23px; }
.merge-notes-tab span { background: url("images.png") no-repeat -161px -1px; }
.merge-commits-tab span { background: url("images.png") no-repeat -86px 1px; }
.merge-diffs-tab span { background: url("images.png") no-repeat -118px 1px; }
.merge-tabs .dashboard-loader { padding:8px; }
.user-mention {
color: #2FA0BB;
font-weight: bold;
}
.author {
color: #999;
}
.dark_scheme_box {
padding:20px 0;
label {
float:left;
box-shadow: 0 0px 5px rgba(0,0,0,.3);
img {
}
}
}
a.project-update.titled {
position: relative;
padding-left: 235px !important;
.title-block {
padding: 10px;
width: 205px;
position: absolute;
left: 0;
top: 0;
}
}
.add_new {
float: right;
background: #A6B807;
color: white;
padding: 4px 10px;
@include round-borders-all(4px);
font-size:11px;
margin: 10px 0;
}
app/views/dashboard/_issues_feed.html.haml
View file @
7f6e41fa
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
.data
.data
-
@issues
.
each
do
|
update
|
-
@issues
.
each
do
|
update
|
%a
.project-update
{
:href
=>
dashboard_feed_path
(
update
.
project
,
update
)}
%a
.project-update
{
:href
=>
dashboard_feed_path
(
update
.
project
,
update
)}
%strong
.issue-number
=
"#
#{
update
.
id
}
"
.avatar
=
image_tag
gravatar_icon
(
update
.
assignee_email
),
:class
=>
"avatar"
,
:width
=>
32
%
span
.update-title
%
div
=
truncate
update
.
title
,
:length
=>
35
=
truncate
update
.
title
,
:length
=>
35
.right
=
truncate
update
.
project
.
name
.right
=
truncate
update
.
project
.
name
%span
.update-author
%span
.update-author
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
ago
ago
.right
.right
-
if
update
.
critical
-
if
update
.
critical
%span
.
tag.high
critical
%span
.
label.important
critical
-
if
update
.
today?
-
if
update
.
today?
%span
.
tag.today
today
%span
.
label.new
today
-
else
-
else
%h2
%h2
...
...
app/views/dashboard/_projects_feed.html.haml
View file @
7f6e41fa
...
@@ -2,19 +2,18 @@
...
@@ -2,19 +2,18 @@
-
@active_projects
.
first
(
3
).
each
do
|
project
|
-
@active_projects
.
first
(
3
).
each
do
|
project
|
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
=
link_to
project
do
=
link_to
project
do
%h3
=
project
.
name
%h4
=
project
.
name
.data
-
project
.
updates
(
3
).
each
do
|
update
|
-
project
.
updates
(
3
).
each
do
|
update
|
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%div
%span
.update-title
=
dashboard_feed_title
(
update
)
=
dashboard_feed_title
(
update
)
%span
.update-author
%span
.update-author
%strong
=
update
.
author_name
%strong
=
update
.
author_name
authored
authored
=
time_ago_in_words
(
update
.
created_at
)
=
time_ago_in_words
(
update
.
created_at
)
ago
ago
.right
.right
-
klass
=
update
.
class
.
to_s
.
split
(
"::"
).
last
.
downcase
-
klass
=
update
.
class
.
to_s
.
split
(
"::"
).
last
.
downcase
%span
.tag
{
:class
=>
klass
}=
klass
%span
.tag
{
:class
=>
klass
}=
klass
app/views/dashboard/_sidebar.html.haml
deleted
100644 → 0
View file @
05d76fc4
%aside
%h4
Your Projects
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
:class
=>
"btn small"
do
New Project
%ol
.project-list
-
@projects
.
each
do
|
project
|
%li
%a
{
:href
=>
project_path
(
project
)}
-#%span.arrow →
%span
.project-name
=
project
.
name
%span
.time
%strong
Last activity:
=
project
.
last_activity_date_cached
?
time_ago_in_words
(
project
.
last_activity_date_cached
)
+
" ago"
:
"Never"
app/views/dashboard/index.html.haml
View file @
7f6e41fa
%h3
Activities
%hr
.news-feed
=
render
"dashboard/projects_feed"
.news-feed
=
render
"dashboard/projects_feed"
app/views/dashboard/issues.html.haml
View file @
7f6e41fa
%h3
Issues
%small
( authored or assigned to you )
%hr
.news-feed
=
render
"dashboard/issues_feed"
.news-feed
=
render
"dashboard/issues_feed"
app/views/dashboard/merge_requests.html.haml
View file @
7f6e41fa
%h3
Merge Requests
%hr
.news-feed
=
render
"dashboard/merge_requests_feed"
.news-feed
=
render
"dashboard/merge_requests_feed"
app/views/layouts/_app_side.html.haml
0 → 100644
View file @
7f6e41fa
.fixed
%aside
=
link_to
"Activities"
,
dashboard_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"active"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
-
if
current_user
.
is_admin?
=
link_to
admin_root_path
,
:class
=>
"admin"
,
:title
=>
"Admin"
do
Admin
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"active"
if
controller
.
controller_name
==
"help"
}
"
app/views/layouts/_head_panel.html.haml
View file @
7f6e41fa
...
@@ -16,18 +16,6 @@
...
@@ -16,18 +16,6 @@
=
render
:partial
=>
"projects/refs"
,
:locals
=>
{
:destination
=>
controller
.
controller_name
==
"commits"
?
"commits"
:
"tree"
}
=
render
:partial
=>
"projects/refs"
,
:locals
=>
{
:destination
=>
controller
.
controller_name
==
"commits"
?
"commits"
:
"tree"
}
=
yield
:rss_icon
=
yield
:rss_icon
-
else
.dashboard_links
=
link_to
"Activities"
,
dashboard_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"active"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
-
if
current_user
.
is_admin?
=
link_to
admin_root_path
,
:class
=>
"admin"
,
:title
=>
"Admin"
do
Admin
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"active"
if
controller
.
controller_name
==
"help"
}
"
.search
=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
.account-box
.account-box
=
link_to
profile_path
,
:class
=>
"pic"
do
=
link_to
profile_path
,
:class
=>
"pic"
do
...
@@ -36,16 +24,3 @@
...
@@ -36,16 +24,3 @@
=
link_to
profile_path
,
:class
=>
"username"
do
=
link_to
profile_path
,
:class
=>
"username"
do
My profile
My profile
=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
-
if
current_user
=
javascript_tag
do
$(function(){
$("#search").autocomplete({
source:
#{
raw
search_autocomplete_source
}
,
select: function(event, ui) { location.href = ui.item.url }
});
});
-#- if current_user.require_ssh_key?
#no_ssh_key_defined.big-message.error
%p
No SSH Key is defined. You won't be able to use any Git command!. Click #{link_to( 'here', keys_path )} to add one!
app/views/layouts/_projects_side.html.haml
0 → 100644
View file @
7f6e41fa
%aside
.projects
-
if
current_user
.
can_create_project?
.alert-message.block-message.info
You can create at least
=
current_user
.
projects_limit
projects. Click on button to add a new one
=
link_to
new_project_path
,
:class
=>
"btn small"
do
New Project
%h4
Recent Projects:
%ul
-
current_user
.
projects
.
order
(
"id DESC"
).
limit
(
5
).
each
do
|
project
|
%li
=
link_to
project_path
(
project
)
do
=
project
.
name
%h4
Recent Issues:
%ul
-
current_user
.
assigned_issues
.
order
(
"id DESC"
).
limit
(
5
).
each
do
|
issue
|
%li
=
link_to
project_issue_path
(
issue
.
project
,
issue
)
do
=
truncate
issue
.
title
%h4
Recent Requests:
%ul
-
current_user
.
assigned_merge_requests
.
order
(
"id DESC"
).
limit
(
5
).
each
do
|
issue
|
%li
=
link_to
project_merge_request_path
(
issue
.
project
,
issue
)
do
=
truncate
issue
.
title
app/views/layouts/admin.html.haml
View file @
7f6e41fa
...
@@ -11,19 +11,17 @@
...
@@ -11,19 +11,17 @@
=
javascript_tag
do
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
{
:class
=>
body_class
(
'project-page'
),
:id
=>
yield
(
:boyd_id
)}
%body
.admin
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
#container
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/head_panel"
.container-fluid
.project-container
.sidebar
.project-sidebar
.fixed
.fixed
%aside
%aside
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Teams"
,
admin_team_members_path
,
:class
=>
controller
.
controller_name
==
"team_members"
?
"current"
:
nil
=
link_to
"Teams"
,
admin_team_members_path
,
:class
=>
controller
.
controller_name
==
"team_members"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
=
link_to
"Resque"
,
"/info/resque"
=
link_to
"Resque"
,
"/info/resque"
.project-content
.content
=
yield
=
yield
app/views/layouts/application.html.haml
View file @
7f6e41fa
...
@@ -12,5 +12,9 @@
...
@@ -12,5 +12,9 @@
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/head_panel"
.container-fluid
.container-fluid
.sidebar
=
render
:partial
=>
"dashboard/sidebar"
.sidebar
.content
=
yield
=
render
:partial
=>
"layouts/app_side"
.content
.row
.span10
=
yield
.span4
=
render
"layouts/projects_side"
app/views/projects/_form.html.haml
View file @
7f6e41fa
=
form_for
(
@project
,
:remote
=>
true
)
do
|
f
|
=
form_for
(
@project
,
:remote
=>
true
)
do
|
f
|
%div
.form_content
-
if
@project
.
errors
.
any?
-
unless
@project
.
new_record?
.alert-message.block-message.error
%h2
.icon
%ul
%span
=
@project
.
name
.clear
-
if
@project
.
errors
.
any?
%ul
.errors_holder
-
@project
.
errors
.
full_messages
.
each
do
|
msg
|
-
@project
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
%li
=
msg
%table
.clearfix
%tr
=
f
.
label
:name
%td
=
f
.
label
:name
.input
=
f
.
text_field
:name
,
:placeholder
=>
"Example Project"
%td
=
f
.
text_field
:name
,
:placeholder
=>
"Example Project"
.clearfix
%tr
=
f
.
label
:path
do
%td
Path
.left
=
f
.
label
:path
%cite
=
"git@
#{
GIT_HOST
[
"host"
]
}
:"
%cite
.right
=
"git@
#{
GIT_HOST
[
"host"
]
}
:"
.input
=
f
.
text_field
:path
,
:placeholder
=>
"example_project"
,
:disabled
=>
!
@project
.
new_record?
%td
.clearfix
=
f
.
text_field
:path
,
:placeholder
=>
"example_project"
,
:disabled
=>
!
@project
.
new_record?
=
f
.
label
:code
do
%tr
Code
%td
%cite
=
"http://
#{
GIT_HOST
[
"host"
]
}
/"
.left
=
f
.
label
:code
.input
=
f
.
text_field
:code
,
:placeholder
=>
"example"
%cite
.right
=
"http://
#{
GIT_HOST
[
"host"
]
}
/"
%td
=
f
.
text_field
:code
,
:placeholder
=>
"example"
-
unless
@project
.
new_record?
||
@project
.
heads
.
empty?
-
unless
@project
.
new_record?
||
@project
.
heads
.
empty?
%tr
.clearfix
%td
=
f
.
label
:default_branch
,
"Default Branch"
=
f
.
label
:default_branch
,
"Default Branch"
%td
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:300px;"
)
.input
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:300px;"
)
-#%tr
%td= f.label :tag_list
.clearfix
%td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
=
f
.
label
:description
%tr
.input
=
f
.
text_area
:description
,
:placeholder
=>
"project description"
,
:style
=>
"height:50px"
%td
=
f
.
label
:description
%td
=
f
.
text_area
:description
,
:placeholder
=>
"project description"
,
:style
=>
"height:50px"
%br
%br
%div
{
:class
=>
"ajax_loader"
,
:style
=>
"display:none;height:200px;"
}
%center
=
image_tag
"ajax-loader.gif"
,
:class
=>
"append-bottom"
-
if
@project
.
new_record?
%h3
.prepend-top
Creating project
&
repository. Please wait for few minutes
-
else
%h3
.prepend-top
Updating project
&
repository. Please wait for few minutes
.merge-tabs
.merge-tabs
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
-
unless
@project
.
new_record?
-
unless
@project
.
new_record?
.right
.right
=
link_to
'Remove'
,
@project
,
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"red-button"
=
link_to
'Remove'
,
@project
,
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn"
:javascript
$
(
function
(){
$
(
'
.new_project, .edit_project
'
).
bind
(
'
ajax:before
'
,
function
()
{
$
(
this
).
find
(
"
.form_content
"
).
hide
();
$
(
'
.ajax_loader
'
).
show
();
});
taggifyForm
();
$
(
'
form #project_default_branch
'
).
chosen
();
})
app/views/projects/_tile.html.haml
View file @
7f6e41fa
-
@projects
.
in_groups_of
(
3
,
false
)
do
|
projects
|
-
@projects
.
in_groups_of
(
2
,
false
)
do
|
projects
|
-
projects
.
each_with_index
do
|
project
,
i
|
.row
%div
.grid_1.projects_selector
-
projects
.
each_with_index
do
|
project
,
i
|
%div
{
:class
=>
"project-box ui-box ui-box-big"
}
.span4.well
=
link_to
project_path
(
project
)
do
=
link_to
project_path
(
project
)
do
%h3
=
truncate
(
project
.
name
,
:length
=>
20
)
%h3
=
truncate
(
project
.
name
,
:length
=>
20
)
.data
%p
.title.repository.git_url_wrapper
%p
.title.repository.git_url_wrapper
%input
{
:value
=>
project
.
url_to_repo
,
:class
=>
[
'git-url'
,
'one_click_select'
,
'text'
,
'project_list_url'
],
:readonly
=>
'readonly'
}
%span
Repository:
%input
{
:value
=>
project
.
url_to_repo
,
:class
=>
[
'git-url'
,
'one_click_select'
,
'text'
,
'project_list_url'
],
:readonly
=>
'readonly'
}
%p
.title.activity
%span
Last Activity:
-
if
project
.
last_activity_date_cached
=
project
.
last_activity_date_cached
.
stamp
(
"Aug 24, 2011"
)
-
else
Never
.buttons
%a
.btn
{
:href
=>
tree_project_ref_path
(
project
,
project
.
root_ref
)}
Browse code
%a
.browse-code.button.yellow
{
:href
=>
tree_project_ref_path
(
project
,
project
.
root_ref
)}
Browse code
%a
.btn
{
:href
=>
project_commits_path
(
project
)}
Commits
%a
.commits.button.green
{
:href
=>
project_commits_path
(
project
)}
Commits
app/views/projects/create.js.haml
View file @
7f6e41fa
...
@@ -4,3 +4,4 @@
...
@@ -4,3 +4,4 @@
-
else
-
else
:plain
:plain
$("#new_project").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$("#new_project").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$('.ajax_loader').hide();
app/views/projects/index.html.haml
View file @
7f6e41fa
-
content_for
(
:body_class
,
"projects-page"
)
%h3
Projects
.container_4
%hr
.grid_4
-
unless
@projects
.
empty?
-
if
current_user
.
can_create_project?
%div
.tile
=
render
"tile"
%a
.grey-button.right
{
:href
=>
new_project_path
}
Create new project
%h2
.icon
%span
Projects
%div
.clear
-# If projects requris paging
-
unless
@projects
.
empty?
-# We add ajax loader & init script
%div
{
:class
=>
"tile"
}
-
if
@projects
.
count
==
@limit
=
render
"tile"
.loading
{
:style
=>
"display:none;"
}
%center
=
image_tag
"ajax-loader.gif"
-# If projects requris paging
:javascript
-# We add ajax loader & init script
$
(
function
(){
-
if
@projects
.
count
==
@limit
ProjectsList
.
init
(
16
);
.clear
});
.loading
{
:style
=>
"display:none;"
}
-
else
%center
=
image_tag
"ajax-loader.gif"
%h2
Nothing here
:javascript
$
(
function
(){
ProjectsList
.
init
(
16
);
});
-
else
%center
.prepend-top
%h2
%cite
Nothing here
app/views/projects/new.html.haml
View file @
7f6e41fa
-
content_for
(
:body_class
,
"new-project-page"
)
%h3
New Project
-
content_for
(
:page_title
)
do
%hr
.new-project-hodler
=
render
'form'
.container
%div
{
:class
=>
"ajax_loader"
,
:style
=>
"display:none;height:200px;"
}
%h2
.icon
%center
%span
=
image_tag
"ajax-loader.gif"
,
:class
=>
"append-bottom"
New Project
%h3
.prepend-top
Creating project
&
repository. Please wait for few minutes
%div
.clear
=
render
'form'
:javascript
:javascript
$
(
function
(){
$
(
function
(){
$
(
"
#project_name
"
).
change
(
function
(){
$
(
"
#project_name
"
).
live
(
"
change
"
,
function
(){
var
slug
=
slugify
(
$
(
this
).
val
());
var
slug
=
slugify
(
$
(
this
).
val
());
$
(
"
#project_code
"
).
val
(
slug
);
$
(
"
#project_code
"
).
val
(
slug
);
$
(
"
#project_path
"
).
val
(
slug
);
$
(
"
#project_path
"
).
val
(
slug
);
...
@@ -21,3 +18,11 @@
...
@@ -21,3 +18,11 @@
function
slugify
(
text
)
{
function
slugify
(
text
)
{
return
text
.
replace
(
/
[^
-a-zA-Z0-9
]
+/g
,
'
_
'
).
toLowerCase
();
return
text
.
replace
(
/
[^
-a-zA-Z0-9
]
+/g
,
'
_
'
).
toLowerCase
();
}
}
$
(
function
(){
$
(
'
.new_project
'
).
live
(
'
ajax:before
'
,
function
()
{
$
(
this
).
hide
();
$
(
'
.ajax_loader
'
).
show
();
});
$
(
'
form #project_default_branch
'
).
chosen
();
})
app/views/projects/update.js.haml
View file @
7f6e41fa
...
@@ -4,3 +4,4 @@
...
@@ -4,3 +4,4 @@
-
else
-
else
:plain
:plain
$(".edit_project").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$(".edit_project").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$('.ajax_loader').hide();
spec/requests/merge_requests_spec.rb
View file @
7f6e41fa
...
@@ -42,7 +42,7 @@ describe "MergeRequests" do
...
@@ -42,7 +42,7 @@ describe "MergeRequests" do
it
{
should
have_content
(
@merge_request
.
title
[
0
..
10
])
}
it
{
should
have_content
(
@merge_request
.
title
[
0
..
10
])
}
it
"Show page should inform user that merge request closed"
do
it
"Show page should inform user that merge request closed"
do
within
".
merge-
tabs"
do
within
".tabs"
do
page
.
should
have_content
"Reopen"
page
.
should
have_content
"Reopen"
end
end
end
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