ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Change the Help link to point to the ChiliProject site (Feature #101)


Added by Eric Davis at 2011-01-22 01:05 am. Updated at 2012-10-08 09:56 pm.


Status:Closed Start date:2011-01-22
Priority:Normal Due date:
Assignee:Eric Davis % Done:

0%

Category:Documentation
Target version:1.1.0 — Bell
Remote issue URL: Affected version:

Description

I'm thinking the Using ChiliProject page or maybe a Help landing page. Thoughts?


Associated revisions

Revision 69cfe74d
Added by Eric Davis at 2011-02-24 11:51 pm

[#101] Change the help link to point to the version's wiki page

History

Updated by Muntek Singh at 2011-01-22 04:47 pm

My Proposal is this page: Help

From IRC:

10:25:05  Khalsa: guys
10:25:07 Khalsa: for #101
10:25:14 Khalsa: what do you think about something like https://www.chiliproject.org/projects/chiliproject/wiki/Help
10:33:43 thegcat: Khalsa: reordered it a little bit
10:35:38 Khalsa: what do you think of having that for #101 :)
10:36:11 * meineerde loves it
10:37:03 Khalsa: we might setup a special route or something so the link is chiliproject.org/Help
10:37:15 Khalsa: as that will be linked from every cp install :)
10:37:43 Khalsa: and that way in the future, we can just change the special route if we want to redirect the traffic elsewhere
10:37:44 meineerde: Khalsa: then I would vote to include a version identifier
10:38:16 meineerde: and have a comon prefix for those redirection links
10:38:49 meineerde: and in the long term, I'd love to have a basic documentation bundled with an install package.
10:38:53 thegcat: ACK for version, help for 2.0 will confuse users that haven't updated yet
10:38:58 meineerde: could be generated from the wiki on release date
10:39:17 Khalsa: yeah then we can archive etc

Updated by Felix Schäfer at 2011-02-01 10:49 pm

  • Status set to Open

Updated by Eric Davis at 2011-02-10 11:54 pm

I'll start on this

  • Assignee set to Eric Davis
  • Category set to Documentation

Updated by Felix Schäfer at 2011-02-20 05:49 pm

The changes in #129 would change the link to http://www.chiliproject.org/guide, I'd be OK with that.

Updated by Muntek Singh at 2011-02-20 08:23 pm

I'd prefer http://www.chilirpoject.org/help myself

Updated by Holger Just at 2011-02-21 10:42 am

I'd prefer http://www.chiliproject.org/help/v#{Redmine::VERSION.to_s}

That way, we can later forward people to the correct documentation version (if and when we start to have something like that). And it would be backwards compatible.

Updated by Eric Davis at 2011-02-21 11:20 pm

I was planning on switching it to /help once I have the plugin for chiliproject.org ready.

Holger: that would be nice but we would have to hack the routes on here for each version or use a glob route.

Updated by Holger Just at 2011-02-21 11:25 pm

Eric Davis wrote:

Holger: that would be nice but we would have to hack the routes on here for each version or use a glob route.

We could just strip it for now in Apache. Once we have documentation versioning, we can include the tag there. But I'm sure it would be a pain in the ass to introduce it later and having to solve the issue of incompatible documentation with confused people in the wild. We could just switch a RewriteRule or quickly update some versioned docs without having to solve the problem of too few information.

It doesn't hurt now and makes adaption in the future soo much easier.

Updated by Eric Davis at 2011-02-22 01:06 am

I'll see if I can find a quick solution using a plugin. Involving Apache will could make things more difficult to test.

Updated by Eric Davis at 2011-02-23 12:29 am

Holger:

Just found a hidden route that isn't connected to anything. Might try using it.

1  map.connect 'help/:ctrl/:page', :controller => 'help'

https://www.chiliproject.org/projects/chiliproject/repository/revisions/master/entry/config/routes.rb#L15

Updated by Eric Davis at 2011-02-23 12:32 am

Also found a whole bunch of help documentation and a full help controller around 1adf56664d95ba624b81c7cc57603f7f8b5a99c1.

Updated by Eric Davis at 2011-02-23 01:29 am

I've added some code to our plugin to support /help and /help/v1.1.0 redirects. I'll need to finish up the links on the client side next.

What it will do is send /help to a wiki page called "Help" for this project. Requests to /help/foo would go to the wiki page called "Help foo" (after removing periods, wiki pages can't have periods). I'm going to use /help/v1.1.0 /help/v2.0.0 so we will need pages called "Help v110" and "Help v200".

Plugin Code (can be checked out from the production server)

 1# config/routes.rb
 2ActionController::Routing::Routes.draw do |map|
 3  map.help 'help/*id', :controller => 'help_redirects', :action => 'show', :project_id => 'chiliproject'
 4end
 5
 6# app/controllers/help_redirects_controller.rb
 7class HelpRedirectsController < ApplicationController
 8  def show
 9    project = Project.find_by_identifier(params[:project_id])
10    # v1.0.0 => "Help v100" 
11    # nil => "Help" 
12    title = if params[:id].present?
13              "Help #{params[:id].first}" 
14            else
15              'Help'
16            end
17
18    if project && project.wiki && help_page = project.wiki.find_page(Wiki.titleize(title))
19      redirect_to :controller => 'wiki', :action => 'show', :id => help_page.title, :project_id => 'chiliproject'
20    else
21      redirect_to :controller => 'wiki', :action => 'show', :id => 'Help', :project_id => 'chiliproject'
22    end
23
24  end
25end
26
27# test
28require 'test_helper'
29
30class HelpRedirectTest < ActionController::IntegrationTest
31  def setup
32    # Bunch of stuff to get all of the records setup
33  end
34
35  should "redirect /help to a specific wiki page" do
36    visit('/help')
37    assert_response :success
38    assert find('#content .wiki')
39    assert has_content?('Welcome to the help')
40  end
41
42  should "redirect /help/v1.0.0 to a specific wiki page for v1.0.0" do
43    @version_help_page = @wiki.pages.build(:title => 'Help_v100') # Strips .s
44    @version_help_page.content = WikiContent.new(:page => @version_help_page, :text => 'Welcome to the help for v1.0.0')
45    assert @version_help_page.save
46
47    visit('/help/v1.0.0')
48
49    assert_response :success
50    assert find('#content .wiki')
51    assert has_content?('Welcome to the help for v1.0.0')
52  end
53end
54

Updated by Eric Davis at 2011-02-24 11:08 pm

This is done as of 69cfe74. Once we update the chiliproject.org server we can hook up the wiki pages.

  • Status changed from Open to Closed

Also available in: Atom PDF