|
12 | 12 | q = QueryNew("type,ref,name,introduced,sort,description"); |
13 | 13 |
|
14 | 14 | function addChangeLog(q, page, ref, name, introduced, description){ |
15 | | - // systemOutput( "addChangeLog: ref=[#arguments.ref#], name=[#arguments.name#], introduced=[#arguments.introduced#]", true ); // Debug logging |
16 | | - var r = queryAddRow(q); |
17 | | - querySetCell(q,"type", arguments.page.getPageType()); |
18 | | - querySetCell(q,"ref", arguments.ref); |
19 | | - querySetCell(q,"name", arguments.name); |
20 | | - querySetCell(q,"introduced", arguments.introduced); |
| 15 | + // systemOutput( "addChangeLog: ref=[#arguments.ref#], name=[#arguments.name#], introduced=[#arguments.introduced#]", true ); // Debug logging |
| 16 | + var r = queryAddRow(q); |
| 17 | + querySetCell(q,"type", arguments.page.getPageType()); |
| 18 | + |
| 19 | + // Format reference based on page type |
| 20 | + var formattedRef = arguments.ref; |
| 21 | + if (arguments.page.getPageType() == "function") { |
| 22 | + if (arguments.ref contains "function-") { |
| 23 | + formattedRef = replaceNocase(arguments.ref, "function-", "functions/"); |
| 24 | + } else { |
| 25 | + formattedRef = "functions/" & arguments.ref; |
| 26 | + } |
| 27 | + } else if (arguments.page.getPageType() == "tag") { |
| 28 | + if (arguments.ref contains "tag-") { |
| 29 | + formattedRef = replaceNocase(arguments.ref, "tag-", "tags/"); |
| 30 | + } else { |
| 31 | + formattedRef = "tags/" & arguments.ref; |
| 32 | + } |
| 33 | + } |
| 34 | + |
| 35 | + querySetCell(q,"ref", formattedRef); |
| 36 | + querySetCell(q,"name", arguments.name); |
| 37 | + querySetCell(q,"introduced", arguments.introduced); |
21 | 38 |
|
22 | | - var sort=[]; |
23 | | - var intro = []; |
24 | | - loop list="#arguments.introduced#" delimiters="." item="local.v" { |
25 | | - if (v eq "000") v = 0; |
26 | | - arrayAppend(sort, numberFormat(v, "0000")); |
27 | | - arrayAppend(intro, v); |
28 | | - } |
29 | | - querySetCell(q,"introduced", intro.toList(".")); |
30 | | - querySetCell(q,"sort", sort.toList("")); |
31 | | - querySetCell(q,"description", arguments.description); |
32 | | - } |
| 39 | + var sort=[]; |
| 40 | + var intro = []; |
| 41 | + loop list="#arguments.introduced#" delimiters="." item="local.v" { |
| 42 | + if (v eq "000") v = 0; |
| 43 | + arrayAppend(sort, numberFormat(v, "0000")); |
| 44 | + arrayAppend(intro, v); |
| 45 | + } |
| 46 | + querySetCell(q,"introduced", intro.toList(".")); |
| 47 | + querySetCell(q,"sort", sort.toList("")); |
| 48 | + querySetCell(q,"description", arguments.description); |
| 49 | +} |
33 | 50 | </cfscript> |
34 | 51 |
|
35 | 52 | <cfloop collection="#pc#" key="key" value="value"> |
|
93 | 110 |
|
94 | 111 | <ul> |
95 | 112 | <cfoutput query=q group="introduced"> |
96 | | - <li> |
97 | | - #q.introduced# |
98 | | - <ul> |
99 | | - <cfoutput> |
100 | | - <li> |
101 | | - <a href="#q.ref#.html"> |
102 | | - <cfif len(q.description)> |
103 | | - #q.description# |
104 | | - <cfelse> |
105 | | - #htmlEditFormat(q.name)# |
106 | | - </cfif> |
107 | | - </a> |
108 | | - </li> |
109 | | - </cfoutput> |
110 | | - </ul> |
111 | | - </li> |
| 113 | + <li> |
| 114 | + #q.introduced# |
| 115 | + <ul> |
| 116 | + <cfoutput> |
| 117 | + <li> |
| 118 | + <a href="reference/#q.ref#.html"> |
| 119 | + <cfif len(q.description)> |
| 120 | + #q.description# |
| 121 | + <cfelse> |
| 122 | + #htmlEditFormat(q.name)# |
| 123 | + </cfif> |
| 124 | + </a> |
| 125 | + </li> |
| 126 | + </cfoutput> |
| 127 | + </ul> |
| 128 | + </li> |
112 | 129 | </cfoutput> |
113 | 130 | </ul> |
0 commit comments