new layout style
This commit is contained in:
parent
6cf000ff52
commit
84d1dead66
6 changed files with 62 additions and 83 deletions
|
@ -1,56 +0,0 @@
|
|||
<!-- Page Header -->
|
||||
<header>
|
||||
<h1 class="logo">
|
||||
<%= link_to "GITLAB", root_url %>
|
||||
</h1>
|
||||
<div class="account-box">
|
||||
<%= link_to profile_path, :class => "pic" do %>
|
||||
<%= image_tag gravatar_icon(current_user.email) %>
|
||||
<% end %>
|
||||
|
||||
<div class="account-links">
|
||||
<%= link_to profile_path, :class => "username" do %>
|
||||
<%#= current_user.name %>
|
||||
My profile
|
||||
<% end %>
|
||||
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
|
||||
</div>
|
||||
</div><!-- .account-box -->
|
||||
|
||||
<div class="search">
|
||||
<%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
|
||||
</div>
|
||||
<!-- .login-top -->
|
||||
<nav class="<%= 'shorter_nav' unless current_user.is_admin? %>">
|
||||
<%= link_to dashboard_path, :class => "#{'current' if current_page?(root_path)} dashboard" do %>
|
||||
<span></span>Dashboard
|
||||
<% end %>
|
||||
<%= link_to projects_path, :class =>"#{'current' if current_page?(projects_path)} project #{'last_elem' unless current_user.is_admin?}" do %>
|
||||
<span></span>Projects
|
||||
<% end %>
|
||||
<% if current_user.is_admin? %>
|
||||
<%= link_to((current_user.is_admin? ? admin_root_path : "#"), :class => "#{'current' if admin_namespace?} admin last_elem") do %>
|
||||
<span></span>Admin
|
||||
<% end %>
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<!-- eo Page Header -->
|
||||
|
||||
<% if current_user %>
|
||||
<%= javascript_tag do %>
|
||||
$(function() {
|
||||
$("#search" ).autocomplete({
|
||||
source: <%= raw search_autocomplete_source %>,
|
||||
select: function(event, ui) { location.href = ui.item.url }
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if current_user.require_ssh_key? %>
|
||||
<div id="no_ssh_key_defined" class="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!
|
||||
</div>
|
||||
<% end %>
|
36
app/views/layouts/_head_panel.html.haml
Normal file
36
app/views/layouts/_head_panel.html.haml
Normal file
|
@ -0,0 +1,36 @@
|
|||
/ Page Header
|
||||
%header
|
||||
- if @project && !@project.new_record?
|
||||
.project_name
|
||||
= truncate @project.name, :length => 20
|
||||
.git_url_wrapper
|
||||
%input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
|
||||
= yield :rss_icon
|
||||
|
||||
- if @project.repo_exists?
|
||||
.left{:style => "margin-left:5px;"}
|
||||
= render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" }
|
||||
.account-box
|
||||
= link_to profile_path, :class => "pic" do
|
||||
= image_tag gravatar_icon(current_user.email)
|
||||
.account-links
|
||||
= link_to profile_path, :class => "username" do
|
||||
My profile
|
||||
= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete
|
||||
/ .account-box
|
||||
-#.search
|
||||
= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
|
||||
/ .login-top
|
||||
- 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!
|
|
@ -18,31 +18,32 @@
|
|||
= render :partial => "layouts/flash"
|
||||
#container
|
||||
= render :partial => "layouts/head_panel"
|
||||
= render :partial => "layouts/middle_panel" if @project && !@project.new_record?
|
||||
-#= render :partial => "layouts/middle_panel" if @project && !@project.new_record?
|
||||
.project-container
|
||||
.project-sidebar
|
||||
.fixed
|
||||
%aside
|
||||
= link_to "Project", project_path(@project), :class => project_tab_class
|
||||
= link_to project_path(@project), :class => project_tab_class do
|
||||
= image_tag "Home-UI.PNG", :width => 26
|
||||
%span{ :class => "number" } Pr
|
||||
|
||||
= 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 => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
|
||||
= link_to "Network graph", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "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
|
||||
- if @project.issues.open_for(current_user).count > 0
|
||||
-#- if @project.issues.open_for(current_user).count > 0
|
||||
%span{ :class => "number" }= @project.issues.open_for(current_user).count
|
||||
= 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
|
||||
Merge Requests
|
||||
- if @project.merge_requests.opened.count > 0
|
||||
Merge
|
||||
-#- if @project.merge_requests.opened.count > 0
|
||||
%span{ :class => "number" }= @project.merge_requests.opened.count
|
||||
|
||||
|
||||
.medium-tags{:style => 'padding: 10px 0 0 10px; width: 210px;'}= tag_list @project
|
||||
|
||||
.project-content
|
||||
= yield
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue