summaryrefslogtreecommitdiff
path: root/app/views/dashboard
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-12-12 09:38:37 +0200
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-12-12 09:38:37 +0200
commitf34b1be28102dc77d4659f3113e258afb9dc4951 (patch)
treebda252416e0ee081a9fab0b82802356048ce7650 /app/views/dashboard
parent822c0a506043a2e5ba0a58769b398cfe91d3df47 (diff)
downloadgitlab-ce-f34b1be28102dc77d4659f3113e258afb9dc4951.tar.gz
dashboard tabs
Diffstat (limited to 'app/views/dashboard')
-rw-r--r--app/views/dashboard/_issues_feed.html.haml11
-rw-r--r--app/views/dashboard/_menu.html.haml13
-rw-r--r--app/views/dashboard/_merge_requests_feed.html.haml10
-rw-r--r--app/views/dashboard/_projects_feed.html.haml10
-rw-r--r--app/views/dashboard/index.html.haml1
-rw-r--r--app/views/dashboard/issues.html.haml1
-rw-r--r--app/views/dashboard/merge_requests.html.haml1
7 files changed, 16 insertions, 31 deletions
diff --git a/app/views/dashboard/_issues_feed.html.haml b/app/views/dashboard/_issues_feed.html.haml
index 5945a370d37..528b7b03961 100644
--- a/app/views/dashboard/_issues_feed.html.haml
+++ b/app/views/dashboard/_issues_feed.html.haml
@@ -1,14 +1,3 @@
-%div
- = link_to dashboard_path, :remote => true, :class => "left" do
- .box-arrow
- &larr;
- %h2{:style => "width:86%; text-align:center"}
- Issues
- = link_to dashboard_merge_requests_path, :remote => true, :class => "right" do
- .box-arrow
- &rarr;
-
-
#feeds_content_holder
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.data
diff --git a/app/views/dashboard/_menu.html.haml b/app/views/dashboard/_menu.html.haml
new file mode 100644
index 00000000000..2cb45fa7e61
--- /dev/null
+++ b/app/views/dashboard/_menu.html.haml
@@ -0,0 +1,13 @@
+%h4.dash-tabs
+ = link_to "Activities", dashboard_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_path) || current_page?(root_path) }", :id => "activities_slide"
+ = link_to "Issues", dashboard_issues_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
+ = link_to "Merge Requests", dashboard_merge_requests_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide"
+
+
+:javascript
+ $(function(){
+ $(".dash-button").live("click", function() {
+ $(".dash-button").removeClass("active");
+ $(this).addClass("active");
+ })
+ });
diff --git a/app/views/dashboard/_merge_requests_feed.html.haml b/app/views/dashboard/_merge_requests_feed.html.haml
index 22a7e703a31..53272c92adf 100644
--- a/app/views/dashboard/_merge_requests_feed.html.haml
+++ b/app/views/dashboard/_merge_requests_feed.html.haml
@@ -1,13 +1,3 @@
-%div
- = link_to dashboard_issues_path, :remote => true, :class => "left" do
- .box-arrow
- &larr;
- %h2{:style => "width:86%; text-align:center"}
- Merge Requests
- = link_to dashboard_path, :remote => true, :class => "right" do
- .box-arrow
- &rarr;
-
#feeds_content_holder
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.data
diff --git a/app/views/dashboard/_projects_feed.html.haml b/app/views/dashboard/_projects_feed.html.haml
index bae5fbfb595..da9b45f75f6 100644
--- a/app/views/dashboard/_projects_feed.html.haml
+++ b/app/views/dashboard/_projects_feed.html.haml
@@ -1,13 +1,3 @@
-%div
- = link_to dashboard_merge_requests_path, :remote => true, :class => "left", :id => "merge_requests_slide" do
- .box-arrow
- &larr;
- %h2{:style => "width:86%; text-align:center"}
- Activities
- = link_to dashboard_issues_path, :remote => true, :class => "right", :id => "issues_slide" do
- .box-arrow
- &rarr;
-
#feeds_content_holder
- @active_projects.first(3).each do |project|
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml
index b3de30f2ecd..7f6beffb53f 100644
--- a/app/views/dashboard/index.html.haml
+++ b/app/views/dashboard/index.html.haml
@@ -2,4 +2,5 @@
#dashboard-content.dashboard-content.content
= render "dashboard/sidebar"
+ = render "dashboard/menu"
#news-feed.news-feed= render "dashboard/projects_feed"
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml
index 063183ed0d1..4b7af96a646 100644
--- a/app/views/dashboard/issues.html.haml
+++ b/app/views/dashboard/issues.html.haml
@@ -2,4 +2,5 @@
#dashboard-content.dashboard-content.content
= render "dashboard/sidebar"
+ = render "dashboard/menu"
#news-feed.news-feed= render "dashboard/issues_feed"
diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml
index 088577eaf50..3497062c8f6 100644
--- a/app/views/dashboard/merge_requests.html.haml
+++ b/app/views/dashboard/merge_requests.html.haml
@@ -2,4 +2,5 @@
#dashboard-content.dashboard-content.content
= render "dashboard/sidebar"
+ = render "dashboard/menu"
#news-feed.news-feed= render "dashboard/merge_requests_feed"