summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-16 16:02:40 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-02-23 15:47:23 -0600
commit103f5a116b1ae6ecbef69d6903b26f7259f090cb (patch)
tree0e3d762be03e421a0f07a96c8ad94dc333724f89 /app/views
parent4802bd512a2492c7560acde077fee2f4cd9483b3 (diff)
downloadgitlab-ce-103f5a116b1ae6ecbef69d6903b26f7259f090cb.tar.gz
Created unit tests, fixtures and integration tests
Also changed the user_callout haml to a partial and added the corresponding SVG icon
Diffstat (limited to 'app/views')
-rw-r--r--app/views/dashboard/_projects_head.html.haml13
-rw-r--r--app/views/dashboard/projects/index.html.haml5
-rw-r--r--app/views/shared/_user_callout.html.haml13
-rw-r--r--app/views/shared/icons/_icon_customization.svg1
-rw-r--r--app/views/users/show.html.haml16
5 files changed, 22 insertions, 26 deletions
diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml
index 0aec51cf7c9..48b0fd504f4 100644
--- a/app/views/dashboard/_projects_head.html.haml
+++ b/app/views/dashboard/_projects_head.html.haml
@@ -1,18 +1,5 @@
= content_for :flash_message do
= render 'shared/project_limit'
-#user-callout
- .bordered-box.landing.content-block
- = icon("times", class: "dismiss-icon")
- .row
- .col-sm-3.col-xs-12.svg-container
- = custom_icon('icon_cycle_analytics_splash')
- .col-sm-8.col-xs-12.inner-content
- %h4
- Customize your experience
- %p
- Change syntax themes, default project pages, and more in preferences.
-
- = link_to "Check it out", profile_preferences_path, class: 'btn'
.top-area
%ul.nav-links
= nav_link(page: [dashboard_projects_path, root_path]) do
diff --git a/app/views/dashboard/projects/index.html.haml b/app/views/dashboard/projects/index.html.haml
index 4f36a4a1c73..c7a8beab0d5 100644
--- a/app/views/dashboard/projects/index.html.haml
+++ b/app/views/dashboard/projects/index.html.haml
@@ -5,6 +5,8 @@
- page_title "Projects"
- header_title "Projects", dashboard_projects_path
+= render partial: 'shared/user_callout'
+
- if @projects.any? || params[:filter_projects]
= render 'dashboard/projects_head'
@@ -15,3 +17,6 @@
= render 'projects'
- else
= render "zero_authorized_projects"
+
+:javascript
+ var userCallout = new gl.UserCallout(); \ No newline at end of file
diff --git a/app/views/shared/_user_callout.html.haml b/app/views/shared/_user_callout.html.haml
new file mode 100644
index 00000000000..079957a9867
--- /dev/null
+++ b/app/views/shared/_user_callout.html.haml
@@ -0,0 +1,13 @@
+#user-callout
+ .bordered-box.landing.content-block
+ = icon("times", class: "dismiss-icon")
+ .row
+ .col-sm-3.col-xs-12.svg-container
+ = custom_icon('icon_customization')
+ .col-sm-8.col-xs-12.inner-content
+ %h4
+ Customize your experience
+ %p
+ Change syntax themes, default project pages, and more in preferences.
+
+ = link_to "Check it out", profile_preferences_path, class: 'btn user-callout-btn' \ No newline at end of file
diff --git a/app/views/shared/icons/_icon_customization.svg b/app/views/shared/icons/_icon_customization.svg
new file mode 100644
index 00000000000..b2579208039
--- /dev/null
+++ b/app/views/shared/icons/_icon_customization.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 112 90" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="none" fill-rule="evenodd"><rect width="112" height="90" fill="#fff" rx="6"/><path fill="#eee" fill-rule="nonzero" d="m4 6.01v77.98c0 1.11.899 2.01 2 2.01h100c1.105 0 2-.898 2-2.01v-77.98c0-1.11-.899-2.01-2-2.01h-100c-1.105 0-2 .898-2 2.01m-4 0c0-3.319 2.686-6.01 6-6.01h100c3.315 0 6 2.694 6 6.01v77.98c0 3.319-2.686 6.01-6 6.01h-100c-3.315 0-6-2.694-6-6.01v-77.98"/><g transform="translate(26 35)"><rect width="4" height="39" x="5" fill="#eee" rx="2" id="0"/><rect width="4" height="21" x="5" y="18" fill="#fef0ea" rx="2"/><circle cx="7" cy="13" r="5" fill="#fff"/><path fill="#fb722e" fill-rule="nonzero" d="m7 20c-3.866 0-7-3.134-7-7 0-3.866 3.134-7 7-7 3.866 0 7 3.134 7 7 0 3.866-3.134 7-7 7m0-4c1.657 0 3-1.343 3-3 0-1.657-1.343-3-3-3-1.657 0-3 1.343-3 3 0 1.657 1.343 3 3 3"/></g><g transform="translate(49 35)"><use xlink:href="#0"/><rect width="4" height="21" x="5" y="18" fill="#b5a7dd" rx="2"/><circle cx="7" cy="25" r="5" fill="#fff"/><path fill="#6b4fbb" fill-rule="nonzero" d="m7 32c-3.866 0-7-3.134-7-7 0-3.866 3.134-7 7-7 3.866 0 7 3.134 7 7 0 3.866-3.134 7-7 7m0-4c1.657 0 3-1.343 3-3 0-1.657-1.343-3-3-3-1.657 0-3 1.343-3 3 0 1.657 1.343 3 3 3"/></g><g transform="translate(72 33)"><rect width="4" height="39" x="5" y="2" fill="#eee" rx="2"/><rect width="4" height="34" x="5" y="7" fill="#fef0ea" rx="2"/><circle cx="7" cy="7" r="5" fill="#fff"/><path fill="#fb722e" fill-rule="nonzero" d="m7 14c-3.866 0-7-3.134-7-7 0-3.866 3.134-7 7-7 3.866 0 7 3.134 7 7 0 3.866-3.134 7-7 7m0-4c1.657 0 3-1.343 3-3 0-1.657-1.343-3-3-3-1.657 0-3 1.343-3 3 0 1.657 1.343 3 3 3"/></g><g fill="#6b4fbb"><circle cx="13.5" cy="11.5" r="2.5"/><circle cx="23.5" cy="11.5" r="2.5" opacity=".5"/><circle cx="33.5" cy="11.5" r="2.5" opacity=".5"/></g><path fill="#eee" d="m0 19h111v4h-111z"/></g></svg> \ No newline at end of file
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index a3e35961261..bee65875a99 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -98,19 +98,9 @@
Snippets
%div{ class: container_class }
- #user-callout
- .bordered-box.landing.content-block
- = icon("times", class: "dismiss-icon")
- .row
- .col-sm-3.col-xs-12.svg-container
- = custom_icon('icon_cycle_analytics_splash')
- .col-sm-8.col-xs-12.inner-content
- %h4
- Customize your experience
- %p
- Change syntax themes, default project pages, and more in preferences.
-
- = link_to "Check it out", profile_preferences_path, class: 'btn'
+ = render partial: 'shared/user_callout'
+ %div{ class: container_class }
+ .tab-content
#activity.tab-pane
.row-content-block.calender-block.white.second-block.hidden-xs
.user-calendar{ data: { href: user_calendar_path } }