Commit 95fde9bd7a1fb0a902c33f03f641909043df4125
1 parent
5f31989a
Exists in
master
and in
4 other branches
Projects page as dashboard. Old dashboard removed
Showing
13 changed files
with
37 additions
and
208 deletions
Show diff stats
app/views/dashboard/_issues.html.haml
| ... | ... | @@ -1,17 +0,0 @@ |
| 1 | -%div.ui-box | |
| 2 | - %h5 | |
| 3 | - = link_to "Issues" , "#issues", :id => "issues" | |
| 4 | - %small (assigned to you) | |
| 5 | - %ul.unstyled | |
| 6 | - - @issues.each do |issue| | |
| 7 | - %li.wll | |
| 8 | - = link_to [issue.project, issue] do | |
| 9 | - %p | |
| 10 | - %span.btn.disabled.small= issue.project.name | |
| 11 | - %strong | |
| 12 | - – | |
| 13 | - Issue # | |
| 14 | - = issue.id | |
| 15 | - = truncate issue.title, :length => 50 | |
| 16 | - %span.right.cgray | |
| 17 | - = issue.updated_at.stamp("Aug 21, 2011") |
app/views/dashboard/_issues_feed.html.haml
| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | -- @issues.each do |issue| | |
| 2 | - .wll | |
| 3 | - = link_to [issue.project, issue] do | |
| 4 | - %p | |
| 5 | - %strong | |
| 6 | - %span= issue.project.name | |
| 7 | - – | |
| 8 | - Issue # | |
| 9 | - = issue.id | |
| 10 | - = truncate issue.title, :length => 50 | |
| 11 | - %span.right.cgray | |
| 12 | - = issue.updated_at.stamp("Aug 21, 2011") |
app/views/dashboard/_merge_requests.html.haml
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -%div.ui-box | |
| 2 | - %h5 | |
| 3 | - = link_to "5 Latest Merge Requests" , "#merge_requests", :id => "merge_requests" | |
| 4 | - %small (authored or assigned to you) | |
| 5 | - %ul.unstyled | |
| 6 | - - @merge_requests.each do |merge_request| | |
| 7 | - %li.wll | |
| 8 | - = link_to [merge_request.project, merge_request] do | |
| 9 | - %p | |
| 10 | - %span.btn.disabled.small= merge_request.project.name | |
| 11 | - %strong | |
| 12 | - – | |
| 13 | - Merge Request ##{merge_request.id} | |
| 14 | - = truncate merge_request.title, :length => 50 | |
| 15 | - %span.right.cgray | |
| 16 | - = merge_request.updated_at.stamp("Aug 21, 2011") | |
| 17 | - | |
| 18 | - %li.bottom | |
| 19 | - | |
| 20 | - |
app/views/dashboard/_merge_requests_feed.html.haml
| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | -- @merge_requests.each do |merge_request| | |
| 2 | - .wll | |
| 3 | - = link_to [merge_request.project, merge_request] do | |
| 4 | - %p | |
| 5 | - %strong | |
| 6 | - %strong= merge_request.project.name | |
| 7 | - – | |
| 8 | - Merge Request ##{merge_request.id} | |
| 9 | - = truncate merge_request.title, :length => 50 | |
| 10 | - %span.right.cgray | |
| 11 | - = merge_request.updated_at.stamp("Aug 21, 2011") |
app/views/dashboard/_projects.html.haml
| ... | ... | @@ -1,22 +0,0 @@ |
| 1 | -%div | |
| 2 | - %h3 | |
| 3 | - %span.ico.projects | |
| 4 | - Projects | |
| 5 | - %small | |
| 6 | - (most recent) | |
| 7 | - %hr | |
| 8 | - %div.dash_projects | |
| 9 | - - projects.first(5).each do |project| | |
| 10 | - %div.dash_project | |
| 11 | - %h4 | |
| 12 | - = link_to project, :class => "project_link" do | |
| 13 | - = truncate project.name, :length => 30 | |
| 14 | - %small | |
| 15 | - last activity at | |
| 16 | - = project.last_activity_date.stamp("Aug 25, 2011") | |
| 17 | - | |
| 18 | - .right | |
| 19 | - %small | |
| 20 | - %strong= link_to "Browse Code »", tree_project_ref_path(project, project.root_ref), :class => "neib" | |
| 21 | - %strong= link_to "Commits »", project_commits_path(project) | |
| 22 | - |
app/views/dashboard/_projects_feed.html.haml
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -- projects.first(5).each do |project| | |
| 2 | - %div.dash_project_item | |
| 3 | - %h4 | |
| 4 | - = link_to project, :class => "project_link" do | |
| 5 | - %span.ico.project | |
| 6 | - = truncate project.name, :length => 24 | |
| 7 | - | |
| 8 | - %small | |
| 9 | - last activity at | |
| 10 | - = project.last_activity_date.stamp("Aug 25, 2011") | |
| 11 | - | |
| 12 | - .right | |
| 13 | - %small | |
| 14 | - %strong= link_to "Browse Code »", tree_project_ref_path(project, project.root_ref), :class => "neib gray" | |
| 15 | - %strong= link_to "Commits »", project_commits_path(project), :class => "gray" |
app/views/dashboard/index.html.haml
| ... | ... | @@ -1,82 +0,0 @@ |
| 1 | -- if current_user.require_ssh_key? | |
| 2 | - .alert-message.block-message.error | |
| 3 | - %p | |
| 4 | - You wont be able to pull/push project code unless you | |
| 5 | - = link_to new_key_path, :class => "vlink" do | |
| 6 | - add new key | |
| 7 | - to your profile | |
| 8 | - | |
| 9 | -%div.dashboard_category | |
| 10 | - %h3 | |
| 11 | - %span.ico.projects | |
| 12 | - = link_to "Projects" , "#projects", :id => "projects" | |
| 13 | - %small | |
| 14 | - (most recent) | |
| 15 | - | |
| 16 | - %strong.right | |
| 17 | - = link_to projects_path do | |
| 18 | - Projects list → | |
| 19 | - %hr | |
| 20 | - .dashboard_block | |
| 21 | - .row | |
| 22 | - .span3.right | |
| 23 | - %div.lborder.ipadded | |
| 24 | - %h3 | |
| 25 | - = pluralize current_user.projects.count, "project", "projects" | |
| 26 | - - if current_user.can_create_project? | |
| 27 | - %hr | |
| 28 | - %div | |
| 29 | - You can create up to | |
| 30 | - = current_user.projects_limit | |
| 31 | - projects. Click on button below to add a new one | |
| 32 | - .link_holder | |
| 33 | - %br | |
| 34 | - = link_to new_project_path, :class => "btn" do | |
| 35 | - New Project » | |
| 36 | - - else | |
| 37 | - %hr | |
| 38 | - %div | |
| 39 | - You've reached project limit for your account. | |
| 40 | - You cannot create new projects. | |
| 41 | - .link_holder | |
| 42 | - %br | |
| 43 | - = link_to profile_path, :class => "btn" do | |
| 44 | - Your Profile » | |
| 45 | - .span9.left= render "dashboard/projects_feed", :projects => @active_projects | |
| 46 | - - if @last_push && @last_push.valid_push? | |
| 47 | - .padded.prepend-top-20 | |
| 48 | - %h5 | |
| 49 | - %small Latest push was to the #{@last_push.ref_name} #{@last_push.ref_type} of #{@last_push.project.name}: | |
| 50 | - %ul.unstyled= render @last_push | |
| 51 | - | |
| 52 | -- if @merge_requests.any? | |
| 53 | - %div.dashboard_category | |
| 54 | - %h3 | |
| 55 | - = link_to "Merge Requests" , "#merge_requests", :id => "merge_requests" | |
| 56 | - | |
| 57 | - %small (authored or assigned to you) | |
| 58 | - %strong.right | |
| 59 | - = link_to dashboard_merge_requests_path do | |
| 60 | - Visit merge requests page → | |
| 61 | - %hr | |
| 62 | - .dashboard_block= render "dashboard/merge_requests_feed" | |
| 63 | - | |
| 64 | -- if @issues.any? | |
| 65 | - %div.dashboard_category | |
| 66 | - %h3 | |
| 67 | - = link_to "Issues" , "#issues", :id => "issues" | |
| 68 | - %small (assigned to you) | |
| 69 | - %strong.right | |
| 70 | - = link_to dashboard_issues_path do | |
| 71 | - Visit issues page → | |
| 72 | - %hr | |
| 73 | - .dashboard_block= render "dashboard/issues_feed" | |
| 74 | - | |
| 75 | -- if @events.any? | |
| 76 | - %div.dashboard_category | |
| 77 | - %h3 | |
| 78 | - %span.ico.activities | |
| 79 | - = link_to "Activities" , "#activities", :id => "activities" | |
| 80 | - | |
| 81 | - %hr | |
| 82 | - .dashboard_block= render @events |
app/views/layouts/_app_menu.html.haml
| 1 | 1 | %nav.main_menu |
| 2 | 2 | = render "layouts/const_menu_links" |
| 3 | - = link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path)}" | |
| 4 | 3 | = link_to dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide" do |
| 5 | 4 | Issues |
| 6 | 5 | %span.count= current_user.assigned_issues.opened.count | ... | ... |
app/views/layouts/_const_menu_links.html.haml
app/views/projects/index.html.haml
| 1 | 1 | - if @projects.any? |
| 2 | 2 | .row |
| 3 | 3 | .span8 |
| 4 | - = render @events | |
| 4 | + - if current_user.require_ssh_key? | |
| 5 | + .alert.alert-error.padded | |
| 6 | + %span | |
| 7 | + You wont be able to pull/push project code unless you | |
| 8 | + %strong | |
| 9 | + = link_to new_key_path, :class => "vlink" do | |
| 10 | + add new key | |
| 11 | + to your profile | |
| 12 | + - if @events.any? | |
| 13 | + = render @events | |
| 14 | + - else | |
| 15 | + .padded | |
| 16 | + %strong.cgray Projects activity will be displayed here | |
| 5 | 17 | .span4.right |
| 6 | 18 | %div.leftbar.ui-box |
| 7 | 19 | %h5 | ... | ... |
app/views/search/show.html.haml
| 1 | 1 | = form_tag search_path, :method => :get do |f| |
| 2 | 2 | .padded |
| 3 | - = label_tag :search, "Looking for" | |
| 3 | + = label_tag :search do | |
| 4 | + %strong Looking for | |
| 4 | 5 | .input |
| 5 | 6 | = text_field_tag :search, params[:search],:placeholder => "issue 143", :class => "input-xxlarge" |
| 6 | 7 | = submit_tag 'Search', :class => "btn btn-primary" | ... | ... |
config/routes.rb
| ... | ... | @@ -38,12 +38,8 @@ Gitlab::Application.routes.draw do |
| 38 | 38 | get "profile/design", :to => "profile#design" |
| 39 | 39 | put "profile/update", :to => "profile#update" |
| 40 | 40 | |
| 41 | - get "dashboard", :to => "dashboard#index" | |
| 42 | 41 | get "dashboard/issues", :to => "dashboard#issues" |
| 43 | 42 | get "dashboard/merge_requests", :to => "dashboard#merge_requests" |
| 44 | - get "dashboard/activities", :to => "dashboard#activities" | |
| 45 | - | |
| 46 | - #get "profile/:id", :to => "profile#show" | |
| 47 | 43 | |
| 48 | 44 | resources :projects, :constraints => { :id => /[^\/]+/ }, :only => [:new, :create, :index] |
| 49 | 45 | resources :keys |
| ... | ... | @@ -131,5 +127,5 @@ Gitlab::Application.routes.draw do |
| 131 | 127 | end |
| 132 | 128 | resources :notes, :only => [:index, :create, :destroy] |
| 133 | 129 | end |
| 134 | - root :to => "dashboard#index" | |
| 130 | + root :to => "projects#index" | |
| 135 | 131 | end | ... | ... |
db/schema.rb
| ... | ... | @@ -30,8 +30,8 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 30 | 30 | t.integer "assignee_id" |
| 31 | 31 | t.integer "author_id" |
| 32 | 32 | t.integer "project_id" |
| 33 | - t.datetime "created_at" | |
| 34 | - t.datetime "updated_at" | |
| 33 | + t.datetime "created_at", :null => false | |
| 34 | + t.datetime "updated_at", :null => false | |
| 35 | 35 | t.boolean "closed", :default => false, :null => false |
| 36 | 36 | t.integer "position", :default => 0 |
| 37 | 37 | t.boolean "critical", :default => false, :null => false |
| ... | ... | @@ -44,8 +44,8 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 44 | 44 | |
| 45 | 45 | create_table "keys", :force => true do |t| |
| 46 | 46 | t.integer "user_id" |
| 47 | - t.datetime "created_at" | |
| 48 | - t.datetime "updated_at" | |
| 47 | + t.datetime "created_at", :null => false | |
| 48 | + t.datetime "updated_at", :null => false | |
| 49 | 49 | t.text "key" |
| 50 | 50 | t.string "title" |
| 51 | 51 | t.string "identifier" |
| ... | ... | @@ -60,10 +60,10 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 60 | 60 | t.integer "assignee_id" |
| 61 | 61 | t.string "title" |
| 62 | 62 | t.boolean "closed", :default => false, :null => false |
| 63 | - t.datetime "created_at" | |
| 64 | - t.datetime "updated_at" | |
| 65 | - t.text "st_commits", :limit => 4294967295 | |
| 66 | - t.text "st_diffs", :limit => 4294967295 | |
| 63 | + t.datetime "created_at", :null => false | |
| 64 | + t.datetime "updated_at", :null => false | |
| 65 | + t.text "st_commits", :limit => 2147483647 | |
| 66 | + t.text "st_diffs", :limit => 2147483647 | |
| 67 | 67 | t.boolean "merged", :default => false, :null => false |
| 68 | 68 | end |
| 69 | 69 | |
| ... | ... | @@ -84,8 +84,8 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 84 | 84 | t.string "noteable_id" |
| 85 | 85 | t.string "noteable_type" |
| 86 | 86 | t.integer "author_id" |
| 87 | - t.datetime "created_at" | |
| 88 | - t.datetime "updated_at" | |
| 87 | + t.datetime "created_at", :null => false | |
| 88 | + t.datetime "updated_at", :null => false | |
| 89 | 89 | t.integer "project_id" |
| 90 | 90 | t.string "attachment" |
| 91 | 91 | t.string "line_code" |
| ... | ... | @@ -98,8 +98,8 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 98 | 98 | t.string "name" |
| 99 | 99 | t.string "path" |
| 100 | 100 | t.text "description" |
| 101 | - t.datetime "created_at" | |
| 102 | - t.datetime "updated_at" | |
| 101 | + t.datetime "created_at", :null => false | |
| 102 | + t.datetime "updated_at", :null => false | |
| 103 | 103 | t.boolean "private_flag", :default => true, :null => false |
| 104 | 104 | t.string "code" |
| 105 | 105 | t.integer "owner_id" |
| ... | ... | @@ -122,8 +122,8 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 122 | 122 | t.text "content" |
| 123 | 123 | t.integer "author_id", :null => false |
| 124 | 124 | t.integer "project_id", :null => false |
| 125 | - t.datetime "created_at" | |
| 126 | - t.datetime "updated_at" | |
| 125 | + t.datetime "created_at", :null => false | |
| 126 | + t.datetime "updated_at", :null => false | |
| 127 | 127 | t.string "file_name" |
| 128 | 128 | t.datetime "expires_at" |
| 129 | 129 | end |
| ... | ... | @@ -156,8 +156,8 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 156 | 156 | t.datetime "last_sign_in_at" |
| 157 | 157 | t.string "current_sign_in_ip" |
| 158 | 158 | t.string "last_sign_in_ip" |
| 159 | - t.datetime "created_at" | |
| 160 | - t.datetime "updated_at" | |
| 159 | + t.datetime "created_at", :null => false | |
| 160 | + t.datetime "updated_at", :null => false | |
| 161 | 161 | t.string "name" |
| 162 | 162 | t.boolean "admin", :default => false, :null => false |
| 163 | 163 | t.integer "projects_limit", :default => 10 |
| ... | ... | @@ -177,16 +177,16 @@ ActiveRecord::Schema.define(:version => 20120413135904) do |
| 177 | 177 | create_table "users_projects", :force => true do |t| |
| 178 | 178 | t.integer "user_id", :null => false |
| 179 | 179 | t.integer "project_id", :null => false |
| 180 | - t.datetime "created_at" | |
| 181 | - t.datetime "updated_at" | |
| 180 | + t.datetime "created_at", :null => false | |
| 181 | + t.datetime "updated_at", :null => false | |
| 182 | 182 | t.integer "project_access", :default => 0, :null => false |
| 183 | 183 | end |
| 184 | 184 | |
| 185 | 185 | create_table "web_hooks", :force => true do |t| |
| 186 | 186 | t.string "url" |
| 187 | 187 | t.integer "project_id" |
| 188 | - t.datetime "created_at" | |
| 189 | - t.datetime "updated_at" | |
| 188 | + t.datetime "created_at", :null => false | |
| 189 | + t.datetime "updated_at", :null => false | |
| 190 | 190 | end |
| 191 | 191 | |
| 192 | 192 | create_table "wikis", :force => true do |t| | ... | ... |