Commit c8b955a4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

lil restyle

parent c66bc99f
...@@ -6,6 +6,7 @@ gem "sqlite3" ...@@ -6,6 +6,7 @@ gem "sqlite3"
gem "devise", "1.5.0" gem "devise", "1.5.0"
gem "stamp" gem "stamp"
gem "kaminari" gem "kaminari"
gem "haml", "3.1.4"
gem "haml-rails" gem "haml-rails"
gem "jquery-rails" gem "jquery-rails"
gem "grit", :git => "https://github.com/gitlabhq/grit.git" gem "grit", :git => "https://github.com/gitlabhq/grit.git"
...@@ -25,6 +26,7 @@ gem "drapper" ...@@ -25,6 +26,7 @@ gem "drapper"
gem "resque" gem "resque"
gem "httparty" gem "httparty"
gem "charlock_holmes" gem "charlock_holmes"
gem "foreman"
group :assets do group :assets do
gem "sass-rails", "~> 3.1.0" gem "sass-rails", "~> 3.1.0"
......
...@@ -104,8 +104,11 @@ GEM ...@@ -104,8 +104,11 @@ GEM
faker (1.0.1) faker (1.0.1)
i18n (~> 0.4) i18n (~> 0.4)
ffi (1.0.11) ffi (1.0.11)
foreman (0.27.0)
term-ansicolor (~> 1.0.5)
thor (>= 0.13.6)
git (1.2.5) git (1.2.5)
haml (3.1.3) haml (3.1.4)
haml-rails (0.3.4) haml-rails (0.3.4)
actionpack (~> 3.0) actionpack (~> 3.0)
activesupport (~> 3.0) activesupport (~> 3.0)
...@@ -246,6 +249,7 @@ GEM ...@@ -246,6 +249,7 @@ GEM
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4) sqlite3 (1.3.4)
stamp (0.1.6) stamp (0.1.6)
term-ansicolor (1.0.7)
therubyracer (0.9.9) therubyracer (0.9.9)
libv8 (~> 3.3.10) libv8 (~> 3.3.10)
thin (1.3.1) thin (1.3.1)
...@@ -291,9 +295,11 @@ DEPENDENCIES ...@@ -291,9 +295,11 @@ DEPENDENCIES
devise (= 1.5.0) devise (= 1.5.0)
drapper drapper
faker faker
foreman
git git
gitolite! gitolite!
grit! grit!
haml (= 3.1.4)
haml-rails haml-rails
httparty httparty
jquery-rails jquery-rails
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
var Tree = { var Tree = {
init: init:
function() { function() {
(new Image).src = "/assets/ajax-loader-tree.gif"; (new Image).src = "ajax-loader-facebook.gif";
$('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() { $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() {
history.pushState({ path: this.path }, '', this.href) history.pushState({ path: this.path }, '', this.href)
...@@ -20,8 +20,8 @@ var Tree = { ...@@ -20,8 +20,8 @@ var Tree = {
}); });
$('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({ $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({
"ajax:beforeSend": function() { $('h2.icon').addClass("loading") }, "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); },
"ajax:complete": function() { $('h2.icon').removeClass("loading")} "ajax:complete": function() { $('.tree_progress').removeClass("loading"); }
}); });
} }
} }
...@@ -693,3 +693,36 @@ a.project-update.titled { ...@@ -693,3 +693,36 @@ a.project-update.titled {
top: 0; top: 0;
} }
} }
.add_new {
float:right;
padding: 5px 12px;
border: 1px solid #CCC;
&:hover {
background:#eee;
}
&:active {
background:#ddd;
}
}
.tree_progress {
float:left;
width:16px;
height:16px;
margin:6px;
&.loading {
background-position: 0px 0px;
background: url("ajax-loader-facebook.gif") no-repeat;
}
}
#tree-breadcrumbs {
h2 {
margin:0;
margin-bottom:20px;
float:left;
}
}
...@@ -3,7 +3,7 @@ class DashboardController < ApplicationController ...@@ -3,7 +3,7 @@ class DashboardController < ApplicationController
def index def index
@projects = current_user.projects.all @projects = current_user.projects.all
@active_projects = @projects.select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse @active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse
respond_to do |format| respond_to do |format|
format.html format.html
......
...@@ -28,10 +28,8 @@ module ProjectsHelper ...@@ -28,10 +28,8 @@ module ProjectsHelper
end end
def tree_tab_class def tree_tab_class
current_page?(:controller => "refs", controller.controller_name == "refs" ?
:action => "tree", "current" : nil
:project_id => @project,
:id => @ref || @project.root_ref ) ? "current" : nil
end end
def repository_tab_class def repository_tab_class
......
= render "repositories/head" = render "repositories/head"
.right= link_to "Add new", new_project_hook_path(@project), :class => "grey-button append-bottom-10"
- unless @hooks.empty? - unless @hooks.empty?
%div.update-data.ui-box.ui-box-small %div.update-data.ui-box.ui-box-small
.data .data
...@@ -19,7 +14,7 @@ ...@@ -19,7 +14,7 @@
%h3 No hooks %h3 No hooks
.clear .clear
%h3 Help %hr
%p %p
Post receive hooks. For now only POST request allowed. We send some data with request. Example below Post receive hooks. For now only POST request allowed. We send some data with request. Example below
......
...@@ -15,4 +15,13 @@ ...@@ -15,4 +15,13 @@
%span %span
Snippets Snippets
- if current_page?(project_snippets_path(@project))
- if can? current_user, :write_snippet, @project
= link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do
= image_tag "add_new.png", :width => 14
- if current_page?(team_project_path(@project))
- if can? current_user, :admin_team_member, @project
= link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member", :remote => true do
= image_tag "add_new.png", :width => 14
- if can? current_user, :admin_team_member, @project
%div#new-member-holder
.right= link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "grey-button"
.clear
%br
%table.round-borders#team-table %table.round-borders#team-table
%thead %thead
%th Name %th Name
......
%div.top_project_menu
- if @project.repo_exists?
%span= link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
%span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
%span= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
%span
= link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
Team
- if @project.users_projects.count > 0
%span{ :class => "top_menu_count" }= @project.users_projects.count
%span
= link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do
Issues
- if @project.issues.opened.count > 0
%span{ :class => "top_menu_count" }= @project.issues.opened.count
%span
= link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
Wall
- if @project.common_notes.count > 0
%span{ :class => "top_menu_count" }= @project.common_notes.count
%span
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
Snippets
- if @project.snippets.count > 0
%span{ :class => "top_menu_count" }= @project.snippets.non_expired.count
- if @commit
%span= link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil
#tree-breadcrumbs #tree-breadcrumbs
%h2.icon %h2
%span = link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do
%d = @project.code
= link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do - tree.breadcrumbs(4) do |link|
= @project.code \/
- tree.breadcrumbs(3) do |link| = link
\/ &nbsp;
= link %span.tree_progress
&nbsp;
.clear .clear
#tree-content-holder #tree-content-holder
- if tree.is_blob? - if tree.is_blob?
......
...@@ -15,5 +15,9 @@ ...@@ -15,5 +15,9 @@
%span %span
Deploy Keys Deploy Keys
- if current_page?(project_hooks_path(@project))
- if can? current_user, :admin_project, @project
= link_to new_project_hook_path(@project), :class => "add_new", :title => "New Web Hook" do
= image_tag "add_new.png", :width => 14
= render "projects/project_head" = render "projects/project_head"
- if can? current_user, :write_snippet, @project
.right= link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10"
- unless @snippets.fresh.empty? - unless @snippets.fresh.empty?
%div{ :class => "update-data ui-box ui-box-small ui-box-big" } %div{ :class => "update-data ui-box ui-box-small ui-box-big" }
......
...@@ -22,7 +22,7 @@ describe "TeamMembers" do ...@@ -22,7 +22,7 @@ describe "TeamMembers" do
before do before do
@user_1 = Factory :user @user_1 = Factory :user
visit team_project_path(@project) visit team_project_path(@project)
click_link "Add new" click_link "New Team Member"
end end
it "should open new team member popup" do it "should open new team member popup" do
......
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