Project

General

Profile

Actions

Bug #2335

closed

submitting a puppet class edit should go back to the class' page

Added by David Schmitt about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Web Interface
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

When editing a puppet class, submitting the changes goes back to the list of all classes. This looses the user's context. It would be nice to return to the class itself or the actual page the edit was coming from.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #5773: editing resources in UI returns view to wrong page and searchClosedJoseph Magen05/17/2014Actions
Actions #1

Updated by Sam Kottler about 11 years ago

  • Assignee deleted (Ohad Levy)
  • Target version set to 1.2.0
  • Difficulty set to trivial
Actions #2

Updated by Greg Sutcliffe almost 11 years ago

I can manage a simple redirect back to /puppetclasses/:id/edit easily enough, but that still loses the context of which class/smart variable you were editing. Perhaps Amos or Jospeh can show me a better way than this:

--- a/app/controllers/puppetclasses_controller.rb
+++ b/app/controllers/puppetclasses_controller.rb
@@ -44,10 +44,12 @@ class PuppetclassesController < ApplicationController
   def update
     if @puppetclass.update_attributes(params[:puppetclass])
       notice _("Successfully updated puppetclass.")
-      redirect_to puppetclasses_url
-    else
-      render :action => 'edit'
     end
     render :action => 'edit'
   end
Actions #3

Updated by Joseph Magen almost 11 years ago

  • Assignee set to Joseph Magen
Actions #4

Updated by Joseph Magen almost 11 years ago

Since there is no show action for puppetclass, I assume you want a redirect to the referrer page.

Actions #5

Updated by Joseph Magen almost 11 years ago

  • Status changed from New to Ready For Testing
Actions #6

Updated by Dominic Cleal almost 11 years ago

We're a bit confused on the PR as to which page it should redirect back to. Would it be the page that originally led you to the class edit page, e.g. the puppet classes list with your search terms and so on, or back to the class edit page itself, as if Submit was just an "Apply" button?

Actions #7

Updated by Joseph Magen almost 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #8

Updated by Dominic Cleal almost 10 years ago

  • Related to Bug #5773: editing resources in UI returns view to wrong page and search added
Actions

Also available in: Atom PDF