├── BigRigAdmin.cfc
├── controllers
├── Wheels.cfc
├── App.cfc
├── Admin.cfc
└── Controller.cfc
├── views
├── layout.cfm
├── docs
│ ├── installer.cfm
│ ├── _add-rig.cfm
│ ├── helper-details.cfm
│ └── _header.cfm
└── admin
│ └── config.cfm
└── index.cfm
/BigRigAdmin.cfc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/controllers/Wheels.cfc:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/views/layout.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 | #pageTitle#
8 |
9 | #flash("bigrig")#
10 |
11 | #contentForLayout()#
12 |
13 | #linkTo(key="help", action="config", text="?", class="help")#
14 |
15 | #linkTo(key="", action="config", text="X", class="help")#
16 |
17 |
18 | #includePartial("/docs/add-rig")#
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/controllers/App.cfc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | ">
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/views/docs/installer.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | #message#
6 | #redirectTo(route="plugins", plugin="bigrig", controller="admin", action="config")#
7 |
8 |
9 |
10 |
11 |
12 |
13 | You still need to include rigs.cfm in your config/app.cfm file in order to use this plugin:
14 |
15 | /config/routes.cfm
16 | <cfinclude template="plugins/bigrig/rigs.cfm" />
17 |
18 |
19 | (or reload Wheels if you already have done this)
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
BigRig Routes file does not exist
29 |
30 | #flash("bigrigInstall")#
31 |
32 |
33 |
--------------------------------------------------------------------------------
/controllers/Admin.cfc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ">
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/views/docs/_add-rig.cfm:
--------------------------------------------------------------------------------
1 | #bigrigHelperFunction#()
2 | Description
3 | Adds wheels enabled folders to your application.
4 | Function Syntax
5 | #bigrigHelperFunction#(name[, keyword, singleAppFolder])
6 |
7 |
8 |
9 | | Parameter |
10 | Type |
11 | Required |
12 | Default |
13 | Description |
14 |
15 |
16 |
17 |
18 | ">
19 | name |
20 | string |
21 | Yes |
22 | |
23 | The name of the application folder you want to add wheels support to. |
24 |
25 |
26 | ">
27 | keyword |
28 | string |
29 | No |
30 | #name# |
31 | Used as a trigger in constructing routes for the current application folder. Defaults to arguments.name
32 | |
33 |
34 | ">
35 | singleAppFolder |
36 | string |
37 | No |
38 | |
39 | If you want to enable a specific folder, pass the folder name in for this parameter. |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/index.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 | BigRig Admin
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | #checkboxTag(name="bigrig[createRoutesFile]", labelPlacement="after", label=" Create BigRig route file?")# #submitTag("Create File")#(/config/plugins/bigrig/rigs.cfm)') />
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/views/admin/config.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
The BigRig applicaton installer will parse the config/plugins/bigrig/rigs.cfm file for calls to #bigrigHelperFunction#() and let you control them through a web interface(only available in design and maintenance modes). You can control what folders are wheels enabled by code, or by using this form.
6 |
This form simply automates the bits of coding required to add more wheels enabled folders to an application.
7 |
8 |
9 | Installer requires the rigs.cfm file to work.
10 |
11 | #startFormTag(action="save", class="properties")#
12 |
13 |
14 |
15 | #textfieldTag(name="bigRigSettings[#newIndex#][name]", value="", label="Name: ", disabled="true")#
16 | #textfieldTag(name="bigRigSettings[#newIndex#][keyword]", value="", label="Keyword: ", disabled="true")#
17 | #textfieldTag(name="bigRigSettings[#newIndex#][singleAppFolder]", value="", label="Single App Folder: ", disabled="true")#
18 |
19 |
20 |
21 |
22 |
23 |
24 | #textfieldTag(name="bigRigSettings[#i#][name]", value=appRoute.name, label="Rig Name: ")#
25 |
26 |
27 |
28 | #textfieldTag(name="bigRigSettings[#i#][keyword]", value=appRoute.keyword, label="Keyword: ")#
29 |
30 |
31 |
32 | #textfieldTag(name="bigRigSettings[#i#][singleAppFolder]", value=appRoute.singleAppFolder, label="Single App Folder: ")#
33 |
34 |
35 |
36 | Add new Application Folder
37 | #submitTag()#
38 | #endFormTag()#
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/views/docs/helper-details.cfm:
--------------------------------------------------------------------------------
1 |
2 |
This is a general overview of what the #bigrigHelperFunction#() funtion does, and how to add your own, custom BigRig routes.
3 |
Examples
4 |
All examples would take you to the /apps/blog/views/user/edit.cfm view. (So long as no other patterns were matched first.)
5 |
6 |
7 |
8 | <server>
9 | <apps>
10 | <blog>
11 | <controllers>
12 | Users.cfc
13 | action=edit
14 | key=5
15 | <views>
16 | <users>
17 | edit.cfm
18 | <controllers>
19 | <models>
20 | <views>
21 | <wheels>
22 | <etc>
23 |
24 |
25 |
26 |
Name, path, empty string keyword (/blog/users/add/5)
27 |
Skips the need for refrencing the BigRig folder in your routes.
28 |
29 |
30 |
31 |
This is a shortcut for the following code: (you could do it manualy if you wanted)
32 |
33 |
<cfset addRoute(name="apps", pattern="/[app]/[controller]/[action]/[key]")>
34 | <cfset addRoute(name="apps", pattern="/[app]/[controller]/[action]")>
35 | <cfset addRoute(name="apps", pattern="/[app]/[controller]", action="index")>
36 |
37 | <cfset this.mappings["/apps"] = expandPath("path") />
38 |
39 |
40 |
This would enable a folder with the name of apps inside of your root wheels install folder to have as many wheels enabled folders as required, so long as your apps didn't have any naming collisions with other BigRig application folders(in this case, apps would be the BigRig application folder).
41 |
42 |
For example, this URL:
43 |
44 |
/blog/users/add/5
45 |
46 |
Would load the /apps/blog/controllers/User.cfc controller, hit the add action with the key of 5 and render the /apps/blog/views/user/edit.cfm view.
47 |
48 |
49 |
Name, path, custom keyword
50 |
51 |
52 |
53 |
<cfset addRoute(name="apps", pattern="my-apps/[app]/[controller]/[action]/[key]")>
54 | <cfset addRoute(name="apps", pattern="my-apps/[app]/[controller]/[action]")>
55 | <cfset addRoute(name="apps", pattern="my-apps/[app]/[controller]", action="index")>
56 |
57 | <cfset this.mappings["/#arguments.name#"] = expandPath(arguments.path) />
58 |
59 |
60 |
--------------------------------------------------------------------------------
/views/docs/_header.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
32 |
33 |
--------------------------------------------------------------------------------
/controllers/Controller.cfc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | You need to include the BigRig rigs.cfm in your config/routes.cfm file.
<cfinclude template="plugins/bigrig/rigs.cfm" />
Or reload wheels if you already added it.
') />
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | #arguments.lineEnd#' />
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------