new design/layout started. projects page
This commit is contained in:
parent
3fa770dd10
commit
1ffb4b98c0
12 changed files with 605 additions and 43 deletions
|
@ -1,22 +1,41 @@
|
|||
<div id="header-panel">
|
||||
<!-- Page Header -->
|
||||
<header>
|
||||
<h1 class="logo">
|
||||
<a href="/">GITLAB</a></h1>
|
||||
<div class="login-top">
|
||||
<%= link_to profile_path, :class => "pic" do %>
|
||||
<%= image_tag gravatar_icon(current_user.email) %>
|
||||
<% end %>
|
||||
<%= link_to profile_path, :class => "username" do %>
|
||||
<%= current_user.name %>
|
||||
<% end %>
|
||||
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
|
||||
</div>
|
||||
<!-- .login-top -->
|
||||
<nav>
|
||||
<%= link_to root_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %>
|
||||
<span></span>Dashboard
|
||||
<% end %>
|
||||
<%= link_to projects_path, :class => current_page?(projects_path) ? "current project" : "project" do %>
|
||||
<span></span>Projects
|
||||
<% end %>
|
||||
<%= link_to( admin_root_path, :class => admin_namespace? ? "current admin" : "admin" ) do %>
|
||||
<span></span>Admin
|
||||
<% end if current_user.is_admin? %>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- eo Page Header -->
|
||||
|
||||
<div id="header-panel" style="display:none">
|
||||
<div class="container">
|
||||
<div class="span-24">
|
||||
<div class="span-10">
|
||||
<%#= image_tag "git.png", :height => 40, :class => "left" %>
|
||||
<%#= link_to "gitlab", root_path, :id => "logo" %>
|
||||
<span class="search-holder">
|
||||
<%= text_field_tag "search", nil, :placeholder => "Search" %>
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<%= link_to truncate(@project.name, :length => 20), project_path(@project), :class => "current button" if @project && !@project.new_record? %>
|
||||
<%= link_to 'Projects', projects_path, :class => current_page?(projects_path) ? "current button" : "button" %>
|
||||
<%= link_to('Admin', admin_root_path, :class => admin_namespace? ? "current button" : "button" ) if current_user.is_admin? %>
|
||||
<%= link_to profile_path, :class => ((controller.controller_name == "keys" || controller.controller_name == "profile") ? "current button" : "button") do %>
|
||||
<%= image_tag gravatar_icon(current_user.email) %>
|
||||
<%= current_user.name.split(" ").first %>
|
||||
<% end %>
|
||||
<%= link_to 'Logout', destroy_user_session_path, :style => "border-left: 1px solid #666;", :class => "button", :method => :delete %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
6
app/views/layouts/_page_title.html.haml
Normal file
6
app/views/layouts/_page_title.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- if content_for?(:page_title)
|
||||
= yield :page_title
|
||||
- else
|
||||
.page-title
|
||||
.container_3
|
||||
%h1= controller.controller_name.capitalize
|
|
@ -3,10 +3,10 @@
|
|||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag 'blueprint/screen', :media => "screen, projection"
|
||||
= stylesheet_link_tag 'blueprint/print', :media => "print"
|
||||
= stylesheet_link_tag 'blueprint/plugins/buttons/screen', :media => "screen, projection"
|
||||
= stylesheet_link_tag 'blueprint/plugins/link-icons/screen', :media => "screen, projection"
|
||||
-#= stylesheet_link_tag 'blueprint/screen', :media => "screen, projection"
|
||||
-#= stylesheet_link_tag 'blueprint/print', :media => "print"
|
||||
-#= stylesheet_link_tag 'blueprint/plugins/buttons/screen', :media => "screen, projection"
|
||||
-#= stylesheet_link_tag 'blueprint/plugins/link-icons/screen', :media => "screen, projection"
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
|
@ -15,14 +15,18 @@
|
|||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body#thebody
|
||||
= render :partial => "layouts/flash"
|
||||
- if user_signed_in?
|
||||
= render :partial => "layouts/head_panel"
|
||||
.top_bar.container
|
||||
= render :partial => "projects/top_menu" if @project && !@project.new_record?
|
||||
= render :partial => "projects/projects_top_menu" if (controller.controller_name == "projects" && ["index", "new", "create"].include?(controller.action_name)) && !admin_namespace?
|
||||
= render :partial => "profile/top_menu" if ["keys", "profile"].include?(controller.controller_name)
|
||||
= render :partial => "admin/top_menu" if admin_namespace?
|
||||
#content-container.container
|
||||
.span-24
|
||||
= yield
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
|
||||
- if user_signed_in?
|
||||
= render :partial => "layouts/head_panel"
|
||||
= render :partial => "layouts/page_title"
|
||||
- if @project && !@project.new_record?
|
||||
.top_bar.container= render :partial => "projects/top_menu"
|
||||
- if ["keys", "profile"].include?(controller.controller_name)
|
||||
.top_bar.container= render :partial => "profile/top_menu"
|
||||
- if admin_namespace?
|
||||
.top_bar.container= render :partial => "admin/top_menu"
|
||||
%div{ :id => "main", :role => "main", :class => "container_3" }
|
||||
#content-container
|
||||
= yield
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
- @projects.in_groups_of(3, false) do |projects|
|
||||
- projects.each_with_index do |project, i|
|
||||
%div{ :class => "project_thumb round-borders", :style => i == 2 ? "" : "margin-right:30px;" }
|
||||
%div{ :class => "project", :url => project_path(project) }
|
||||
%h2
|
||||
= image_tag gravatar_icon(project.name), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||
= link_to ("/" + project.code), project_path(project), :style => "text-decoration:none"
|
||||
%p= project.name
|
||||
%p= project.url_to_repo
|
||||
-#%p
|
||||
Commit –
|
||||
= last_commit(project)
|
||||
%hr
|
||||
= link_to "Browse Code", tree_project_path(project), :class => "lbutton"
|
||||
= link_to "Commits", project_commits_path(project), :class => "lbutton", :style => "float:right;width:80px;"
|
||||
.clear
|
||||
%div.grid_1
|
||||
%div{ :class => "project-box ui-box ui-box-big", :style => i == 2 ? "" : "margin-right:30px;" }
|
||||
= link_to project_path(project) do
|
||||
%h3= project.name
|
||||
.data
|
||||
%p.title.repository
|
||||
%span Repository:
|
||||
= project.url_to_repo
|
||||
%p.title.activity
|
||||
%span Last Activity:
|
||||
- last_note = project.notes.last
|
||||
= last_note ? last_note.created_at.stamp("24 Aug, 2011") : "Never"
|
||||
.buttons
|
||||
%a.browse-code.button.yellow{:href => tree_project_path(project)} Browse code
|
||||
%a.commits.button.green{:href => project_commits_path(project)} Commits
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
- content_for(:page_title) do
|
||||
.page-title
|
||||
.container_3
|
||||
- if current_user.can_create_project?
|
||||
%a.grey-button{:href => new_project_path} Create new project
|
||||
%h1 Projects
|
||||
|
||||
- unless @projects.empty?
|
||||
%div{:class => "tile", :style => view_mode_style("tile")}
|
||||
= render "tile"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue