diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index dbc7d820..d6aaec73 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -588,3 +588,7 @@ tr.line_notes_row { } } } + +.new-project-hodler { + padding:20px; +} diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss index 9acb8d0e..01ef6c34 100644 --- a/app/assets/stylesheets/style.scss +++ b/app/assets/stylesheets/style.scss @@ -712,8 +712,8 @@ body, button, input, select, textarea { .errors_holder { background:#D30; color:#fff; - border:1px solid $lite_border_color; @include round-borders-all(4px); + border:1px solid #a30; padding:5px; list-style:none; font-weight: bold; @@ -723,3 +723,33 @@ body, button, input, select, textarea { padding:10px; } } + +.notice_holder { + background:#DDF4FB; + color:#444; + border:1px solid #C6EDF9; + @include round-borders-all(4px); + padding:5px; + list-style:none; + font-weight: bold; + text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); + + li { + padding:10px; + } +} + +.alert_holder { + background:#FDF5D9; + color:#444; + border:1px solid #FCEEC1; + @include round-borders-all(4px); + padding:5px; + list-style:none; + font-weight: bold; + text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); + + li { + padding:10px; + } +} diff --git a/app/models/repository.rb b/app/models/repository.rb index 0bf1bc18..f4fdfe54 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -74,9 +74,9 @@ class Repository end def repo_exists? - repo && !repo.branches.empty? + @repo_exists ||= (repo && !repo.branches.empty?) rescue - false + @repo_exists = false end def tags diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index c52c4868..1b27ddaf 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -26,18 +26,19 @@ = link_to project_path(@project), :class => project_tab_class do Project - = link_to "Repository", project_repository_path(@project), :class => repository_tab_class - = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class - = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil - = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil - = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do - Issues - = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do - Wall - - if @project.common_notes.today.count > 0 - %span{ :class => "number" }= @project.common_notes.today.count - = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do - Requests + - if @project.repo_exists? + = link_to "Repository", project_repository_path(@project), :class => repository_tab_class + = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class + = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil + = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil + = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do + Issues + = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do + Wall + - if @project.common_notes.today.count > 0 + %span{ :class => "number" }= @project.common_notes.today.count + = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do + Requests diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 2fc6f9d9..421e8409 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -6,13 +6,9 @@ = @project.name .clear - if @project.errors.any? - #error_explanation - %h2 - = pluralize(@project.errors.count, "error") - prohibited this project from being saved: - %ul - - @project.errors.full_messages.each do |msg| - %li= msg + %ul.errors_holder + - @project.errors.full_messages.each do |msg| + %li= msg %table %tr %td= f.label :name diff --git a/app/views/projects/empty.html.erb b/app/views/projects/empty.html.erb deleted file mode 100644 index b85f801e..00000000 --- a/app/views/projects/empty.html.erb +++ /dev/null @@ -1,39 +0,0 @@ -<% bash_lexer = Pygments::Lexer[:bash] %> -