browsercms 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (444) hide show
  1. data/app/controllers/cms/connectors_controller.rb +1 -1
  2. data/app/helpers/cms/application_helper.rb +2 -19
  3. data/app/helpers/cms/form_builder.rb +8 -5
  4. data/app/helpers/cms/menu_helper.rb +19 -5
  5. data/app/helpers/cms/page_helper.rb +9 -1
  6. data/app/helpers/cms/template_support.rb +21 -0
  7. data/app/models/abstract_file_block.rb +4 -0
  8. data/app/models/connector.rb +7 -3
  9. data/app/models/dynamic_view.rb +2 -4
  10. data/app/models/portlet.rb +22 -9
  11. data/app/models/section.rb +7 -5
  12. data/app/views/cms/blocks/_toolbar_for_member.html.erb +4 -4
  13. data/app/views/cms/blocks/index.html.erb +1 -1
  14. data/app/views/cms/blocks/usages.html.erb +44 -34
  15. data/app/views/cms/connectors/new.html.erb +2 -2
  16. data/app/views/cms/dynamic_views/_form.html.erb +1 -1
  17. data/app/views/cms/dynamic_views/index.html.erb +7 -3
  18. data/app/views/cms/email_messages/index.html.erb +3 -5
  19. data/app/views/cms/form_builder/_cms_datetime_select.html.erb +12 -0
  20. data/app/views/cms/form_builder/_cms_text_editor.html.erb +2 -2
  21. data/app/views/cms/form_builder/_cms_text_field.html.erb +1 -2
  22. data/app/views/cms/groups/_permissions.html.erb +1 -0
  23. data/app/views/cms/groups/_sections.html.erb +1 -0
  24. data/app/views/cms/groups/index.html.erb +3 -5
  25. data/app/views/cms/page_routes/index.html.erb +13 -7
  26. data/app/views/cms/page_routes/show.html.erb +4 -4
  27. data/app/views/cms/pages/_edit_connector.html.erb +4 -1
  28. data/app/views/cms/pages/_edit_container.html.erb +4 -1
  29. data/app/views/cms/redirects/index.html.erb +12 -7
  30. data/app/views/cms/routes/index.html.erb +11 -7
  31. data/app/views/cms/sections/_form.html.erb +4 -5
  32. data/app/views/cms/users/_groups.html.erb +1 -0
  33. data/app/views/layouts/_cms_toolbar.html.erb +37 -4
  34. data/app/views/layouts/_page_toolbar.html.erb +2 -2
  35. data/browsercms.gemspec +381 -3
  36. data/db/demo/data.rb +2 -1
  37. data/doc/app/classes/AbstractFileBlock.html +146 -0
  38. data/doc/app/classes/ActiveRecord.html +105 -0
  39. data/doc/app/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html +242 -0
  40. data/doc/app/classes/ActiveSupport.html +111 -0
  41. data/doc/app/classes/ActiveSupport/Cache.html +111 -0
  42. data/doc/app/classes/ActiveSupport/Cache/FileStore.html +146 -0
  43. data/doc/app/classes/ActsAsList.html +147 -0
  44. data/doc/app/classes/ActsAsList/ClassMethods.html +202 -0
  45. data/doc/app/classes/ActsAsList/InstanceMethods.html +510 -0
  46. data/doc/app/classes/ApplicationController.html +119 -0
  47. data/doc/app/classes/ApplicationHelper.html +112 -0
  48. data/doc/app/classes/Attachment.html +726 -0
  49. data/doc/app/classes/Category.html +230 -0
  50. data/doc/app/classes/CategoryType.html +214 -0
  51. data/doc/app/classes/Cms.html +638 -0
  52. data/doc/app/classes/Cms/Acts.html +111 -0
  53. data/doc/app/classes/Cms/Acts/ContentBlock.html +146 -0
  54. data/doc/app/classes/Cms/Acts/ContentBlock/MacroMethods.html +165 -0
  55. data/doc/app/classes/Cms/Acts/ContentBlock/MacroMethods/InstanceMethods.html +140 -0
  56. data/doc/app/classes/Cms/ApplicationController.html +418 -0
  57. data/doc/app/classes/Cms/ApplicationHelper.html +814 -0
  58. data/doc/app/classes/Cms/AttachmentsController.html +154 -0
  59. data/doc/app/classes/Cms/Authentication.html +116 -0
  60. data/doc/app/classes/Cms/Authentication/Controller.html +702 -0
  61. data/doc/app/classes/Cms/Authentication/Model.html +165 -0
  62. data/doc/app/classes/Cms/Authentication/Model/ClassMethods.html +246 -0
  63. data/doc/app/classes/Cms/Authentication/Model/InstanceMethods.html +412 -0
  64. data/doc/app/classes/Cms/BaseController.html +113 -0
  65. data/doc/app/classes/Cms/Behaviors.html +235 -0
  66. data/doc/app/classes/Cms/Behaviors/Archiving.html +147 -0
  67. data/doc/app/classes/Cms/Behaviors/Archiving/InstanceMethods.html +220 -0
  68. data/doc/app/classes/Cms/Behaviors/Archiving/MacroMethods.html +175 -0
  69. data/doc/app/classes/Cms/Behaviors/Attaching.html +160 -0
  70. data/doc/app/classes/Cms/Behaviors/Attaching/InstanceMethods.html +670 -0
  71. data/doc/app/classes/Cms/Behaviors/Attaching/MacroMethods.html +188 -0
  72. data/doc/app/classes/Cms/Behaviors/Categorizing.html +148 -0
  73. data/doc/app/classes/Cms/Behaviors/Categorizing/ClassMethods.html +105 -0
  74. data/doc/app/classes/Cms/Behaviors/Categorizing/InstanceMethods.html +140 -0
  75. data/doc/app/classes/Cms/Behaviors/Categorizing/MacroMethods.html +178 -0
  76. data/doc/app/classes/Cms/Behaviors/ClassMethods.html +272 -0
  77. data/doc/app/classes/Cms/Behaviors/Connecting.html +148 -0
  78. data/doc/app/classes/Cms/Behaviors/Connecting/ClassMethods.html +188 -0
  79. data/doc/app/classes/Cms/Behaviors/Connecting/InstanceMethods.html +312 -0
  80. data/doc/app/classes/Cms/Behaviors/Connecting/MacroMethods.html +184 -0
  81. data/doc/app/classes/Cms/Behaviors/DynamicAttributes.html +285 -0
  82. data/doc/app/classes/Cms/Behaviors/DynamicAttributes/InstanceMethods.html +181 -0
  83. data/doc/app/classes/Cms/Behaviors/DynamicAttributes/MacroMethods.html +243 -0
  84. data/doc/app/classes/Cms/Behaviors/FlushCacheOnChange.html +178 -0
  85. data/doc/app/classes/Cms/Behaviors/FlushCacheOnChange/InstanceMethods.html +142 -0
  86. data/doc/app/classes/Cms/Behaviors/FlushCacheOnChange/MacroMethods.html +175 -0
  87. data/doc/app/classes/Cms/Behaviors/Hiding.html +148 -0
  88. data/doc/app/classes/Cms/Behaviors/Hiding/ClassMethods.html +105 -0
  89. data/doc/app/classes/Cms/Behaviors/Hiding/InstanceMethods.html +220 -0
  90. data/doc/app/classes/Cms/Behaviors/Hiding/MacroMethods.html +176 -0
  91. data/doc/app/classes/Cms/Behaviors/InstanceMethods.html +234 -0
  92. data/doc/app/classes/Cms/Behaviors/Pagination.html +151 -0
  93. data/doc/app/classes/Cms/Behaviors/Pagination/ClassMethods.html +252 -0
  94. data/doc/app/classes/Cms/Behaviors/Pagination/Collection.html +437 -0
  95. data/doc/app/classes/Cms/Behaviors/Pagination/InvalidPage.html +146 -0
  96. data/doc/app/classes/Cms/Behaviors/Publishing.html +179 -0
  97. data/doc/app/classes/Cms/Behaviors/Publishing/ClassMethods.html +105 -0
  98. data/doc/app/classes/Cms/Behaviors/Publishing/InstanceMethods.html +333 -0
  99. data/doc/app/classes/Cms/Behaviors/Publishing/MacroMethods.html +180 -0
  100. data/doc/app/classes/Cms/Behaviors/Rendering.html +179 -0
  101. data/doc/app/classes/Cms/Behaviors/Rendering/MacroMethods.html +186 -0
  102. data/doc/app/classes/Cms/Behaviors/Searching.html +147 -0
  103. data/doc/app/classes/Cms/Behaviors/Searching/ClassMethods.html +164 -0
  104. data/doc/app/classes/Cms/Behaviors/Searching/MacroMethods.html +188 -0
  105. data/doc/app/classes/Cms/Behaviors/SoftDeleting.html +148 -0
  106. data/doc/app/classes/Cms/Behaviors/SoftDeleting/ClassMethods.html +217 -0
  107. data/doc/app/classes/Cms/Behaviors/SoftDeleting/InstanceMethods.html +247 -0
  108. data/doc/app/classes/Cms/Behaviors/SoftDeleting/MacroMethods.html +205 -0
  109. data/doc/app/classes/Cms/Behaviors/Taggable.html +148 -0
  110. data/doc/app/classes/Cms/Behaviors/Taggable/ClassMethods.html +164 -0
  111. data/doc/app/classes/Cms/Behaviors/Taggable/InstanceMethods.html +197 -0
  112. data/doc/app/classes/Cms/Behaviors/Taggable/MacroMethods.html +182 -0
  113. data/doc/app/classes/Cms/Behaviors/Userstamping.html +148 -0
  114. data/doc/app/classes/Cms/Behaviors/Userstamping/ClassMethods.html +105 -0
  115. data/doc/app/classes/Cms/Behaviors/Userstamping/InstanceMethods.html +143 -0
  116. data/doc/app/classes/Cms/Behaviors/Userstamping/MacroMethods.html +181 -0
  117. data/doc/app/classes/Cms/Behaviors/Versioning.html +148 -0
  118. data/doc/app/classes/Cms/Behaviors/Versioning/ClassMethods.html +237 -0
  119. data/doc/app/classes/Cms/Behaviors/Versioning/InstanceMethods.html +685 -0
  120. data/doc/app/classes/Cms/Behaviors/Versioning/MacroMethods.html +290 -0
  121. data/doc/app/classes/Cms/CacheController.html +174 -0
  122. data/doc/app/classes/Cms/Caching.html +171 -0
  123. data/doc/app/classes/Cms/CategoriesController.html +113 -0
  124. data/doc/app/classes/Cms/CategoryTypesController.html +148 -0
  125. data/doc/app/classes/Cms/ConnectorsController.html +215 -0
  126. data/doc/app/classes/Cms/ContentBlockController.html +1175 -0
  127. data/doc/app/classes/Cms/ContentController.html +313 -0
  128. data/doc/app/classes/Cms/ContentTypesController.html +148 -0
  129. data/doc/app/classes/Cms/DashboardController.html +151 -0
  130. data/doc/app/classes/Cms/DataLoader.html +182 -0
  131. data/doc/app/classes/Cms/DynamicViewsController.html +359 -0
  132. data/doc/app/classes/Cms/EmailMessagesController.html +172 -0
  133. data/doc/app/classes/Cms/ErrorHandling.html +172 -0
  134. data/doc/app/classes/Cms/Errors.html +111 -0
  135. data/doc/app/classes/Cms/Errors/AccessDenied.html +146 -0
  136. data/doc/app/classes/Cms/Extensions.html +140 -0
  137. data/doc/app/classes/Cms/Extensions/ActionView.html +111 -0
  138. data/doc/app/classes/Cms/Extensions/ActionView/Base.html +141 -0
  139. data/doc/app/classes/Cms/Extensions/ActiveRecord.html +116 -0
  140. data/doc/app/classes/Cms/Extensions/ActiveRecord/Base.html +144 -0
  141. data/doc/app/classes/Cms/Extensions/ActiveRecord/Errors.html +140 -0
  142. data/doc/app/classes/Cms/Extensions/Hash.html +175 -0
  143. data/doc/app/classes/Cms/Extensions/Integer.html +146 -0
  144. data/doc/app/classes/Cms/Extensions/NilClass.html +212 -0
  145. data/doc/app/classes/Cms/Extensions/String.html +212 -0
  146. data/doc/app/classes/Cms/FileBlocksController.html +113 -0
  147. data/doc/app/classes/Cms/FormBuilder.html +312 -0
  148. data/doc/app/classes/Cms/FormTagHelper.html +245 -0
  149. data/doc/app/classes/Cms/GroupsController.html +225 -0
  150. data/doc/app/classes/Cms/HomeController.html +148 -0
  151. data/doc/app/classes/Cms/HtmlBlocksController.html +113 -0
  152. data/doc/app/classes/Cms/ImageBlocksController.html +113 -0
  153. data/doc/app/classes/Cms/LinksController.html +341 -0
  154. data/doc/app/classes/Cms/MenuHelper.html +330 -0
  155. data/doc/app/classes/Cms/PageHelper.html +292 -0
  156. data/doc/app/classes/Cms/PageRouteConditionsController.html +113 -0
  157. data/doc/app/classes/Cms/PageRouteOptionsController.html +355 -0
  158. data/doc/app/classes/Cms/PageRouteRequirementsController.html +113 -0
  159. data/doc/app/classes/Cms/PageRoutesController.html +284 -0
  160. data/doc/app/classes/Cms/PagesController.html +331 -0
  161. data/doc/app/classes/Cms/PathHelper.html +268 -0
  162. data/doc/app/classes/Cms/PortletController.html +150 -0
  163. data/doc/app/classes/Cms/PortletsController.html +301 -0
  164. data/doc/app/classes/Cms/RedirectsController.html +172 -0
  165. data/doc/app/classes/Cms/ResourceController.html +616 -0
  166. data/doc/app/classes/Cms/Routes.html +303 -0
  167. data/doc/app/classes/Cms/RoutesController.html +164 -0
  168. data/doc/app/classes/Cms/SectionNodesController.html +272 -0
  169. data/doc/app/classes/Cms/SectionNodesHelper.html +145 -0
  170. data/doc/app/classes/Cms/SectionsController.html +542 -0
  171. data/doc/app/classes/Cms/SessionsController.html +270 -0
  172. data/doc/app/classes/Cms/TagsController.html +152 -0
  173. data/doc/app/classes/Cms/TasksController.html +221 -0
  174. data/doc/app/classes/Cms/ToolbarController.html +153 -0
  175. data/doc/app/classes/Cms/UsersController.html +405 -0
  176. data/doc/app/classes/Connector.html +350 -0
  177. data/doc/app/classes/ContentType.html +448 -0
  178. data/doc/app/classes/ContentTypeGroup.html +111 -0
  179. data/doc/app/classes/DynamicPortlet.html +148 -0
  180. data/doc/app/classes/DynamicView.html +411 -0
  181. data/doc/app/classes/EmailMessage.html +228 -0
  182. data/doc/app/classes/EmailMessageMailer.html +150 -0
  183. data/doc/app/classes/EmailPagePortlet.html +184 -0
  184. data/doc/app/classes/FileBlock.html +202 -0
  185. data/doc/app/classes/Group.html +170 -0
  186. data/doc/app/classes/GroupPermission.html +111 -0
  187. data/doc/app/classes/GroupSection.html +111 -0
  188. data/doc/app/classes/GroupType.html +111 -0
  189. data/doc/app/classes/GroupTypePermission.html +111 -0
  190. data/doc/app/classes/GuestUser.html +347 -0
  191. data/doc/app/classes/HtmlBlock.html +170 -0
  192. data/doc/app/classes/ImageBlock.html +202 -0
  193. data/doc/app/classes/InitialData.html +171 -0
  194. data/doc/app/classes/Link.html +249 -0
  195. data/doc/app/classes/LoginPortlet.html +151 -0
  196. data/doc/app/classes/Page.html +954 -0
  197. data/doc/app/classes/PagePartial.html +201 -0
  198. data/doc/app/classes/PageRoute.html +335 -0
  199. data/doc/app/classes/PageRouteCondition.html +113 -0
  200. data/doc/app/classes/PageRouteOption.html +111 -0
  201. data/doc/app/classes/PageRouteRequirement.html +113 -0
  202. data/doc/app/classes/PageTemplate.html +278 -0
  203. data/doc/app/classes/Permission.html +111 -0
  204. data/doc/app/classes/Portlet.html +738 -0
  205. data/doc/app/classes/Redirect.html +111 -0
  206. data/doc/app/classes/Section.html +580 -0
  207. data/doc/app/classes/SectionNode.html +410 -0
  208. data/doc/app/classes/Sequence.html +146 -0
  209. data/doc/app/classes/Site.html +253 -0
  210. data/doc/app/classes/Tag.html +292 -0
  211. data/doc/app/classes/TagCloudPortlet.html +176 -0
  212. data/doc/app/classes/Tagging.html +146 -0
  213. data/doc/app/classes/Task.html +288 -0
  214. data/doc/app/classes/User.html +618 -0
  215. data/doc/app/classes/UserGroupMembership.html +111 -0
  216. data/doc/app/created.rid +1 -0
  217. data/doc/app/files/app/controllers/application_controller_rb.html +109 -0
  218. data/doc/app/files/app/controllers/cms/application_controller_rb.html +101 -0
  219. data/doc/app/files/app/controllers/cms/attachments_controller_rb.html +101 -0
  220. data/doc/app/files/app/controllers/cms/base_controller_rb.html +101 -0
  221. data/doc/app/files/app/controllers/cms/cache_controller_rb.html +101 -0
  222. data/doc/app/files/app/controllers/cms/categories_controller_rb.html +101 -0
  223. data/doc/app/files/app/controllers/cms/category_types_controller_rb.html +101 -0
  224. data/doc/app/files/app/controllers/cms/connectors_controller_rb.html +101 -0
  225. data/doc/app/files/app/controllers/cms/content_block_controller_rb.html +107 -0
  226. data/doc/app/files/app/controllers/cms/content_controller_rb.html +101 -0
  227. data/doc/app/files/app/controllers/cms/content_types_controller_rb.html +101 -0
  228. data/doc/app/files/app/controllers/cms/dashboard_controller_rb.html +101 -0
  229. data/doc/app/files/app/controllers/cms/dynamic_views_controller_rb.html +101 -0
  230. data/doc/app/files/app/controllers/cms/email_messages_controller_rb.html +101 -0
  231. data/doc/app/files/app/controllers/cms/error_handling_rb.html +101 -0
  232. data/doc/app/files/app/controllers/cms/file_blocks_controller_rb.html +101 -0
  233. data/doc/app/files/app/controllers/cms/groups_controller_rb.html +101 -0
  234. data/doc/app/files/app/controllers/cms/home_controller_rb.html +101 -0
  235. data/doc/app/files/app/controllers/cms/html_blocks_controller_rb.html +101 -0
  236. data/doc/app/files/app/controllers/cms/image_blocks_controller_rb.html +101 -0
  237. data/doc/app/files/app/controllers/cms/links_controller_rb.html +101 -0
  238. data/doc/app/files/app/controllers/cms/page_route_conditions_controller_rb.html +101 -0
  239. data/doc/app/files/app/controllers/cms/page_route_options_controller_rb.html +101 -0
  240. data/doc/app/files/app/controllers/cms/page_route_requirements_controller_rb.html +101 -0
  241. data/doc/app/files/app/controllers/cms/page_routes_controller_rb.html +101 -0
  242. data/doc/app/files/app/controllers/cms/pages_controller_rb.html +101 -0
  243. data/doc/app/files/app/controllers/cms/portlet_controller_rb.html +101 -0
  244. data/doc/app/files/app/controllers/cms/portlets_controller_rb.html +101 -0
  245. data/doc/app/files/app/controllers/cms/redirects_controller_rb.html +101 -0
  246. data/doc/app/files/app/controllers/cms/resource_controller_rb.html +108 -0
  247. data/doc/app/files/app/controllers/cms/routes_controller_rb.html +101 -0
  248. data/doc/app/files/app/controllers/cms/section_nodes_controller_rb.html +101 -0
  249. data/doc/app/files/app/controllers/cms/sections_controller_rb.html +101 -0
  250. data/doc/app/files/app/controllers/cms/sessions_controller_rb.html +107 -0
  251. data/doc/app/files/app/controllers/cms/tags_controller_rb.html +101 -0
  252. data/doc/app/files/app/controllers/cms/tasks_controller_rb.html +101 -0
  253. data/doc/app/files/app/controllers/cms/toolbar_controller_rb.html +101 -0
  254. data/doc/app/files/app/controllers/cms/users_controller_rb.html +101 -0
  255. data/doc/app/files/app/helpers/application_helper_rb.html +108 -0
  256. data/doc/app/files/app/helpers/cms/application_helper_rb.html +107 -0
  257. data/doc/app/files/app/helpers/cms/form_builder_rb.html +101 -0
  258. data/doc/app/files/app/helpers/cms/form_tag_helper_rb.html +101 -0
  259. data/doc/app/files/app/helpers/cms/menu_helper_rb.html +101 -0
  260. data/doc/app/files/app/helpers/cms/page_helper_rb.html +101 -0
  261. data/doc/app/files/app/helpers/cms/path_helper_rb.html +101 -0
  262. data/doc/app/files/app/helpers/cms/section_nodes_helper_rb.html +101 -0
  263. data/doc/app/files/app/models/abstract_file_block_rb.html +101 -0
  264. data/doc/app/files/app/models/attachment_rb.html +109 -0
  265. data/doc/app/files/app/models/category_rb.html +101 -0
  266. data/doc/app/files/app/models/category_type_rb.html +101 -0
  267. data/doc/app/files/app/models/connector_rb.html +101 -0
  268. data/doc/app/files/app/models/content_type_group_rb.html +101 -0
  269. data/doc/app/files/app/models/content_type_rb.html +101 -0
  270. data/doc/app/files/app/models/dynamic_view_rb.html +101 -0
  271. data/doc/app/files/app/models/email_message_mailer_rb.html +101 -0
  272. data/doc/app/files/app/models/email_message_rb.html +101 -0
  273. data/doc/app/files/app/models/file_block_rb.html +101 -0
  274. data/doc/app/files/app/models/group_permission_rb.html +101 -0
  275. data/doc/app/files/app/models/group_rb.html +101 -0
  276. data/doc/app/files/app/models/group_section_rb.html +101 -0
  277. data/doc/app/files/app/models/group_type_permission_rb.html +101 -0
  278. data/doc/app/files/app/models/group_type_rb.html +101 -0
  279. data/doc/app/files/app/models/guest_user_rb.html +101 -0
  280. data/doc/app/files/app/models/html_block_rb.html +101 -0
  281. data/doc/app/files/app/models/image_block_rb.html +101 -0
  282. data/doc/app/files/app/models/link_rb.html +101 -0
  283. data/doc/app/files/app/models/page_partial_rb.html +101 -0
  284. data/doc/app/files/app/models/page_rb.html +101 -0
  285. data/doc/app/files/app/models/page_route_condition_rb.html +101 -0
  286. data/doc/app/files/app/models/page_route_option_rb.html +101 -0
  287. data/doc/app/files/app/models/page_route_rb.html +101 -0
  288. data/doc/app/files/app/models/page_route_requirement_rb.html +101 -0
  289. data/doc/app/files/app/models/page_template_rb.html +101 -0
  290. data/doc/app/files/app/models/permission_rb.html +101 -0
  291. data/doc/app/files/app/models/portlet_rb.html +101 -0
  292. data/doc/app/files/app/models/redirect_rb.html +101 -0
  293. data/doc/app/files/app/models/section_node_rb.html +101 -0
  294. data/doc/app/files/app/models/section_rb.html +101 -0
  295. data/doc/app/files/app/models/site_rb.html +101 -0
  296. data/doc/app/files/app/models/tag_rb.html +101 -0
  297. data/doc/app/files/app/models/tagging_rb.html +101 -0
  298. data/doc/app/files/app/models/task_rb.html +101 -0
  299. data/doc/app/files/app/models/user_group_membership_rb.html +101 -0
  300. data/doc/app/files/app/models/user_rb.html +108 -0
  301. data/doc/app/files/app/portlets/dynamic_portlet_rb.html +101 -0
  302. data/doc/app/files/app/portlets/email_page_portlet_rb.html +101 -0
  303. data/doc/app/files/app/portlets/login_portlet_rb.html +101 -0
  304. data/doc/app/files/app/portlets/tag_cloud_portlet_rb.html +101 -0
  305. data/doc/app/files/doc/README_FOR_APP.html +127 -0
  306. data/doc/app/files/lib/acts_as_list_rb.html +101 -0
  307. data/doc/app/files/lib/browsercms_rb.html +113 -0
  308. data/doc/app/files/lib/cms/acts/content_block_rb.html +101 -0
  309. data/doc/app/files/lib/cms/authentication/controller_rb.html +101 -0
  310. data/doc/app/files/lib/cms/authentication/model_rb.html +101 -0
  311. data/doc/app/files/lib/cms/behaviors/archiving_rb.html +101 -0
  312. data/doc/app/files/lib/cms/behaviors/attaching_rb.html +101 -0
  313. data/doc/app/files/lib/cms/behaviors/categorizing_rb.html +101 -0
  314. data/doc/app/files/lib/cms/behaviors/connecting_rb.html +101 -0
  315. data/doc/app/files/lib/cms/behaviors/dynamic_attributes_rb.html +101 -0
  316. data/doc/app/files/lib/cms/behaviors/flush_cache_on_change_rb.html +101 -0
  317. data/doc/app/files/lib/cms/behaviors/hiding_rb.html +101 -0
  318. data/doc/app/files/lib/cms/behaviors/pagination_rb.html +107 -0
  319. data/doc/app/files/lib/cms/behaviors/publishing_rb.html +101 -0
  320. data/doc/app/files/lib/cms/behaviors/rendering_rb.html +101 -0
  321. data/doc/app/files/lib/cms/behaviors/searching_rb.html +101 -0
  322. data/doc/app/files/lib/cms/behaviors/soft_deleting_rb.html +101 -0
  323. data/doc/app/files/lib/cms/behaviors/taggable_rb.html +101 -0
  324. data/doc/app/files/lib/cms/behaviors/userstamping_rb.html +101 -0
  325. data/doc/app/files/lib/cms/behaviors/versioning_rb.html +101 -0
  326. data/doc/app/files/lib/cms/behaviors_rb.html +147 -0
  327. data/doc/app/files/lib/cms/caching_rb.html +101 -0
  328. data/doc/app/files/lib/cms/data_loader_rb.html +101 -0
  329. data/doc/app/files/lib/cms/extensions/action_view/base_rb.html +101 -0
  330. data/doc/app/files/lib/cms/extensions/active_record/base_rb.html +101 -0
  331. data/doc/app/files/lib/cms/extensions/active_record/connection_adapters/abstract/schema_statements_rb.html +101 -0
  332. data/doc/app/files/lib/cms/extensions/active_record/errors_rb.html +101 -0
  333. data/doc/app/files/lib/cms/extensions/active_support/cache/file_store_rb.html +101 -0
  334. data/doc/app/files/lib/cms/extensions/hash_rb.html +101 -0
  335. data/doc/app/files/lib/cms/extensions/integer_rb.html +101 -0
  336. data/doc/app/files/lib/cms/extensions/nil_rb.html +101 -0
  337. data/doc/app/files/lib/cms/extensions/string_rb.html +101 -0
  338. data/doc/app/files/lib/cms/extensions_rb.html +101 -0
  339. data/doc/app/files/lib/cms/init_rb.html +101 -0
  340. data/doc/app/files/lib/cms/routes_rb.html +101 -0
  341. data/doc/app/files/lib/initial_data_rb.html +101 -0
  342. data/doc/app/files/lib/sequence_rb.html +101 -0
  343. data/doc/app/fr_class_index.html +205 -0
  344. data/doc/app/fr_file_index.html +152 -0
  345. data/doc/app/fr_method_index.html +738 -0
  346. data/doc/app/index.html +24 -0
  347. data/doc/app/rdoc-style.css +208 -0
  348. data/doc/guides/html/build_it_yourself.html +175 -0
  349. data/doc/guides/html/deployment_guide.html +181 -0
  350. data/doc/guides/html/designer_guide.html +153 -0
  351. data/doc/guides/html/developer_guide.html +266 -0
  352. data/doc/guides/html/files/javascripts/code_highlighter.js +188 -0
  353. data/doc/guides/html/files/javascripts/guides.js +7 -0
  354. data/doc/guides/html/files/javascripts/highlighters.js +90 -0
  355. data/doc/guides/html/files/stylesheets/main.css +441 -0
  356. data/doc/guides/html/files/stylesheets/reset.css +43 -0
  357. data/doc/guides/html/files/stylesheets/style.css +13 -0
  358. data/doc/guides/html/files/stylesheets/syntax.css +31 -0
  359. data/doc/guides/html/getting_started.html +181 -0
  360. data/doc/guides/html/images/bg.png +0 -0
  361. data/doc/guides/html/images/bottom_cap.png +0 -0
  362. data/doc/guides/html/images/browsercms_logo.png +0 -0
  363. data/doc/guides/html/images/dot.png +0 -0
  364. data/doc/guides/html/images/icons/README +5 -0
  365. data/doc/guides/html/images/icons/callouts/1.png +0 -0
  366. data/doc/guides/html/images/icons/callouts/10.png +0 -0
  367. data/doc/guides/html/images/icons/callouts/11.png +0 -0
  368. data/doc/guides/html/images/icons/callouts/12.png +0 -0
  369. data/doc/guides/html/images/icons/callouts/13.png +0 -0
  370. data/doc/guides/html/images/icons/callouts/14.png +0 -0
  371. data/doc/guides/html/images/icons/callouts/15.png +0 -0
  372. data/doc/guides/html/images/icons/callouts/2.png +0 -0
  373. data/doc/guides/html/images/icons/callouts/3.png +0 -0
  374. data/doc/guides/html/images/icons/callouts/4.png +0 -0
  375. data/doc/guides/html/images/icons/callouts/5.png +0 -0
  376. data/doc/guides/html/images/icons/callouts/6.png +0 -0
  377. data/doc/guides/html/images/icons/callouts/7.png +0 -0
  378. data/doc/guides/html/images/icons/callouts/8.png +0 -0
  379. data/doc/guides/html/images/icons/callouts/9.png +0 -0
  380. data/doc/guides/html/images/icons/caution.png +0 -0
  381. data/doc/guides/html/images/icons/example.png +0 -0
  382. data/doc/guides/html/images/icons/home.png +0 -0
  383. data/doc/guides/html/images/icons/important.png +0 -0
  384. data/doc/guides/html/images/icons/next.png +0 -0
  385. data/doc/guides/html/images/icons/note.png +0 -0
  386. data/doc/guides/html/images/icons/prev.png +0 -0
  387. data/doc/guides/html/images/icons/tip.png +0 -0
  388. data/doc/guides/html/images/icons/up.png +0 -0
  389. data/doc/guides/html/images/icons/warning.png +0 -0
  390. data/doc/guides/html/images/top_cap.png +0 -0
  391. data/doc/guides/html/images/top_cap_content.png +0 -0
  392. data/doc/guides/html/index.html +168 -0
  393. data/doc/guides/html/installing_modules.html +181 -0
  394. data/doc/guides/html/user_guide.html +266 -0
  395. data/lib/cms/behaviors/attaching.rb +1 -1
  396. data/lib/cms/behaviors/rendering.rb +1 -1
  397. data/lib/cms/behaviors/taggable.rb +2 -1
  398. data/lib/cms/behaviors/versioning.rb +1 -1
  399. data/lib/cms/init.rb +4 -4
  400. data/lib/tasks/cms.rake +16 -42
  401. data/public/images/cms/buttons/button_cap_off_middle.gif +0 -0
  402. data/public/images/cms/buttons/button_left_bg.png +0 -0
  403. data/public/images/cms/buttons/button_off_middle.png +0 -0
  404. data/public/images/cms/nav_admin.gif +0 -0
  405. data/public/images/cms/nav_admin_h.gif +0 -0
  406. data/public/images/cms/nav_admin_on.gif +0 -0
  407. data/public/images/cms/nav_content_library.gif +0 -0
  408. data/public/images/cms/nav_content_library_h.gif +0 -0
  409. data/public/images/cms/nav_content_library_on.gif +0 -0
  410. data/public/images/cms/nav_dash.gif +0 -0
  411. data/public/images/cms/nav_dash_h.gif +0 -0
  412. data/public/images/cms/nav_dash_on.gif +0 -0
  413. data/public/images/cms/nav_sitemap.gif +0 -0
  414. data/public/images/cms/nav_sitemap_h.gif +0 -0
  415. data/public/images/cms/nav_sitemap_on.gif +0 -0
  416. data/public/stylesheets/cms/administration.css +91 -91
  417. data/public/stylesheets/cms/block.css +25 -25
  418. data/public/stylesheets/cms/buttons.css +120 -111
  419. data/public/stylesheets/cms/content_library.css +2 -1
  420. data/public/stylesheets/cms/content_types.css +3 -3
  421. data/public/stylesheets/cms/dashboard.css +118 -118
  422. data/public/stylesheets/cms/data_table.css +155 -155
  423. data/public/stylesheets/cms/form_layout.css +269 -269
  424. data/public/stylesheets/cms/jquery.contextMenu.css +61 -61
  425. data/public/stylesheets/cms/login.css +77 -77
  426. data/public/stylesheets/cms/menu.css +116 -116
  427. data/public/stylesheets/cms/nav.css +98 -111
  428. data/public/stylesheets/cms/page_toolbar.css +134 -134
  429. data/public/stylesheets/cms/sitemap.css +31 -15
  430. data/rails_generators/content_block/content_block_generator.rb +4 -9
  431. data/rails_generators/content_block/templates/_form.html.erb +3 -1
  432. data/rails_generators/portlet/portlet_generator.rb +2 -6
  433. data/rails_generators/portlet/templates/_form.html.erb +1 -0
  434. data/templates/blank.rb +30 -0
  435. data/templates/demo.rb +28 -0
  436. data/templates/module.rb +945 -0
  437. data/test/functional/cms/connectors_controller_test.rb +12 -1
  438. data/test/functional/cms/portlets_controller_test.rb +10 -0
  439. data/test/unit/behaviors/taggable_test.rb +19 -0
  440. data/test/unit/helpers/menu_helper_test.rb +72 -1
  441. data/test/unit/lib/generators_test.rb +21 -3
  442. data/test/unit/models/connector_test.rb +16 -0
  443. data/test/unit/models/sections_test.rb +4 -0
  444. metadata +380 -2
@@ -0,0 +1,249 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Link</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Link</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/app/models/link_rb.html">
59
+ app/models/link.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ ActiveRecord::Base
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000079">path</a>&nbsp;&nbsp;
90
+ <a href="#M000076">section</a>&nbsp;&nbsp;
91
+ <a href="#M000078">section=</a>&nbsp;&nbsp;
92
+ <a href="#M000075">section_id</a>&nbsp;&nbsp;
93
+ <a href="#M000077">section_id=</a>&nbsp;&nbsp;
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+
100
+ <!-- if includes -->
101
+
102
+ <div id="section">
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Instance methods</h3>
114
+
115
+ <div id="method-M000079" class="method-detail">
116
+ <a name="M000079"></a>
117
+
118
+ <div class="method-heading">
119
+ <a href="#M000079" class="method-signature">
120
+ <span class="method-name">path</span><span class="method-args">()</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p>
126
+ needed by menu_helper
127
+ </p>
128
+ <p><a class="source-toggle" href="#"
129
+ onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
130
+ <div class="method-source-code" id="M000079-source">
131
+ <pre>
132
+ <span class="ruby-comment cmt"># File app/models/link.rb, line 31</span>
133
+ 31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>
134
+ 32: <span class="ruby-identifier">url</span>
135
+ 33: <span class="ruby-keyword kw">end</span>
136
+ </pre>
137
+ </div>
138
+ </div>
139
+ </div>
140
+
141
+ <div id="method-M000076" class="method-detail">
142
+ <a name="M000076"></a>
143
+
144
+ <div class="method-heading">
145
+ <a href="#M000076" class="method-signature">
146
+ <span class="method-name">section</span><span class="method-args">()</span>
147
+ </a>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+ <p><a class="source-toggle" href="#"
152
+ onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
153
+ <div class="method-source-code" id="M000076-source">
154
+ <pre>
155
+ <span class="ruby-comment cmt"># File app/models/link.rb, line 14</span>
156
+ 14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section</span>
157
+ 15: <span class="ruby-identifier">section_node</span> <span class="ruby-value">? </span><span class="ruby-identifier">section_node</span>.<span class="ruby-identifier">section</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
158
+ 16: <span class="ruby-keyword kw">end</span>
159
+ </pre>
160
+ </div>
161
+ </div>
162
+ </div>
163
+
164
+ <div id="method-M000078" class="method-detail">
165
+ <a name="M000078"></a>
166
+
167
+ <div class="method-heading">
168
+ <a href="#M000078" class="method-signature">
169
+ <span class="method-name">section=</span><span class="method-args">(sec)</span>
170
+ </a>
171
+ </div>
172
+
173
+ <div class="method-description">
174
+ <p><a class="source-toggle" href="#"
175
+ onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
176
+ <div class="method-source-code" id="M000078-source">
177
+ <pre>
178
+ <span class="ruby-comment cmt"># File app/models/link.rb, line 22</span>
179
+ 22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section=</span>(<span class="ruby-identifier">sec</span>)
180
+ 23: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">section_node</span>
181
+ 24: <span class="ruby-identifier">section_node</span>.<span class="ruby-identifier">move_to_end</span>(<span class="ruby-identifier">sec</span>)
182
+ 25: <span class="ruby-keyword kw">else</span>
183
+ 26: <span class="ruby-identifier">build_section_node</span>(<span class="ruby-identifier">:node</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:section</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">sec</span>)
184
+ 27: <span class="ruby-keyword kw">end</span>
185
+ 28: <span class="ruby-keyword kw">end</span>
186
+ </pre>
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+ <div id="method-M000075" class="method-detail">
192
+ <a name="M000075"></a>
193
+
194
+ <div class="method-heading">
195
+ <a href="#M000075" class="method-signature">
196
+ <span class="method-name">section_id</span><span class="method-args">()</span>
197
+ </a>
198
+ </div>
199
+
200
+ <div class="method-description">
201
+ <p><a class="source-toggle" href="#"
202
+ onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
203
+ <div class="method-source-code" id="M000075-source">
204
+ <pre>
205
+ <span class="ruby-comment cmt"># File app/models/link.rb, line 10</span>
206
+ 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section_id</span>
207
+ 11: <span class="ruby-identifier">section</span> <span class="ruby-value">? </span><span class="ruby-identifier">section</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
208
+ 12: <span class="ruby-keyword kw">end</span>
209
+ </pre>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ <div id="method-M000077" class="method-detail">
215
+ <a name="M000077"></a>
216
+
217
+ <div class="method-heading">
218
+ <a href="#M000077" class="method-signature">
219
+ <span class="method-name">section_id=</span><span class="method-args">(sec_id)</span>
220
+ </a>
221
+ </div>
222
+
223
+ <div class="method-description">
224
+ <p><a class="source-toggle" href="#"
225
+ onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
226
+ <div class="method-source-code" id="M000077-source">
227
+ <pre>
228
+ <span class="ruby-comment cmt"># File app/models/link.rb, line 18</span>
229
+ 18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section_id=</span>(<span class="ruby-identifier">sec_id</span>)
230
+ 19: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">section</span> = <span class="ruby-constant">Section</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">sec_id</span>)
231
+ 20: <span class="ruby-keyword kw">end</span>
232
+ </pre>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+
238
+ </div>
239
+
240
+
241
+ </div>
242
+
243
+
244
+ <div id="validator-badges">
245
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
246
+ </div>
247
+
248
+ </body>
249
+ </html>
@@ -0,0 +1,151 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: LoginPortlet</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">LoginPortlet</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/app/portlets/login_portlet_rb.html">
59
+ app/portlets/login_portlet.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="Portlet.html">
69
+ Portlet
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000182">render</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Instance methods</h3>
112
+
113
+ <div id="method-M000182" class="method-detail">
114
+ <a name="M000182"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="#M000182" class="method-signature">
118
+ <span class="method-name">render</span><span class="method-args">()</span>
119
+ </a>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+ <p><a class="source-toggle" href="#"
124
+ onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000182-source">
126
+ <pre>
127
+ <span class="ruby-comment cmt"># File app/portlets/login_portlet.rb, line 3</span>
128
+ 3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
129
+ 4: <span class="ruby-ivar">@success_url</span> = (<span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:success_url</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">success_url</span>)
130
+ 5: <span class="ruby-ivar">@failure_url</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">failure_url</span>
131
+ 6: <span class="ruby-ivar">@login</span> = <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:login</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:login</span>]
132
+ 7: <span class="ruby-ivar">@remember_me</span> = <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:remember_me</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:remember_me</span>]
133
+ 8: <span class="ruby-keyword kw">end</span>
134
+ </pre>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+
140
+ </div>
141
+
142
+
143
+ </div>
144
+
145
+
146
+ <div id="validator-badges">
147
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
148
+ </div>
149
+
150
+ </body>
151
+ </html>
@@ -0,0 +1,954 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Page</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Page</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/app/models/page_rb.html">
59
+ app/models/page.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ ActiveRecord::Base
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000090">after_build_new_version</a>&nbsp;&nbsp;
90
+ <a href="#M000091">after_publish</a>&nbsp;&nbsp;
91
+ <a href="#M000110">ancestors</a>&nbsp;&nbsp;
92
+ <a href="#M000105">append_leading_slash_to_path</a>&nbsp;&nbsp;
93
+ <a href="#M000118">assigned_to</a>&nbsp;&nbsp;
94
+ <a href="#M000119">assigned_to?</a>&nbsp;&nbsp;
95
+ <a href="#M000113">connectable_count_for_container</a>&nbsp;&nbsp;
96
+ <a href="#M000112">container_published?</a>&nbsp;&nbsp;
97
+ <a href="#M000092">copy_connectors</a>&nbsp;&nbsp;
98
+ <a href="#M000093">create_connector</a>&nbsp;&nbsp;
99
+ <a href="#M000117">current_task</a>&nbsp;&nbsp;
100
+ <a href="#M000096">delete_connectors</a>&nbsp;&nbsp;
101
+ <a href="#M000098">file_size</a>&nbsp;&nbsp;
102
+ <a href="#M000114">find_live_by_path</a>&nbsp;&nbsp;
103
+ <a href="#M000111">in_section?</a>&nbsp;&nbsp;
104
+ <a href="#M000107">layout</a>&nbsp;&nbsp;
105
+ <a href="#M000094">move_connector</a>&nbsp;&nbsp;
106
+ <a href="#M000115">name_with_section_path</a>&nbsp;&nbsp;
107
+ <a href="#M000104">page_title</a>&nbsp;&nbsp;
108
+ <a href="#M000106">path_not_reserved</a>&nbsp;&nbsp;
109
+ <a href="#M000103">public?</a>&nbsp;&nbsp;
110
+ <a href="#M000095">remove_connector</a>&nbsp;&nbsp;
111
+ <a href="#M000097">revert_to</a>&nbsp;&nbsp;
112
+ <a href="#M000100">section</a>&nbsp;&nbsp;
113
+ <a href="#M000102">section=</a>&nbsp;&nbsp;
114
+ <a href="#M000099">section_id</a>&nbsp;&nbsp;
115
+ <a href="#M000101">section_id=</a>&nbsp;&nbsp;
116
+ <a href="#M000108">template</a>&nbsp;&nbsp;
117
+ <a href="#M000109">template_name</a>&nbsp;&nbsp;
118
+ <a href="#M000116">top_level_section</a>&nbsp;&nbsp;
119
+ </div>
120
+ </div>
121
+
122
+ </div>
123
+
124
+
125
+ <!-- if includes -->
126
+
127
+ <div id="section">
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <!-- if method_list -->
137
+ <div id="methods">
138
+ <h3 class="section-bar">Public Class methods</h3>
139
+
140
+ <div id="method-M000114" class="method-detail">
141
+ <a name="M000114"></a>
142
+
143
+ <div class="method-heading">
144
+ <a href="#M000114" class="method-signature">
145
+ <span class="method-name">find_live_by_path</span><span class="method-args">(path)</span>
146
+ </a>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+ <p><a class="source-toggle" href="#"
151
+ onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
152
+ <div class="method-source-code" id="M000114-source">
153
+ <pre>
154
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 245</span>
155
+ 245: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find_live_by_path</span>(<span class="ruby-identifier">path</span>)
156
+ 246: <span class="ruby-identifier">published</span>.<span class="ruby-identifier">not_archived</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">path</span>})
157
+ 247: <span class="ruby-keyword kw">end</span>
158
+ </pre>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <h3 class="section-bar">Public Instance methods</h3>
164
+
165
+ <div id="method-M000090" class="method-detail">
166
+ <a name="M000090"></a>
167
+
168
+ <div class="method-heading">
169
+ <a href="#M000090" class="method-signature">
170
+ <span class="method-name">after_build_new_version</span><span class="method-args">(new_version)</span>
171
+ </a>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+ <p><a class="source-toggle" href="#"
176
+ onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
177
+ <div class="method-source-code" id="M000090-source">
178
+ <pre>
179
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 56</span>
180
+ 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after_build_new_version</span>(<span class="ruby-identifier">new_version</span>)
181
+ 57: <span class="ruby-identifier">copy_connectors</span>(
182
+ 58: <span class="ruby-identifier">:from_version_number</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@copy_connectors_from_version</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">new_version</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>),
183
+ 59: <span class="ruby-identifier">:to_version_number</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">new_version</span>.<span class="ruby-identifier">version</span>
184
+ 60: )
185
+ 61: <span class="ruby-ivar">@copy_connectors_from_version</span> = <span class="ruby-keyword kw">nil</span>
186
+ 62: <span class="ruby-keyword kw">true</span>
187
+ 63: <span class="ruby-keyword kw">end</span>
188
+ </pre>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ <div id="method-M000091" class="method-detail">
194
+ <a name="M000091"></a>
195
+
196
+ <div class="method-heading">
197
+ <a href="#M000091" class="method-signature">
198
+ <span class="method-name">after_publish</span><span class="method-args">()</span>
199
+ </a>
200
+ </div>
201
+
202
+ <div class="method-description">
203
+ <p>
204
+ Publish all
205
+ </p>
206
+ <p><a class="source-toggle" href="#"
207
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
208
+ <div class="method-source-code" id="M000091-source">
209
+ <pre>
210
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 66</span>
211
+ 66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after_publish</span>
212
+ 67: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">reload</span> <span class="ruby-comment cmt"># Get's the correct version number loaded</span>
213
+ 68: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span>).<span class="ruby-identifier">all</span>(<span class="ruby-identifier">:order</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;position&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
214
+ 69: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable_type</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">publishable?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">con</span> = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable</span>
215
+ 70: <span class="ruby-identifier">con</span>.<span class="ruby-identifier">publish</span>
216
+ 71: <span class="ruby-keyword kw">end</span>
217
+ 72: <span class="ruby-keyword kw">end</span>
218
+ 73: <span class="ruby-keyword kw">end</span>
219
+ </pre>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <div id="method-M000110" class="method-detail">
225
+ <a name="M000110"></a>
226
+
227
+ <div class="method-heading">
228
+ <a href="#M000110" class="method-signature">
229
+ <span class="method-name">ancestors</span><span class="method-args">()</span>
230
+ </a>
231
+ </div>
232
+
233
+ <div class="method-description">
234
+ <p><a class="source-toggle" href="#"
235
+ onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
236
+ <div class="method-source-code" id="M000110-source">
237
+ <pre>
238
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 221</span>
239
+ 221: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ancestors</span>
240
+ 222: <span class="ruby-identifier">section_node</span>.<span class="ruby-identifier">ancestors</span>
241
+ 223: <span class="ruby-keyword kw">end</span>
242
+ </pre>
243
+ </div>
244
+ </div>
245
+ </div>
246
+
247
+ <div id="method-M000105" class="method-detail">
248
+ <a name="M000105"></a>
249
+
250
+ <div class="method-heading">
251
+ <a href="#M000105" class="method-signature">
252
+ <span class="method-name">append_leading_slash_to_path</span><span class="method-args">()</span>
253
+ </a>
254
+ </div>
255
+
256
+ <div class="method-description">
257
+ <p><a class="source-toggle" href="#"
258
+ onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
259
+ <div class="method-source-code" id="M000105-source">
260
+ <pre>
261
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 194</span>
262
+ 194: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">append_leading_slash_to_path</span>
263
+ 195: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">blank?</span>
264
+ 196: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path</span> = <span class="ruby-value str">&quot;/&quot;</span>
265
+ 197: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">path</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;/&quot;</span>
266
+ 198: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path</span> = <span class="ruby-node">&quot;/#{path}&quot;</span>
267
+ 199: <span class="ruby-keyword kw">end</span>
268
+ 200: <span class="ruby-keyword kw">end</span>
269
+ </pre>
270
+ </div>
271
+ </div>
272
+ </div>
273
+
274
+ <div id="method-M000118" class="method-detail">
275
+ <a name="M000118"></a>
276
+
277
+ <div class="method-heading">
278
+ <a href="#M000118" class="method-signature">
279
+ <span class="method-name">assigned_to</span><span class="method-args">()</span>
280
+ </a>
281
+ </div>
282
+
283
+ <div class="method-description">
284
+ <p><a class="source-toggle" href="#"
285
+ onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
286
+ <div class="method-source-code" id="M000118-source">
287
+ <pre>
288
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 266</span>
289
+ 266: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assigned_to</span>
290
+ 267: <span class="ruby-identifier">current_task</span> <span class="ruby-value">? </span><span class="ruby-identifier">current_task</span>.<span class="ruby-identifier">assigned_to</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
291
+ 268: <span class="ruby-keyword kw">end</span>
292
+ </pre>
293
+ </div>
294
+ </div>
295
+ </div>
296
+
297
+ <div id="method-M000119" class="method-detail">
298
+ <a name="M000119"></a>
299
+
300
+ <div class="method-heading">
301
+ <a href="#M000119" class="method-signature">
302
+ <span class="method-name">assigned_to?</span><span class="method-args">(user)</span>
303
+ </a>
304
+ </div>
305
+
306
+ <div class="method-description">
307
+ <p><a class="source-toggle" href="#"
308
+ onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
309
+ <div class="method-source-code" id="M000119-source">
310
+ <pre>
311
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 270</span>
312
+ 270: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assigned_to?</span>(<span class="ruby-identifier">user</span>)
313
+ 271: <span class="ruby-identifier">assigned_to</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">user</span>
314
+ 272: <span class="ruby-keyword kw">end</span>
315
+ </pre>
316
+ </div>
317
+ </div>
318
+ </div>
319
+
320
+ <div id="method-M000113" class="method-detail">
321
+ <a name="M000113"></a>
322
+
323
+ <div class="method-heading">
324
+ <a href="#M000113" class="method-signature">
325
+ <span class="method-name">connectable_count_for_container</span><span class="method-args">(container)</span>
326
+ </a>
327
+ </div>
328
+
329
+ <div class="method-description">
330
+ <p>
331
+ Returns the number of connectables in the given container for this version
332
+ of this page
333
+ </p>
334
+ <p><a class="source-toggle" href="#"
335
+ onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
336
+ <div class="method-source-code" id="M000113-source">
337
+ <pre>
338
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 241</span>
339
+ 241: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connectable_count_for_container</span>(<span class="ruby-identifier">container</span>)
340
+ 242: <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-identifier">version</span>).<span class="ruby-identifier">in_container</span>(<span class="ruby-identifier">container</span>.<span class="ruby-identifier">to_s</span>).<span class="ruby-identifier">count</span>
341
+ 243: <span class="ruby-keyword kw">end</span>
342
+ </pre>
343
+ </div>
344
+ </div>
345
+ </div>
346
+
347
+ <div id="method-M000112" class="method-detail">
348
+ <a name="M000112"></a>
349
+
350
+ <div class="method-heading">
351
+ <a href="#M000112" class="method-signature">
352
+ <span class="method-name">container_published?</span><span class="method-args">(container)</span>
353
+ </a>
354
+ </div>
355
+
356
+ <div class="method-description">
357
+ <p>
358
+ Returns true if the block attached to each connector in the given container
359
+ are published
360
+ </p>
361
+ <p><a class="source-toggle" href="#"
362
+ onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
363
+ <div class="method-source-code" id="M000112-source">
364
+ <pre>
365
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 234</span>
366
+ 234: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">container_published?</span>(<span class="ruby-identifier">container</span>)
367
+ 235: <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-identifier">draft</span>.<span class="ruby-identifier">version</span>).<span class="ruby-identifier">in_container</span>(<span class="ruby-identifier">container</span>.<span class="ruby-identifier">to_s</span>).<span class="ruby-identifier">all?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
368
+ 236: <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable_type</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">publishable?</span> <span class="ruby-value">? </span><span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">live?</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">true</span>
369
+ 237: <span class="ruby-keyword kw">end</span>
370
+ 238: <span class="ruby-keyword kw">end</span>
371
+ </pre>
372
+ </div>
373
+ </div>
374
+ </div>
375
+
376
+ <div id="method-M000092" class="method-detail">
377
+ <a name="M000092"></a>
378
+
379
+ <div class="method-heading">
380
+ <a href="#M000092" class="method-signature">
381
+ <span class="method-name">copy_connectors</span><span class="method-args">(options={})</span>
382
+ </a>
383
+ </div>
384
+
385
+ <div class="method-description">
386
+ <p><a class="source-toggle" href="#"
387
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
388
+ <div class="method-source-code" id="M000092-source">
389
+ <pre>
390
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 75</span>
391
+ 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">copy_connectors</span>(<span class="ruby-identifier">options</span>={})
392
+ 76: <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:from_version_number</span>]).<span class="ruby-identifier">all</span>(<span class="ruby-identifier">:order</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;connectors.container, connectors.position&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
393
+ 77: <span class="ruby-comment cmt"># The connector won't have a connectable if it has been deleted</span>
394
+ 78: <span class="ruby-comment cmt"># Also need to see if the draft has been deleted,</span>
395
+ 79: <span class="ruby-comment cmt"># in which case we are in the process of deleting it</span>
396
+ 80: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">should_be_copied?</span>
397
+ 81: <span class="ruby-identifier">connectable</span> = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable_type</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">versioned?</span> <span class="ruby-value">? </span><span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">as_of_version</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable_version</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable</span>
398
+ 82:
399
+ 83: <span class="ruby-comment cmt">#If we are copying connectors from a previous version, that means we are reverting this page,</span>
400
+ 84: <span class="ruby-comment cmt">#in which case we should create a new version of the block, and connect this page to that block</span>
401
+ 85: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@copy_connectors_from_version</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">versioned?</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">draft</span>.<span class="ruby-identifier">version</span>)
402
+ 86: <span class="ruby-identifier">connectable</span> = <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">id</span>)
403
+ 87: <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">updated_by_page</span> = <span class="ruby-keyword kw">self</span>
404
+ 88: <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">revert_to</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">connectable_version</span>)
405
+ 89: <span class="ruby-keyword kw">end</span>
406
+ 90:
407
+ 91: <span class="ruby-identifier">new_connector</span> = <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">build</span>(
408
+ 92: <span class="ruby-identifier">:page_version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:to_version_number</span>],
409
+ 93: <span class="ruby-identifier">:connectable</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">connectable</span>,
410
+ 94: <span class="ruby-identifier">:connectable_version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">versioned?</span> <span class="ruby-value">? </span><span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>,
411
+ 95: <span class="ruby-identifier">:container</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">container</span>,
412
+ 96: <span class="ruby-identifier">:position</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">position</span>
413
+ 97: )
414
+ 98: <span class="ruby-keyword kw">end</span>
415
+ 99: <span class="ruby-keyword kw">end</span>
416
+ 100: <span class="ruby-keyword kw">true</span>
417
+ 101: <span class="ruby-keyword kw">end</span>
418
+ </pre>
419
+ </div>
420
+ </div>
421
+ </div>
422
+
423
+ <div id="method-M000093" class="method-detail">
424
+ <a name="M000093"></a>
425
+
426
+ <div class="method-heading">
427
+ <a href="#M000093" class="method-signature">
428
+ <span class="method-name">create_connector</span><span class="method-args">(connectable, container)</span>
429
+ </a>
430
+ </div>
431
+
432
+ <div class="method-description">
433
+ <p><a class="source-toggle" href="#"
434
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
435
+ <div class="method-source-code" id="M000093-source">
436
+ <pre>
437
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 103</span>
438
+ 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_connector</span>(<span class="ruby-identifier">connectable</span>, <span class="ruby-identifier">container</span>)
439
+ 104: <span class="ruby-identifier">transaction</span> <span class="ruby-keyword kw">do</span>
440
+ 105: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Connectable is nil&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">connectable</span>
441
+ 106: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Container is required&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">container</span>.<span class="ruby-identifier">blank?</span>
442
+ 107: <span class="ruby-identifier">update_attributes</span>(
443
+ 108: <span class="ruby-identifier">:version_comment</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{connectable} was added to the '#{container}' container&quot;</span>,
444
+ 109: <span class="ruby-identifier">:publish_on_save</span> =<span class="ruby-operator">&gt;</span> (
445
+ 110: <span class="ruby-identifier">published?</span> <span class="ruby-operator">&amp;&amp;</span>
446
+ 111: <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">connected_page</span> <span class="ruby-operator">&amp;&amp;</span>
447
+ 112: (<span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">publishable?</span> <span class="ruby-value">? </span><span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">published?</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">true</span>)))
448
+ 113: <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">create</span>(
449
+ 114: <span class="ruby-identifier">:page_version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">draft</span>.<span class="ruby-identifier">version</span>,
450
+ 115: <span class="ruby-identifier">:connectable</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">connectable</span>,
451
+ 116: <span class="ruby-identifier">:connectable_version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">versioned?</span> <span class="ruby-value">? </span><span class="ruby-identifier">connectable</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>,
452
+ 117: <span class="ruby-identifier">:container</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">container</span>)
453
+ 118: <span class="ruby-keyword kw">end</span>
454
+ 119: <span class="ruby-keyword kw">end</span>
455
+ </pre>
456
+ </div>
457
+ </div>
458
+ </div>
459
+
460
+ <div id="method-M000117" class="method-detail">
461
+ <a name="M000117"></a>
462
+
463
+ <div class="method-heading">
464
+ <a href="#M000117" class="method-signature">
465
+ <span class="method-name">current_task</span><span class="method-args">()</span>
466
+ </a>
467
+ </div>
468
+
469
+ <div class="method-description">
470
+ <p><a class="source-toggle" href="#"
471
+ onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
472
+ <div class="method-source-code" id="M000117-source">
473
+ <pre>
474
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 262</span>
475
+ 262: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_task</span>
476
+ 263: <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">incomplete</span>.<span class="ruby-identifier">first</span>
477
+ 264: <span class="ruby-keyword kw">end</span>
478
+ </pre>
479
+ </div>
480
+ </div>
481
+ </div>
482
+
483
+ <div id="method-M000096" class="method-detail">
484
+ <a name="M000096"></a>
485
+
486
+ <div class="method-heading">
487
+ <a href="#M000096" class="method-signature">
488
+ <span class="method-name">delete_connectors</span><span class="method-args">()</span>
489
+ </a>
490
+ </div>
491
+
492
+ <div class="method-description">
493
+ <p><a class="source-toggle" href="#"
494
+ onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
495
+ <div class="method-source-code" id="M000096-source">
496
+ <pre>
497
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 151</span>
498
+ 151: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_connectors</span>
499
+ 152: <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-identifier">version</span>).<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">destroy</span> }
500
+ 153: <span class="ruby-keyword kw">end</span>
501
+ </pre>
502
+ </div>
503
+ </div>
504
+ </div>
505
+
506
+ <div id="method-M000098" class="method-detail">
507
+ <a name="M000098"></a>
508
+
509
+ <div class="method-heading">
510
+ <a href="#M000098" class="method-signature">
511
+ <span class="method-name">file_size</span><span class="method-args">()</span>
512
+ </a>
513
+ </div>
514
+
515
+ <div class="method-description">
516
+ <p><a class="source-toggle" href="#"
517
+ onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
518
+ <div class="method-source-code" id="M000098-source">
519
+ <pre>
520
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 162</span>
521
+ 162: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_size</span>
522
+ 163: <span class="ruby-value str">&quot;?&quot;</span>
523
+ 164: <span class="ruby-keyword kw">end</span>
524
+ </pre>
525
+ </div>
526
+ </div>
527
+ </div>
528
+
529
+ <div id="method-M000111" class="method-detail">
530
+ <a name="M000111"></a>
531
+
532
+ <div class="method-heading">
533
+ <a href="#M000111" class="method-signature">
534
+ <span class="method-name">in_section?</span><span class="method-args">(section_or_section_name)</span>
535
+ </a>
536
+ </div>
537
+
538
+ <div class="method-description">
539
+ <p><a class="source-toggle" href="#"
540
+ onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
541
+ <div class="method-source-code" id="M000111-source">
542
+ <pre>
543
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 225</span>
544
+ 225: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_section?</span>(<span class="ruby-identifier">section_or_section_name</span>)
545
+ 226: <span class="ruby-identifier">sec</span> = <span class="ruby-identifier">section_or_section_name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>) <span class="ruby-operator">?</span>
546
+ 227: <span class="ruby-constant">Section</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">section_or_section_name</span>}) <span class="ruby-operator">:</span>
547
+ 228: <span class="ruby-identifier">section_or_section_name</span>
548
+ 229: <span class="ruby-identifier">fn</span> = <span class="ruby-identifier">lambda</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-value">? </span>(<span class="ruby-identifier">s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">sec</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">fn</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">parent</span>)) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>}
549
+ 230: <span class="ruby-identifier">fn</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">section</span>)
550
+ 231: <span class="ruby-keyword kw">end</span>
551
+ </pre>
552
+ </div>
553
+ </div>
554
+ </div>
555
+
556
+ <div id="method-M000107" class="method-detail">
557
+ <a name="M000107"></a>
558
+
559
+ <div class="method-heading">
560
+ <a href="#M000107" class="method-signature">
561
+ <span class="method-name">layout</span><span class="method-args">()</span>
562
+ </a>
563
+ </div>
564
+
565
+ <div class="method-description">
566
+ <p><a class="source-toggle" href="#"
567
+ onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
568
+ <div class="method-source-code" id="M000107-source">
569
+ <pre>
570
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 208</span>
571
+ 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">layout</span>
572
+ 209: <span class="ruby-identifier">template_file_name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-node">&quot;templates/#{template_file_name.split('.').first}&quot;</span>
573
+ 210: <span class="ruby-keyword kw">end</span>
574
+ </pre>
575
+ </div>
576
+ </div>
577
+ </div>
578
+
579
+ <div id="method-M000094" class="method-detail">
580
+ <a name="M000094"></a>
581
+
582
+ <div class="method-heading">
583
+ <a href="#M000094" class="method-signature">
584
+ <span class="method-name">move_connector</span><span class="method-args">(connector, direction)</span>
585
+ </a>
586
+ </div>
587
+
588
+ <div class="method-description">
589
+ <p><a class="source-toggle" href="#"
590
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
591
+ <div class="method-source-code" id="M000094-source">
592
+ <pre>
593
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 121</span>
594
+ 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_connector</span>(<span class="ruby-identifier">connector</span>, <span class="ruby-identifier">direction</span>)
595
+ 122: <span class="ruby-identifier">transaction</span> <span class="ruby-keyword kw">do</span>
596
+ 123: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Connector is nil&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">connector</span>
597
+ 124: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Direction is nil&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">direction</span>
598
+ 125: <span class="ruby-identifier">orientation</span> = <span class="ruby-identifier">direction</span>[<span class="ruby-regexp re">/_/</span>] <span class="ruby-operator">?</span> <span class="ruby-node">&quot;#{direction.sub('_', ' the ')} of&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;#{direction} within&quot;</span>
599
+ 126: <span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">:version_comment</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{connector.connectable} was moved #{orientation} the '#{connector.container}' container&quot;</span>)
600
+ 127: <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-identifier">draft</span>.<span class="ruby-identifier">version</span>).<span class="ruby-identifier">like</span>(<span class="ruby-identifier">connector</span>).<span class="ruby-identifier">first</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;move_#{direction}&quot;</span>)
601
+ 128: <span class="ruby-keyword kw">end</span>
602
+ 129: <span class="ruby-keyword kw">end</span>
603
+ </pre>
604
+ </div>
605
+ </div>
606
+ </div>
607
+
608
+ <div id="method-M000115" class="method-detail">
609
+ <a name="M000115"></a>
610
+
611
+ <div class="method-heading">
612
+ <a href="#M000115" class="method-signature">
613
+ <span class="method-name">name_with_section_path</span><span class="method-args">()</span>
614
+ </a>
615
+ </div>
616
+
617
+ <div class="method-description">
618
+ <p><a class="source-toggle" href="#"
619
+ onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
620
+ <div class="method-source-code" id="M000115-source">
621
+ <pre>
622
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 249</span>
623
+ 249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name_with_section_path</span>
624
+ 250: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">ancestors</span>
625
+ 251: (<span class="ruby-identifier">a</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">name</span>} <span class="ruby-operator">+</span> [<span class="ruby-identifier">name</span>]).<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; / &quot;</span>)
626
+ 252: <span class="ruby-keyword kw">end</span>
627
+ </pre>
628
+ </div>
629
+ </div>
630
+ </div>
631
+
632
+ <div id="method-M000104" class="method-detail">
633
+ <a name="M000104"></a>
634
+
635
+ <div class="method-heading">
636
+ <a href="#M000104" class="method-signature">
637
+ <span class="method-name">page_title</span><span class="method-args">()</span>
638
+ </a>
639
+ </div>
640
+
641
+ <div class="method-description">
642
+ <p><a class="source-toggle" href="#"
643
+ onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
644
+ <div class="method-source-code" id="M000104-source">
645
+ <pre>
646
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 190</span>
647
+ 190: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">page_title</span>
648
+ 191: <span class="ruby-identifier">title</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">? </span><span class="ruby-identifier">name</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">title</span>
649
+ 192: <span class="ruby-keyword kw">end</span>
650
+ </pre>
651
+ </div>
652
+ </div>
653
+ </div>
654
+
655
+ <div id="method-M000106" class="method-detail">
656
+ <a name="M000106"></a>
657
+
658
+ <div class="method-heading">
659
+ <a href="#M000106" class="method-signature">
660
+ <span class="method-name">path_not_reserved</span><span class="method-args">()</span>
661
+ </a>
662
+ </div>
663
+
664
+ <div class="method-description">
665
+ <p><a class="source-toggle" href="#"
666
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
667
+ <div class="method-source-code" id="M000106-source">
668
+ <pre>
669
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 202</span>
670
+ 202: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_not_reserved</span>
671
+ 203: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Cms</span>.<span class="ruby-identifier">reserved_paths</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>)
672
+ 204: <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">:path</span>, <span class="ruby-node">&quot;is invalid, '#{path}' a reserved path&quot;</span>)
673
+ 205: <span class="ruby-keyword kw">end</span>
674
+ 206: <span class="ruby-keyword kw">end</span>
675
+ </pre>
676
+ </div>
677
+ </div>
678
+ </div>
679
+
680
+ <div id="method-M000103" class="method-detail">
681
+ <a name="M000103"></a>
682
+
683
+ <div class="method-heading">
684
+ <a href="#M000103" class="method-signature">
685
+ <span class="method-name">public?</span><span class="method-args">()</span>
686
+ </a>
687
+ </div>
688
+
689
+ <div class="method-description">
690
+ <p><a class="source-toggle" href="#"
691
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
692
+ <div class="method-source-code" id="M000103-source">
693
+ <pre>
694
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 186</span>
695
+ 186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">public?</span>
696
+ 187: <span class="ruby-identifier">section</span> <span class="ruby-value">? </span><span class="ruby-identifier">section</span>.<span class="ruby-identifier">public?</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
697
+ 188: <span class="ruby-keyword kw">end</span>
698
+ </pre>
699
+ </div>
700
+ </div>
701
+ </div>
702
+
703
+ <div id="method-M000095" class="method-detail">
704
+ <a name="M000095"></a>
705
+
706
+ <div class="method-heading">
707
+ <a href="#M000095" class="method-signature">
708
+ <span class="method-name">remove_connector</span><span class="method-args">(connector)</span>
709
+ </a>
710
+ </div>
711
+
712
+ <div class="method-description">
713
+ <p><a class="source-toggle" href="#"
714
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
715
+ <div class="method-source-code" id="M000095-source">
716
+ <pre>
717
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 137</span>
718
+ 137: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_connector</span>(<span class="ruby-identifier">connector</span>)
719
+ 138: <span class="ruby-identifier">transaction</span> <span class="ruby-keyword kw">do</span>
720
+ 139: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Connector is nil&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">connector</span>
721
+ 140: <span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">:version_comment</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{connector.connectable} was removed from the '#{connector.container}' container&quot;</span>)
722
+ 141:
723
+ 142: <span class="ruby-comment cmt">#The logic of this is to go ahead and let the container get copied forward, then delete the new connector</span>
724
+ 143: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_connector</span> = <span class="ruby-identifier">connectors</span>.<span class="ruby-identifier">for_page_version</span>(<span class="ruby-identifier">draft</span>.<span class="ruby-identifier">version</span>).<span class="ruby-identifier">like</span>(<span class="ruby-identifier">connector</span>).<span class="ruby-identifier">first</span>
725
+ 144: <span class="ruby-identifier">new_connector</span>.<span class="ruby-identifier">destroy</span>
726
+ 145: <span class="ruby-keyword kw">else</span>
727
+ 146: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Error occurred while trying to remove connector #{connector.id}&quot;</span>
728
+ 147: <span class="ruby-keyword kw">end</span>
729
+ 148: <span class="ruby-keyword kw">end</span>
730
+ 149: <span class="ruby-keyword kw">end</span>
731
+ </pre>
732
+ </div>
733
+ </div>
734
+ </div>
735
+
736
+ <div id="method-M000097" class="method-detail">
737
+ <a name="M000097"></a>
738
+
739
+ <div class="method-heading">
740
+ <a href="#M000097" class="method-signature">
741
+ <span class="method-name">revert_to</span><span class="method-args">(version)</span>
742
+ </a>
743
+ </div>
744
+
745
+ <div class="method-description">
746
+ <p>
747
+ This is done to let <a href="Page.html#M000092">copy_connectors</a> know
748
+ which version to pull from <a href="Page.html#M000092">copy_connectors</a>
749
+ will get called later as an after_update callback
750
+ </p>
751
+ <p><a class="source-toggle" href="#"
752
+ onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
753
+ <div class="method-source-code" id="M000097-source">
754
+ <pre>
755
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 157</span>
756
+ 157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revert_to</span>(<span class="ruby-identifier">version</span>)
757
+ 158: <span class="ruby-ivar">@copy_connectors_from_version</span> = <span class="ruby-identifier">version</span>
758
+ 159: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">version</span>)
759
+ 160: <span class="ruby-keyword kw">end</span>
760
+ </pre>
761
+ </div>
762
+ </div>
763
+ </div>
764
+
765
+ <div id="method-M000100" class="method-detail">
766
+ <a name="M000100"></a>
767
+
768
+ <div class="method-heading">
769
+ <a href="#M000100" class="method-signature">
770
+ <span class="method-name">section</span><span class="method-args">()</span>
771
+ </a>
772
+ </div>
773
+
774
+ <div class="method-description">
775
+ <p><a class="source-toggle" href="#"
776
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
777
+ <div class="method-source-code" id="M000100-source">
778
+ <pre>
779
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 170</span>
780
+ 170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section</span>
781
+ 171: <span class="ruby-identifier">section_node</span> <span class="ruby-value">? </span><span class="ruby-identifier">section_node</span>.<span class="ruby-identifier">section</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
782
+ 172: <span class="ruby-keyword kw">end</span>
783
+ </pre>
784
+ </div>
785
+ </div>
786
+ </div>
787
+
788
+ <div id="method-M000102" class="method-detail">
789
+ <a name="M000102"></a>
790
+
791
+ <div class="method-heading">
792
+ <a href="#M000102" class="method-signature">
793
+ <span class="method-name">section=</span><span class="method-args">(sec)</span>
794
+ </a>
795
+ </div>
796
+
797
+ <div class="method-description">
798
+ <p><a class="source-toggle" href="#"
799
+ onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
800
+ <div class="method-source-code" id="M000102-source">
801
+ <pre>
802
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 178</span>
803
+ 178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section=</span>(<span class="ruby-identifier">sec</span>)
804
+ 179: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">section_node</span>
805
+ 180: <span class="ruby-identifier">section_node</span>.<span class="ruby-identifier">move_to_end</span>(<span class="ruby-identifier">sec</span>)
806
+ 181: <span class="ruby-keyword kw">else</span>
807
+ 182: <span class="ruby-identifier">build_section_node</span>(<span class="ruby-identifier">:node</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:section</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">sec</span>)
808
+ 183: <span class="ruby-keyword kw">end</span>
809
+ 184: <span class="ruby-keyword kw">end</span>
810
+ </pre>
811
+ </div>
812
+ </div>
813
+ </div>
814
+
815
+ <div id="method-M000099" class="method-detail">
816
+ <a name="M000099"></a>
817
+
818
+ <div class="method-heading">
819
+ <a href="#M000099" class="method-signature">
820
+ <span class="method-name">section_id</span><span class="method-args">()</span>
821
+ </a>
822
+ </div>
823
+
824
+ <div class="method-description">
825
+ <p><a class="source-toggle" href="#"
826
+ onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
827
+ <div class="method-source-code" id="M000099-source">
828
+ <pre>
829
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 166</span>
830
+ 166: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section_id</span>
831
+ 167: <span class="ruby-identifier">section</span> <span class="ruby-value">? </span><span class="ruby-identifier">section</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
832
+ 168: <span class="ruby-keyword kw">end</span>
833
+ </pre>
834
+ </div>
835
+ </div>
836
+ </div>
837
+
838
+ <div id="method-M000101" class="method-detail">
839
+ <a name="M000101"></a>
840
+
841
+ <div class="method-heading">
842
+ <a href="#M000101" class="method-signature">
843
+ <span class="method-name">section_id=</span><span class="method-args">(sec_id)</span>
844
+ </a>
845
+ </div>
846
+
847
+ <div class="method-description">
848
+ <p><a class="source-toggle" href="#"
849
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
850
+ <div class="method-source-code" id="M000101-source">
851
+ <pre>
852
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 174</span>
853
+ 174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section_id=</span>(<span class="ruby-identifier">sec_id</span>)
854
+ 175: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">section</span> = <span class="ruby-constant">Section</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">sec_id</span>)
855
+ 176: <span class="ruby-keyword kw">end</span>
856
+ </pre>
857
+ </div>
858
+ </div>
859
+ </div>
860
+
861
+ <div id="method-M000108" class="method-detail">
862
+ <a name="M000108"></a>
863
+
864
+ <div class="method-heading">
865
+ <a href="#M000108" class="method-signature">
866
+ <span class="method-name">template</span><span class="method-args">()</span>
867
+ </a>
868
+ </div>
869
+
870
+ <div class="method-description">
871
+ <p>
872
+ This will be nil if it is a file system based <a
873
+ href="Page.html#M000108">template</a>
874
+ </p>
875
+ <p><a class="source-toggle" href="#"
876
+ onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
877
+ <div class="method-source-code" id="M000108-source">
878
+ <pre>
879
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 213</span>
880
+ 213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template</span>
881
+ 214: <span class="ruby-constant">PageTemplate</span>.<span class="ruby-identifier">find_by_file_name</span>(<span class="ruby-identifier">template_file_name</span>)
882
+ 215: <span class="ruby-keyword kw">end</span>
883
+ </pre>
884
+ </div>
885
+ </div>
886
+ </div>
887
+
888
+ <div id="method-M000109" class="method-detail">
889
+ <a name="M000109"></a>
890
+
891
+ <div class="method-heading">
892
+ <a href="#M000109" class="method-signature">
893
+ <span class="method-name">template_name</span><span class="method-args">()</span>
894
+ </a>
895
+ </div>
896
+
897
+ <div class="method-description">
898
+ <p><a class="source-toggle" href="#"
899
+ onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
900
+ <div class="method-source-code" id="M000109-source">
901
+ <pre>
902
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 217</span>
903
+ 217: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_name</span>
904
+ 218: <span class="ruby-identifier">template_file_name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">PageTemplate</span>.<span class="ruby-identifier">display_name</span>(<span class="ruby-identifier">template_file_name</span>)
905
+ 219: <span class="ruby-keyword kw">end</span>
906
+ </pre>
907
+ </div>
908
+ </div>
909
+ </div>
910
+
911
+ <div id="method-M000116" class="method-detail">
912
+ <a name="M000116"></a>
913
+
914
+ <div class="method-heading">
915
+ <a href="#M000116" class="method-signature">
916
+ <span class="method-name">top_level_section</span><span class="method-args">()</span>
917
+ </a>
918
+ </div>
919
+
920
+ <div class="method-description">
921
+ <p>
922
+ This will return the &quot;top level <a
923
+ href="Page.html#M000100">section</a>&quot; for a page, which is the <a
924
+ href="Page.html#M000100">section</a> directly below the root (a.k.a My <a
925
+ href="Site.html">Site</a>) that this page is in. If this page is in root,
926
+ then this will return root.
927
+ </p>
928
+ <p><a class="source-toggle" href="#"
929
+ onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
930
+ <div class="method-source-code" id="M000116-source">
931
+ <pre>
932
+ <span class="ruby-comment cmt"># File app/models/page.rb, line 257</span>
933
+ 257: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">top_level_section</span>
934
+ 258: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">ancestors</span>
935
+ 259: (<span class="ruby-identifier">a</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ancestors</span>[<span class="ruby-value">1</span>]) <span class="ruby-operator">?</span> <span class="ruby-identifier">ancestors</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">:</span> <span class="ruby-constant">Section</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">first</span>
936
+ 260: <span class="ruby-keyword kw">end</span>
937
+ </pre>
938
+ </div>
939
+ </div>
940
+ </div>
941
+
942
+
943
+ </div>
944
+
945
+
946
+ </div>
947
+
948
+
949
+ <div id="validator-badges">
950
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
951
+ </div>
952
+
953
+ </body>
954
+ </html>