summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-10-14 18:27:58 +0100
committerPhil Hughes <me@iamphill.com>2016-10-28 13:54:36 +0100
commita2e9bc3584a735c010bbda3cef913601543cfa07 (patch)
tree74a6c471fa06db4f8247e989722d89cc5fa3258d
parent4fd015183cdb280083384c69261c2ab5d475a54b (diff)
downloadgitlab-ce-a2e9bc3584a735c010bbda3cef913601543cfa07.tar.gz
Delete issue board welcome cookie when project is new
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/assets/javascripts/boards/stores/boards_store.js.es63
-rw-r--r--app/controllers/projects_controller.rb5
3 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99991fb805f..f62eef42bff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- API: Fix booleans not recognized as such when using the `to_boolean` helper
- Removed delete branch tooltip !6954
- Stop unauthorized users dragging on milestone page (blackst0ne)
+ - Restore issue boards welcome message when a project is created !6899
- Escape ref and path for relative links !6050 (winniehell)
- Fixed link typo on /help/ui to Alerts section. !6915 (Sam Rose)
- Fix filtering of milestones with quotes in title (airatshigapov)
diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6
index 534845cd8a2..175e034afed 100644
--- a/app/assets/javascripts/boards/stores/boards_store.js.es6
+++ b/app/assets/javascripts/boards/stores/boards_store.js.es6
@@ -63,7 +63,8 @@
this.removeList('blank');
Cookies.set('issue_board_welcome_hidden', 'true', {
- expires: 365 * 10
+ expires: 365 * 10,
+ path: ''
});
},
welcomeIsHidden () {
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 76b730198d4..137c0d109e2 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -30,9 +30,12 @@ class ProjectsController < Projects::ApplicationController
@project = ::Projects::CreateService.new(current_user, project_params).execute
if @project.saved?
+ cookies[:issue_board_welcome_hidden] = { path: project_path(@project), value: nil, expires: Time.at(0) }
+
redirect_to(
project_path(@project),
- notice: "Project '#{@project.name}' was successfully created."
+ notice: "Project '#{@project.name}' was successfully created.",
+ flash: { new_project: true }
)
else
render 'new'