redmine_landing_page icon indicating copy to clipboard operation
redmine_landing_page copied to clipboard

Feature: view overview page

Open logical-and opened this issue 13 years ago • 9 comments

That would be great, if plugin had option per project - show the overview page or not, so if the option enabled - redirect to url, but if user comes from, for ex. issues, show overview page.

I know, it maybe really hard, because the plugin must, rewrite the overview page url (double url - from the project, from the other url) or something like that, but it would be really cool feature.

What you thinking about? Thanks.

logical-and avatar Aug 10 '12 07:08 logical-and

Updated my pull request to include a commit adding this feature. I may add a check box to turn this feature on and off, but that requires editing several different bits, not just the if statement.

srathbun avatar Aug 10 '12 13:08 srathbun

@srathbun Thanks for your idea. I see that statement wrong. I found this solution after debugging:

if @project.landing_page && [email protected]_page.empty? && request.env["HTTP_REFERER"] && !(request.env["HTTP_REFERER"].scan(@project.identifier).length > 0)
              redirect_to @project.landing_page, :status => 302
if @project.landing_page && [email protected]_page.empty? && !(request.env["HTTP_REFERER"].scan(@project.name).length > 0)
               redirect_to @project.landing_page, :status => 302

logical-and avatar Aug 12 '12 09:08 logical-and

Ah, right @project.identifier is the correct value. Why are you checking that request.env["HTTP_REFERER"] exists though? I've updated my pull request with the proper check.

srathbun avatar Aug 13 '12 12:08 srathbun

/project/my-project can be direct link to project. In that case request.env value === nil, and statement fails (500 error - no method scan for nil). I am not ruby programmer, and got this point after debugging. Is it normal situation or environment specific issue?

logical-and avatar Aug 13 '12 12:08 logical-and

Ah yes, if the referer is not being filled in then we can't do string manipulation on it. So for a proper result, we can just ignore the referer check and dump them to the landing page if they come from outside the project. The landing page is supposed to be the first page external people see, and we only want to get to the overview page from inside the project itself.

I've added another commit to fix the bug.

srathbun avatar Aug 13 '12 13:08 srathbun

Yes, you right, more complicated if statement.

I found another bug - we cant go to overview from issue, because issue url does not contain project identifier: http://redmine/issues/357 Not sure, that can be fixed.

logical-and avatar Aug 13 '12 14:08 logical-and

That's because issues technically aren't part of any individual project, which is why you can create issue 1 on project a and then create issue 2 on project b.

As such, we can't know "which" project we are on when the user requests the overview page. We might be able to assume that the overview page is probably linked to the current project, but then how will we know if the user is clicking the overview button, or just a random link from the same IP address?

srathbun avatar Aug 13 '12 15:08 srathbun

I think it can be resolved by cookies, for example. But, it is the complicated resolution, so we can leave it as it is. According to this issue, one feature left - checkbox.

logical-and avatar Aug 13 '12 16:08 logical-and

Plugin is very good. I install success with Redmine 2.6. But I don't open overview tab, if project was set landing page

nbnew25 avatar Jan 01 '15 11:01 nbnew25