activa 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (440) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +30 -0
  4. data/app/assets/images/activa/icons/glyphicons_000_glass.png +0 -0
  5. data/app/assets/images/activa/icons/glyphicons_001_leaf.png +0 -0
  6. data/app/assets/images/activa/icons/glyphicons_002_dog.png +0 -0
  7. data/app/assets/images/activa/icons/glyphicons_003_user.png +0 -0
  8. data/app/assets/images/activa/icons/glyphicons_004_girl.png +0 -0
  9. data/app/assets/images/activa/icons/glyphicons_005_car.png +0 -0
  10. data/app/assets/images/activa/icons/glyphicons_006_user_add.png +0 -0
  11. data/app/assets/images/activa/icons/glyphicons_007_user_remove.png +0 -0
  12. data/app/assets/images/activa/icons/glyphicons_008_film.png +0 -0
  13. data/app/assets/images/activa/icons/glyphicons_009_magic.png +0 -0
  14. data/app/assets/images/activa/icons/glyphicons_010_envelope.png +0 -0
  15. data/app/assets/images/activa/icons/glyphicons_011_camera.png +0 -0
  16. data/app/assets/images/activa/icons/glyphicons_012_heart.png +0 -0
  17. data/app/assets/images/activa/icons/glyphicons_013_beach_umbrella.png +0 -0
  18. data/app/assets/images/activa/icons/glyphicons_014_train.png +0 -0
  19. data/app/assets/images/activa/icons/glyphicons_015_print.png +0 -0
  20. data/app/assets/images/activa/icons/glyphicons_016_bin.png +0 -0
  21. data/app/assets/images/activa/icons/glyphicons_017_music.png +0 -0
  22. data/app/assets/images/activa/icons/glyphicons_018_note.png +0 -0
  23. data/app/assets/images/activa/icons/glyphicons_019_cogwheel.png +0 -0
  24. data/app/assets/images/activa/icons/glyphicons_020_home.png +0 -0
  25. data/app/assets/images/activa/icons/glyphicons_021_snowflake.png +0 -0
  26. data/app/assets/images/activa/icons/glyphicons_022_fire.png +0 -0
  27. data/app/assets/images/activa/icons/glyphicons_023_cogwheels.png +0 -0
  28. data/app/assets/images/activa/icons/glyphicons_024_parents.png +0 -0
  29. data/app/assets/images/activa/icons/glyphicons_025_binoculars.png +0 -0
  30. data/app/assets/images/activa/icons/glyphicons_026_road.png +0 -0
  31. data/app/assets/images/activa/icons/glyphicons_027_search.png +0 -0
  32. data/app/assets/images/activa/icons/glyphicons_028_cars.png +0 -0
  33. data/app/assets/images/activa/icons/glyphicons_029_notes_2.png +0 -0
  34. data/app/assets/images/activa/icons/glyphicons_030_pencil.png +0 -0
  35. data/app/assets/images/activa/icons/glyphicons_031_bus.png +0 -0
  36. data/app/assets/images/activa/icons/glyphicons_032_wifi_alt.png +0 -0
  37. data/app/assets/images/activa/icons/glyphicons_033_luggage.png +0 -0
  38. data/app/assets/images/activa/icons/glyphicons_034_old_man.png +0 -0
  39. data/app/assets/images/activa/icons/glyphicons_035_woman.png +0 -0
  40. data/app/assets/images/activa/icons/glyphicons_036_file.png +0 -0
  41. data/app/assets/images/activa/icons/glyphicons_037_credit.png +0 -0
  42. data/app/assets/images/activa/icons/glyphicons_038_airplane.png +0 -0
  43. data/app/assets/images/activa/icons/glyphicons_039_notes.png +0 -0
  44. data/app/assets/images/activa/icons/glyphicons_040_stats.png +0 -0
  45. data/app/assets/images/activa/icons/glyphicons_041_charts.png +0 -0
  46. data/app/assets/images/activa/icons/glyphicons_042_pie_chart.png +0 -0
  47. data/app/assets/images/activa/icons/glyphicons_043_group.png +0 -0
  48. data/app/assets/images/activa/icons/glyphicons_044_keys.png +0 -0
  49. data/app/assets/images/activa/icons/glyphicons_045_calendar.png +0 -0
  50. data/app/assets/images/activa/icons/glyphicons_046_router.png +0 -0
  51. data/app/assets/images/activa/icons/glyphicons_047_camera_small.png +0 -0
  52. data/app/assets/images/activa/icons/glyphicons_048_dislikes.png +0 -0
  53. data/app/assets/images/activa/icons/glyphicons_049_star.png +0 -0
  54. data/app/assets/images/activa/icons/glyphicons_051_eye_open.png +0 -0
  55. data/app/assets/images/activa/icons/glyphicons_052_eye_close.png +0 -0
  56. data/app/assets/images/activa/icons/glyphicons_053_alarm.png +0 -0
  57. data/app/assets/images/activa/icons/glyphicons_054_clock.png +0 -0
  58. data/app/assets/images/activa/icons/glyphicons_055_stopwatch.png +0 -0
  59. data/app/assets/images/activa/icons/glyphicons_056_projector.png +0 -0
  60. data/app/assets/images/activa/icons/glyphicons_057_history.png +0 -0
  61. data/app/assets/images/activa/icons/glyphicons_058_truck.png +0 -0
  62. data/app/assets/images/activa/icons/glyphicons_059_cargo.png +0 -0
  63. data/app/assets/images/activa/icons/glyphicons_060_compass.png +0 -0
  64. data/app/assets/images/activa/icons/glyphicons_061_keynote.png +0 -0
  65. data/app/assets/images/activa/icons/glyphicons_062_attach.png +0 -0
  66. data/app/assets/images/activa/icons/glyphicons_063_power.png +0 -0
  67. data/app/assets/images/activa/icons/glyphicons_064_lightbulb.png +0 -0
  68. data/app/assets/images/activa/icons/glyphicons_065_tag.png +0 -0
  69. data/app/assets/images/activa/icons/glyphicons_066_tags.png +0 -0
  70. data/app/assets/images/activa/icons/glyphicons_067_cleaning.png +0 -0
  71. data/app/assets/images/activa/icons/glyphicons_068_ruller.png +0 -0
  72. data/app/assets/images/activa/icons/glyphicons_069_gift.png +0 -0
  73. data/app/assets/images/activa/icons/glyphicons_070_umbrella.png +0 -0
  74. data/app/assets/images/activa/icons/glyphicons_071_book.png +0 -0
  75. data/app/assets/images/activa/icons/glyphicons_072_bookmark.png +0 -0
  76. data/app/assets/images/activa/icons/glyphicons_073_signal.png +0 -0
  77. data/app/assets/images/activa/icons/glyphicons_074_cup.png +0 -0
  78. data/app/assets/images/activa/icons/glyphicons_075_stroller.png +0 -0
  79. data/app/assets/images/activa/icons/glyphicons_076_headphones.png +0 -0
  80. data/app/assets/images/activa/icons/glyphicons_077_headset.png +0 -0
  81. data/app/assets/images/activa/icons/glyphicons_078_warning_sign.png +0 -0
  82. data/app/assets/images/activa/icons/glyphicons_079_signal.png +0 -0
  83. data/app/assets/images/activa/icons/glyphicons_080_retweet.png +0 -0
  84. data/app/assets/images/activa/icons/glyphicons_081_refresh.png +0 -0
  85. data/app/assets/images/activa/icons/glyphicons_082_roundabout.png +0 -0
  86. data/app/assets/images/activa/icons/glyphicons_083_random.png +0 -0
  87. data/app/assets/images/activa/icons/glyphicons_084_heat.png +0 -0
  88. data/app/assets/images/activa/icons/glyphicons_085_repeat.png +0 -0
  89. data/app/assets/images/activa/icons/glyphicons_086_display.png +0 -0
  90. data/app/assets/images/activa/icons/glyphicons_087_log_book.png +0 -0
  91. data/app/assets/images/activa/icons/glyphicons_088_adress_book.png +0 -0
  92. data/app/assets/images/activa/icons/glyphicons_089_magnet.png +0 -0
  93. data/app/assets/images/activa/icons/glyphicons_090_table.png +0 -0
  94. data/app/assets/images/activa/icons/glyphicons_091_adjust.png +0 -0
  95. data/app/assets/images/activa/icons/glyphicons_092_tint.png +0 -0
  96. data/app/assets/images/activa/icons/glyphicons_093_crop.png +0 -0
  97. data/app/assets/images/activa/icons/glyphicons_094_vector_path_square.png +0 -0
  98. data/app/assets/images/activa/icons/glyphicons_095_vector_path_circle.png +0 -0
  99. data/app/assets/images/activa/icons/glyphicons_096_vector_path_polygon.png +0 -0
  100. data/app/assets/images/activa/icons/glyphicons_097_vector_path_line.png +0 -0
  101. data/app/assets/images/activa/icons/glyphicons_098_vector_path_curve.png +0 -0
  102. data/app/assets/images/activa/icons/glyphicons_099_vector_path_all.png +0 -0
  103. data/app/assets/images/activa/icons/glyphicons_100_font.png +0 -0
  104. data/app/assets/images/activa/icons/glyphicons_101_italic.png +0 -0
  105. data/app/assets/images/activa/icons/glyphicons_102_bold.png +0 -0
  106. data/app/assets/images/activa/icons/glyphicons_103_text_underline.png +0 -0
  107. data/app/assets/images/activa/icons/glyphicons_104_text_strike.png +0 -0
  108. data/app/assets/images/activa/icons/glyphicons_105_text_height.png +0 -0
  109. data/app/assets/images/activa/icons/glyphicons_106_text_width.png +0 -0
  110. data/app/assets/images/activa/icons/glyphicons_107_text_resize.png +0 -0
  111. data/app/assets/images/activa/icons/glyphicons_108_left_indent.png +0 -0
  112. data/app/assets/images/activa/icons/glyphicons_109_right_indent.png +0 -0
  113. data/app/assets/images/activa/icons/glyphicons_110_align_left.png +0 -0
  114. data/app/assets/images/activa/icons/glyphicons_111_align_center.png +0 -0
  115. data/app/assets/images/activa/icons/glyphicons_112_align_right.png +0 -0
  116. data/app/assets/images/activa/icons/glyphicons_113_justify.png +0 -0
  117. data/app/assets/images/activa/icons/glyphicons_114_list.png +0 -0
  118. data/app/assets/images/activa/icons/glyphicons_115_text_smaller.png +0 -0
  119. data/app/assets/images/activa/icons/glyphicons_116_text_bigger.png +0 -0
  120. data/app/assets/images/activa/icons/glyphicons_117_embed.png +0 -0
  121. data/app/assets/images/activa/icons/glyphicons_118_embed_close.png +0 -0
  122. data/app/assets/images/activa/icons/glyphicons_119_adjust.png +0 -0
  123. data/app/assets/images/activa/icons/glyphicons_120_message_full.png +0 -0
  124. data/app/assets/images/activa/icons/glyphicons_121_message_empty.png +0 -0
  125. data/app/assets/images/activa/icons/glyphicons_122_message_in.png +0 -0
  126. data/app/assets/images/activa/icons/glyphicons_123_message_out.png +0 -0
  127. data/app/assets/images/activa/icons/glyphicons_124_message_plus.png +0 -0
  128. data/app/assets/images/activa/icons/glyphicons_125_message_minus.png +0 -0
  129. data/app/assets/images/activa/icons/glyphicons_126_message_ban.png +0 -0
  130. data/app/assets/images/activa/icons/glyphicons_127_message_flag.png +0 -0
  131. data/app/assets/images/activa/icons/glyphicons_128_message_lock.png +0 -0
  132. data/app/assets/images/activa/icons/glyphicons_129_message_new.png +0 -0
  133. data/app/assets/images/activa/icons/glyphicons_130_inbox.png +0 -0
  134. data/app/assets/images/activa/icons/glyphicons_131_inbox_plus.png +0 -0
  135. data/app/assets/images/activa/icons/glyphicons_132_inbox_minus.png +0 -0
  136. data/app/assets/images/activa/icons/glyphicons_133_inbox_lock.png +0 -0
  137. data/app/assets/images/activa/icons/glyphicons_134_inbox_in.png +0 -0
  138. data/app/assets/images/activa/icons/glyphicons_135_inbox_out.png +0 -0
  139. data/app/assets/images/activa/icons/glyphicons_136_computer_locked.png +0 -0
  140. data/app/assets/images/activa/icons/glyphicons_137_computer_service.png +0 -0
  141. data/app/assets/images/activa/icons/glyphicons_138_computer_proces.png +0 -0
  142. data/app/assets/images/activa/icons/glyphicons_139_phone.png +0 -0
  143. data/app/assets/images/activa/icons/glyphicons_140_database_lock.png +0 -0
  144. data/app/assets/images/activa/icons/glyphicons_141_database_plus.png +0 -0
  145. data/app/assets/images/activa/icons/glyphicons_142_database_minus.png +0 -0
  146. data/app/assets/images/activa/icons/glyphicons_143_database_ban.png +0 -0
  147. data/app/assets/images/activa/icons/glyphicons_144_folder_open.png +0 -0
  148. data/app/assets/images/activa/icons/glyphicons_145_folder_plus.png +0 -0
  149. data/app/assets/images/activa/icons/glyphicons_146_folder_minus.png +0 -0
  150. data/app/assets/images/activa/icons/glyphicons_147_folder_lock.png +0 -0
  151. data/app/assets/images/activa/icons/glyphicons_148_folder_flag.png +0 -0
  152. data/app/assets/images/activa/icons/glyphicons_149_folder_new.png +0 -0
  153. data/app/assets/images/activa/icons/glyphicons_150_check.png +0 -0
  154. data/app/assets/images/activa/icons/glyphicons_151_edit.png +0 -0
  155. data/app/assets/images/activa/icons/glyphicons_152_new_window.png +0 -0
  156. data/app/assets/images/activa/icons/glyphicons_153_more_windows.png +0 -0
  157. data/app/assets/images/activa/icons/glyphicons_154_show_big_thumbnails.png +0 -0
  158. data/app/assets/images/activa/icons/glyphicons_155_show_thumbnails.png +0 -0
  159. data/app/assets/images/activa/icons/glyphicons_156_show_thumbnails_with_lines.png +0 -0
  160. data/app/assets/images/activa/icons/glyphicons_157_show_lines.png +0 -0
  161. data/app/assets/images/activa/icons/glyphicons_158_playlist.png +0 -0
  162. data/app/assets/images/activa/icons/glyphicons_159_picture.png +0 -0
  163. data/app/assets/images/activa/icons/glyphicons_160_imac.png +0 -0
  164. data/app/assets/images/activa/icons/glyphicons_161_macbook.png +0 -0
  165. data/app/assets/images/activa/icons/glyphicons_162_ipad.png +0 -0
  166. data/app/assets/images/activa/icons/glyphicons_163_iphone.png +0 -0
  167. data/app/assets/images/activa/icons/glyphicons_164_iphone_transfer.png +0 -0
  168. data/app/assets/images/activa/icons/glyphicons_165_iphone_exchange.png +0 -0
  169. data/app/assets/images/activa/icons/glyphicons_166_ipod.png +0 -0
  170. data/app/assets/images/activa/icons/glyphicons_167_ipod_shuffle.png +0 -0
  171. data/app/assets/images/activa/icons/glyphicons_168_ear_plugs.png +0 -0
  172. data/app/assets/images/activa/icons/glyphicons_169_albums.png +0 -0
  173. data/app/assets/images/activa/icons/glyphicons_170_step_backward.png +0 -0
  174. data/app/assets/images/activa/icons/glyphicons_171_fast_backward.png +0 -0
  175. data/app/assets/images/activa/icons/glyphicons_172_rewind.png +0 -0
  176. data/app/assets/images/activa/icons/glyphicons_173_play.png +0 -0
  177. data/app/assets/images/activa/icons/glyphicons_174_pause.png +0 -0
  178. data/app/assets/images/activa/icons/glyphicons_175_stop.png +0 -0
  179. data/app/assets/images/activa/icons/glyphicons_176_forward.png +0 -0
  180. data/app/assets/images/activa/icons/glyphicons_177_fast_forward.png +0 -0
  181. data/app/assets/images/activa/icons/glyphicons_178_step_forward.png +0 -0
  182. data/app/assets/images/activa/icons/glyphicons_179_eject.png +0 -0
  183. data/app/assets/images/activa/icons/glyphicons_180_facetime_video.png +0 -0
  184. data/app/assets/images/activa/icons/glyphicons_181_download_alt.png +0 -0
  185. data/app/assets/images/activa/icons/glyphicons_182_mute.png +0 -0
  186. data/app/assets/images/activa/icons/glyphicons_183_volume_down.png +0 -0
  187. data/app/assets/images/activa/icons/glyphicons_184_volume_up.png +0 -0
  188. data/app/assets/images/activa/icons/glyphicons_185_screenshot.png +0 -0
  189. data/app/assets/images/activa/icons/glyphicons_186_move.png +0 -0
  190. data/app/assets/images/activa/icons/glyphicons_187_more.png +0 -0
  191. data/app/assets/images/activa/icons/glyphicons_188_brightness_reduce.png +0 -0
  192. data/app/assets/images/activa/icons/glyphicons_189_brightness_increase.png +0 -0
  193. data/app/assets/images/activa/icons/glyphicons_190_circle_plus.png +0 -0
  194. data/app/assets/images/activa/icons/glyphicons_191_circle_minus.png +0 -0
  195. data/app/assets/images/activa/icons/glyphicons_192_circle_remove.png +0 -0
  196. data/app/assets/images/activa/icons/glyphicons_193_circle_ok.png +0 -0
  197. data/app/assets/images/activa/icons/glyphicons_194_circle_question_mark.png +0 -0
  198. data/app/assets/images/activa/icons/glyphicons_195_circle_info.png +0 -0
  199. data/app/assets/images/activa/icons/glyphicons_196_circle_exclamation_mark.png +0 -0
  200. data/app/assets/images/activa/icons/glyphicons_197_remove.png +0 -0
  201. data/app/assets/images/activa/icons/glyphicons_198_ok.png +0 -0
  202. data/app/assets/images/activa/icons/glyphicons_199_ban.png +0 -0
  203. data/app/assets/images/activa/icons/glyphicons_200_download.png +0 -0
  204. data/app/assets/images/activa/icons/glyphicons_201_upload.png +0 -0
  205. data/app/assets/images/activa/icons/glyphicons_202_shopping_cart.png +0 -0
  206. data/app/assets/images/activa/icons/glyphicons_203_lock.png +0 -0
  207. data/app/assets/images/activa/icons/glyphicons_204_unlock.png +0 -0
  208. data/app/assets/images/activa/icons/glyphicons_205_electricity.png +0 -0
  209. data/app/assets/images/activa/icons/glyphicons_206_ok_2.png +0 -0
  210. data/app/assets/images/activa/icons/glyphicons_207_remove_2.png +0 -0
  211. data/app/assets/images/activa/icons/glyphicons_208_cart_out.png +0 -0
  212. data/app/assets/images/activa/icons/glyphicons_209_cart_in.png +0 -0
  213. data/app/assets/images/activa/icons/glyphicons_210_left_arrow.png +0 -0
  214. data/app/assets/images/activa/icons/glyphicons_211_right_arrow.png +0 -0
  215. data/app/assets/images/activa/icons/glyphicons_212_down_arrow.png +0 -0
  216. data/app/assets/images/activa/icons/glyphicons_213_up_arrow.png +0 -0
  217. data/app/assets/images/activa/icons/glyphicons_214_resize_small.png +0 -0
  218. data/app/assets/images/activa/icons/glyphicons_215_resize_full.png +0 -0
  219. data/app/assets/images/activa/icons/glyphicons_216_circle_arrow_left.png +0 -0
  220. data/app/assets/images/activa/icons/glyphicons_217_circle_arrow_right.png +0 -0
  221. data/app/assets/images/activa/icons/glyphicons_218_circle_arrow_top.png +0 -0
  222. data/app/assets/images/activa/icons/glyphicons_219_circle_arrow_down.png +0 -0
  223. data/app/assets/images/activa/icons/glyphicons_220_play_button.png +0 -0
  224. data/app/assets/images/activa/icons/glyphicons_221_unshare.png +0 -0
  225. data/app/assets/images/activa/icons/glyphicons_222_share.png +0 -0
  226. data/app/assets/images/activa/icons/glyphicons_223_thin_right_arrow.png +0 -0
  227. data/app/assets/images/activa/icons/glyphicons_224_thin_arrow_left.png +0 -0
  228. data/app/assets/images/activa/icons/glyphicons_225_bluetooth.png +0 -0
  229. data/app/assets/images/activa/icons/glyphicons_226_euro.png +0 -0
  230. data/app/assets/images/activa/icons/glyphicons_227_usd.png +0 -0
  231. data/app/assets/images/activa/icons/glyphicons_228_bp.png +0 -0
  232. data/app/assets/images/activa/icons/glyphicons_229_retweet_2.png +0 -0
  233. data/app/assets/images/activa/icons/glyphicons_230_moon.png +0 -0
  234. data/app/assets/images/activa/icons/glyphicons_231_sun.png +0 -0
  235. data/app/assets/images/activa/icons/glyphicons_232_cloud.png +0 -0
  236. data/app/assets/images/activa/icons/glyphicons_233_direction.png +0 -0
  237. data/app/assets/images/activa/icons/glyphicons_234_brush.png +0 -0
  238. data/app/assets/images/activa/icons/glyphicons_235_pen.png +0 -0
  239. data/app/assets/images/activa/icons/glyphicons_236_zoom_in.png +0 -0
  240. data/app/assets/images/activa/icons/glyphicons_237_zoom_out.png +0 -0
  241. data/app/assets/images/activa/icons/glyphicons_238_pin.png +0 -0
  242. data/app/assets/images/activa/icons/glyphicons_239_riflescope.png +0 -0
  243. data/app/assets/images/activa/icons/glyphicons_240_rotation_lock.png +0 -0
  244. data/app/assets/images/activa/icons/glyphicons_241_flash.png +0 -0
  245. data/app/assets/images/activa/icons/glyphicons_242_google_maps.png +0 -0
  246. data/app/assets/images/activa/icons/glyphicons_243_anchor.png +0 -0
  247. data/app/assets/images/activa/icons/glyphicons_244_conversation.png +0 -0
  248. data/app/assets/images/activa/icons/glyphicons_245_chat.png +0 -0
  249. data/app/assets/images/activa/icons/glyphicons_246_male.png +0 -0
  250. data/app/assets/images/activa/icons/glyphicons_247_female.png +0 -0
  251. data/app/assets/images/activa/icons/glyphicons_248_asterisk.png +0 -0
  252. data/app/assets/images/activa/icons/glyphicons_249_divide.png +0 -0
  253. data/app/assets/images/activa/icons/glyphicons_250_snorkel_diving.png +0 -0
  254. data/app/assets/images/activa/icons/glyphicons_251_scuba_diving.png +0 -0
  255. data/app/assets/images/activa/icons/glyphicons_252_oxygen_bottle.png +0 -0
  256. data/app/assets/images/activa/icons/glyphicons_253_fins.png +0 -0
  257. data/app/assets/images/activa/icons/glyphicons_254_fishes.png +0 -0
  258. data/app/assets/images/activa/icons/glyphicons_255_boat.png +0 -0
  259. data/app/assets/images/activa/icons/glyphicons_256_delete_point.png +0 -0
  260. data/app/assets/images/activa/icons/glyphicons_257_sheriffs_-star.png +0 -0
  261. data/app/assets/images/activa/icons/glyphicons_258_qrcode.png +0 -0
  262. data/app/assets/images/activa/icons/glyphicons_259_barcode.png +0 -0
  263. data/app/assets/images/activa/icons/glyphicons_260_pool.png +0 -0
  264. data/app/assets/images/activa/icons/glyphicons_261_buoy.png +0 -0
  265. data/app/assets/images/activa/icons/glyphicons_262_spade.png +0 -0
  266. data/app/assets/images/activa/icons/glyphicons_263_bank.png +0 -0
  267. data/app/assets/images/activa/icons/glyphicons_264_vcard.png +0 -0
  268. data/app/assets/images/activa/icons/glyphicons_265_electrical_plug.png +0 -0
  269. data/app/assets/images/activa/icons/glyphicons_266_flag.png +0 -0
  270. data/app/assets/images/activa/icons/glyphicons_267_credit_card.png +0 -0
  271. data/app/assets/images/activa/icons/glyphicons_268_keyboard_wireless.png +0 -0
  272. data/app/assets/images/activa/icons/glyphicons_269_keyboard_wired.png +0 -0
  273. data/app/assets/images/activa/icons/glyphicons_270_shield.png +0 -0
  274. data/app/assets/images/activa/icons/glyphicons_271_ring.png +0 -0
  275. data/app/assets/images/activa/icons/glyphicons_272_cake.png +0 -0
  276. data/app/assets/images/activa/icons/glyphicons_273_drink.png +0 -0
  277. data/app/assets/images/activa/icons/glyphicons_274_beer.png +0 -0
  278. data/app/assets/images/activa/icons/glyphicons_275_fast_food.png +0 -0
  279. data/app/assets/images/activa/icons/glyphicons_276_cutlery.png +0 -0
  280. data/app/assets/images/activa/icons/glyphicons_277_pizza.png +0 -0
  281. data/app/assets/images/activa/icons/glyphicons_278_birthday_cake.png +0 -0
  282. data/app/assets/images/activa/icons/glyphicons_279_tablet.png +0 -0
  283. data/app/assets/images/activa/icons/glyphicons_280_settings.png +0 -0
  284. data/app/assets/images/activa/icons/glyphicons_281_bullets.png +0 -0
  285. data/app/assets/images/activa/icons/glyphicons_282_cardio.png +0 -0
  286. data/app/assets/images/activa/icons/glyphicons_283_t-shirt.png +0 -0
  287. data/app/assets/images/activa/icons/glyphicons_284_pants.png +0 -0
  288. data/app/assets/images/activa/icons/glyphicons_285_sweater.png +0 -0
  289. data/app/assets/images/activa/icons/glyphicons_286_fabric.png +0 -0
  290. data/app/assets/images/activa/icons/glyphicons_287_leather.png +0 -0
  291. data/app/assets/images/activa/icons/glyphicons_288_scissors.png +0 -0
  292. data/app/assets/images/activa/icons/glyphicons_289_podium.png +0 -0
  293. data/app/assets/images/activa/icons/glyphicons_290_skull.png +0 -0
  294. data/app/assets/images/activa/icons/glyphicons_291_celebration.png +0 -0
  295. data/app/assets/images/activa/icons/glyphicons_292_tea_kettle.png +0 -0
  296. data/app/assets/images/activa/icons/glyphicons_293_french_press.png +0 -0
  297. data/app/assets/images/activa/icons/glyphicons_294_coffe_cup.png +0 -0
  298. data/app/assets/images/activa/icons/glyphicons_295_pot.png +0 -0
  299. data/app/assets/images/activa/icons/glyphicons_296_grater.png +0 -0
  300. data/app/assets/images/activa/icons/glyphicons_297_kettle.png +0 -0
  301. data/app/assets/images/activa/icons/glyphicons_298_hospital.png +0 -0
  302. data/app/assets/images/activa/icons/glyphicons_299_hospital_h.png +0 -0
  303. data/app/assets/images/activa/icons/glyphicons_300_microphone.png +0 -0
  304. data/app/assets/images/activa/icons/glyphicons_301_webcam.png +0 -0
  305. data/app/assets/images/activa/icons/glyphicons_302_temple_christianity_church.png +0 -0
  306. data/app/assets/images/activa/icons/glyphicons_303_temple_islam.png +0 -0
  307. data/app/assets/images/activa/icons/glyphicons_304_temple_hindu.png +0 -0
  308. data/app/assets/images/activa/icons/glyphicons_305_temple_buddhist.png +0 -0
  309. data/app/assets/images/activa/icons/glyphicons_306_electrical_socket_eu.png +0 -0
  310. data/app/assets/images/activa/icons/glyphicons_307_electrical_socket_us.png +0 -0
  311. data/app/assets/images/activa/icons/glyphicons_308_bomb.png +0 -0
  312. data/app/assets/images/activa/icons/glyphicons_309_comments.png +0 -0
  313. data/app/assets/images/activa/icons/glyphicons_310_flower.png +0 -0
  314. data/app/assets/images/activa/icons/glyphicons_311_baseball.png +0 -0
  315. data/app/assets/images/activa/icons/glyphicons_312_rugby.png +0 -0
  316. data/app/assets/images/activa/icons/glyphicons_313_ax.png +0 -0
  317. data/app/assets/images/activa/icons/glyphicons_314_table_tennis.png +0 -0
  318. data/app/assets/images/activa/icons/glyphicons_315_bowling.png +0 -0
  319. data/app/assets/images/activa/icons/glyphicons_316_tree_conifer.png +0 -0
  320. data/app/assets/images/activa/icons/glyphicons_317_tree_deciduous.png +0 -0
  321. data/app/assets/images/activa/icons/glyphicons_318_more-items.png +0 -0
  322. data/app/assets/images/activa/icons/glyphicons_319_sort.png +0 -0
  323. data/app/assets/images/activa/icons/glyphicons_320_filter.png +0 -0
  324. data/app/assets/images/activa/icons/glyphicons_321_gamepad.png +0 -0
  325. data/app/assets/images/activa/icons/glyphicons_322_playing_dices.png +0 -0
  326. data/app/assets/images/activa/icons/glyphicons_323_calculator.png +0 -0
  327. data/app/assets/images/activa/icons/glyphicons_324_tie.png +0 -0
  328. data/app/assets/images/activa/icons/glyphicons_325_wallet.png +0 -0
  329. data/app/assets/images/activa/icons/glyphicons_326_share.png +0 -0
  330. data/app/assets/images/activa/icons/glyphicons_327_sampler.png +0 -0
  331. data/app/assets/images/activa/icons/glyphicons_328_piano.png +0 -0
  332. data/app/assets/images/activa/icons/glyphicons_329_web_browser.png +0 -0
  333. data/app/assets/images/activa/icons/glyphicons_330_blog.png +0 -0
  334. data/app/assets/images/activa/icons/glyphicons_331_dashboard.png +0 -0
  335. data/app/assets/images/activa/icons/glyphicons_332_certificate.png +0 -0
  336. data/app/assets/images/activa/icons/glyphicons_333_bell.png +0 -0
  337. data/app/assets/images/activa/icons/glyphicons_334_candle.png +0 -0
  338. data/app/assets/images/activa/icons/glyphicons_335_pin_classic.png +0 -0
  339. data/app/assets/images/activa/icons/glyphicons_336_iphone_shake.png +0 -0
  340. data/app/assets/images/activa/icons/glyphicons_337_pin_flag.png +0 -0
  341. data/app/assets/images/activa/icons/glyphicons_338_turtle.png +0 -0
  342. data/app/assets/images/activa/icons/glyphicons_339_rabbit.png +0 -0
  343. data/app/assets/images/activa/icons/glyphicons_340_globe.png +0 -0
  344. data/app/assets/images/activa/icons/glyphicons_341_briefcase.png +0 -0
  345. data/app/assets/images/activa/icons/glyphicons_342_hdd.png +0 -0
  346. data/app/assets/images/activa/icons/glyphicons_343_thumbs_up.png +0 -0
  347. data/app/assets/images/activa/icons/glyphicons_344_thumbs_down.png +0 -0
  348. data/app/assets/images/activa/icons/glyphicons_345_hand_right.png +0 -0
  349. data/app/assets/images/activa/icons/glyphicons_346_hand_left.png +0 -0
  350. data/app/assets/images/activa/icons/glyphicons_347_hand_up.png +0 -0
  351. data/app/assets/images/activa/icons/glyphicons_348_hand_down.png +0 -0
  352. data/app/assets/images/activa/icons/glyphicons_349_fullscreen.png +0 -0
  353. data/app/assets/images/activa/icons/glyphicons_350_shopping_bag.png +0 -0
  354. data/app/assets/images/activa/icons/glyphicons_351_book_open.png +0 -0
  355. data/app/assets/images/activa/icons/glyphicons_352_nameplate.png +0 -0
  356. data/app/assets/images/activa/icons/glyphicons_353_nameplate_alt.png +0 -0
  357. data/app/assets/images/activa/icons/glyphicons_354_vases.png +0 -0
  358. data/app/assets/images/activa/icons/glyphicons_355_announcement.png +0 -0
  359. data/app/assets/images/activa/icons/glyphicons_356_dumbbell.png +0 -0
  360. data/app/assets/images/activa/icons/glyphicons_357_suitcase.png +0 -0
  361. data/app/assets/images/activa/icons/glyphicons_358_file_import.png +0 -0
  362. data/app/assets/images/activa/icons/glyphicons_359_file_export.png +0 -0
  363. data/app/assets/images/activa/icons/glyphicons_360_pinterest.png +0 -0
  364. data/app/assets/images/activa/icons/glyphicons_361_dropbox.png +0 -0
  365. data/app/assets/images/activa/icons/glyphicons_362_google+_alt.png +0 -0
  366. data/app/assets/images/activa/icons/glyphicons_363_jolicloud.png +0 -0
  367. data/app/assets/images/activa/icons/glyphicons_364_yahoo.png +0 -0
  368. data/app/assets/images/activa/icons/glyphicons_365_blogger.png +0 -0
  369. data/app/assets/images/activa/icons/glyphicons_366_picasa.png +0 -0
  370. data/app/assets/images/activa/icons/glyphicons_367_amazon.png +0 -0
  371. data/app/assets/images/activa/icons/glyphicons_368_tumblr.png +0 -0
  372. data/app/assets/images/activa/icons/glyphicons_369_wordpress.png +0 -0
  373. data/app/assets/images/activa/icons/glyphicons_370_instapaper.png +0 -0
  374. data/app/assets/images/activa/icons/glyphicons_371_evernote.png +0 -0
  375. data/app/assets/images/activa/icons/glyphicons_372_xing.png +0 -0
  376. data/app/assets/images/activa/icons/glyphicons_373_zootool.png +0 -0
  377. data/app/assets/images/activa/icons/glyphicons_374_dribbble.png +0 -0
  378. data/app/assets/images/activa/icons/glyphicons_375_deviantart.png +0 -0
  379. data/app/assets/images/activa/icons/glyphicons_376_read_it_later.png +0 -0
  380. data/app/assets/images/activa/icons/glyphicons_377_linked_in.png +0 -0
  381. data/app/assets/images/activa/icons/glyphicons_378_forrst.png +0 -0
  382. data/app/assets/images/activa/icons/glyphicons_379_pinboard.png +0 -0
  383. data/app/assets/images/activa/icons/glyphicons_380_behance.png +0 -0
  384. data/app/assets/images/activa/icons/glyphicons_381_github.png +0 -0
  385. data/app/assets/images/activa/icons/glyphicons_382_youtube.png +0 -0
  386. data/app/assets/images/activa/icons/glyphicons_383_skitch.png +0 -0
  387. data/app/assets/images/activa/icons/glyphicons_384_4square.png +0 -0
  388. data/app/assets/images/activa/icons/glyphicons_385_quora.png +0 -0
  389. data/app/assets/images/activa/icons/glyphicons_386_google_plus.png +0 -0
  390. data/app/assets/images/activa/icons/glyphicons_387_spootify.png +0 -0
  391. data/app/assets/images/activa/icons/glyphicons_388_stumbleupon.png +0 -0
  392. data/app/assets/images/activa/icons/glyphicons_389_readability.png +0 -0
  393. data/app/assets/images/activa/icons/glyphicons_390_facebook.png +0 -0
  394. data/app/assets/images/activa/icons/glyphicons_391_twitter_t.png +0 -0
  395. data/app/assets/images/activa/icons/glyphicons_392_twitter.png +0 -0
  396. data/app/assets/images/activa/icons/glyphicons_393_buzz.png +0 -0
  397. data/app/assets/images/activa/icons/glyphicons_394_vimeo.png +0 -0
  398. data/app/assets/images/activa/icons/glyphicons_395_flickr.png +0 -0
  399. data/app/assets/images/activa/icons/glyphicons_396_last_fm.png +0 -0
  400. data/app/assets/images/activa/icons/glyphicons_397_rss.png +0 -0
  401. data/app/assets/images/activa/icons/glyphicons_398_skype.png +0 -0
  402. data/app/assets/images/activa/icons/glyphicons_399_e-mail.png +0 -0
  403. data/app/assets/images/activa/icons/link.png +0 -0
  404. data/app/assets/images/bg.jpg +0 -0
  405. data/app/assets/images/input-bg.gif +0 -0
  406. data/app/assets/images/rails.png +0 -0
  407. data/app/assets/javascripts/activa/activa.js.coffee +42 -0
  408. data/app/assets/stylesheets/activa/activa.css.scss +64 -0
  409. data/app/controllers/activa/application_controller.rb +27 -0
  410. data/app/controllers/activa/pages_controller.rb +94 -0
  411. data/app/helpers/activa/application_helper.rb +4 -0
  412. data/app/helpers/activa/pages_helper.rb +38 -0
  413. data/app/inputs/editor_input.rb +10 -0
  414. data/app/inputs/pages_tree_input.rb +5 -0
  415. data/app/inputs/slug_input.rb +10 -0
  416. data/app/models/activa/ability.rb +27 -0
  417. data/app/models/activa/page.rb +139 -0
  418. data/app/views/activa/pages/_form.html.erb +37 -0
  419. data/app/views/activa/pages/_page.html.erb +9 -0
  420. data/app/views/activa/pages/edit.html.erb +7 -0
  421. data/app/views/activa/pages/index.html.erb +12 -0
  422. data/app/views/activa/pages/new.html.erb +3 -0
  423. data/app/views/activa/pages/partials/_neighbours.html.erb +11 -0
  424. data/app/views/activa/pages/partials/menu/_index.html.erb +3 -0
  425. data/app/views/activa/pages/partials/menu/_show.html.erb +7 -0
  426. data/app/views/activa/pages/show.html.erb +6 -0
  427. data/config/initializers/simple_form.rb +136 -0
  428. data/config/locales/en.yml +65 -0
  429. data/config/locales/ru.yml +65 -0
  430. data/config/routes.rb +16 -0
  431. data/db/migrate/20110520121037_create_activa_pages.rb +24 -0
  432. data/lib/activa.rb +26 -0
  433. data/lib/activa/default_permissions.rb +33 -0
  434. data/lib/activa/engine.rb +19 -0
  435. data/lib/activa/version.rb +3 -0
  436. data/lib/generators/activa/install/templates/initializer.rb +1 -0
  437. data/lib/generators/activa/install_generator.rb +109 -0
  438. data/lib/generators/activa/views_generator.rb +22 -0
  439. data/lib/tasks/activa_tasks.rake +4 -0
  440. metadata +617 -0
@@ -0,0 +1,139 @@
1
+ require 'awesome_nested_set'
2
+
3
+ # TODO Изменять slug только в том случае, когда он был изменен вручную
4
+ module Activa
5
+ class Page < ActiveRecord::Base
6
+ attr_accessible :title, :article, :slug, :parent_id
7
+
8
+ # see https://github.com/collectiveidea/awesome_nested_set
9
+ acts_as_nested_set
10
+
11
+ # see https://github.com/rsl/stringex
12
+ acts_as_url :title, :url_attribute => :slug,
13
+ :sync_url => false, # we update this manually
14
+ :only_when_blank => true
15
+
16
+ validates :title, :presence => true
17
+ validates :article, :presence => true
18
+ validates :slug, :format => { :with => /^[0-9a-z_-]+$/i }, :allow_blank => true
19
+
20
+ default_scope order('lft')
21
+
22
+ # Если создаётся страница без указанного родителя,
23
+ # то автоматически назначаем родителем корневую страницу
24
+ # Но только если текущая страница не корневая!
25
+ before_save do
26
+ if parent_id.blank? && Activa::Page.count > 0
27
+ if (new_record? && Activa::Page.has_root?) || (persisted? && self.id != Page.root.id)
28
+ self.parent_id = Page.root.id
29
+ end
30
+ end
31
+ end
32
+
33
+ # Перед сохранением вычисляем uri и slug.
34
+ # Для страниц, кроме корневой, slug вычисляется
35
+ # автоматически при помощи Stringex, но только когда title пуст.
36
+ before_save do
37
+ if Activa::Page.has_root? && title.blank?
38
+ self.uri = generate_uri
39
+ end
40
+
41
+ unless Activa::Page.has_root?
42
+ self.slug = 'home'
43
+ self.uri = '/'
44
+ end
45
+ end
46
+
47
+ # Если slug был изменен и при этом заголовок страницы не пуст
48
+ # и страница не является корневой, перегенерируем uri
49
+ before_save do
50
+ if slug_changed? && Activa::Page.has_root? && !title.blank?
51
+ self.uri = generate_uri
52
+ end
53
+ end
54
+
55
+ after_save do
56
+ # Если страница имеет потомков, то нужно перегенерировать
57
+ # uri и для них
58
+ if children.size > 0 && !root?
59
+ children.each { |child| child.regenerate_uri! }
60
+ end
61
+ end
62
+
63
+ set_callback :move, :after do
64
+ if Activa::Page.has_root?
65
+ update_attribute(:uri, generate_uri)
66
+ end
67
+ end
68
+
69
+ scope :published, where(:state => :published)
70
+ scope :drafts, where(:state => :draft)
71
+
72
+ def publish(params = nil)
73
+ self.attributes = params if params
74
+ self.state = :published
75
+ save
76
+ end
77
+
78
+ def save_as_draft
79
+ self.state = :draft
80
+ save
81
+ end
82
+
83
+ def update_as_draft(params)
84
+ self.attributes = params
85
+ save_as_draft
86
+ end
87
+
88
+ # Retrieve list of all potential parents pages for current page
89
+ def potential_parents
90
+ new_record? ? Activa::Page.scoped : Activa::Page.where("id != ?", id)
91
+ end
92
+
93
+ def self.has_root?
94
+ unscoped.count > 0
95
+ end
96
+
97
+ def regenerate_uri!
98
+ update_attribute(:uri, generate_uri)
99
+ end
100
+
101
+ def path
102
+ root? ? slug : Activa::Page.normalize_path(uri)
103
+ end
104
+
105
+ def inner_pages
106
+ children.select([:id, :parent_id, :title, :uri, :slug])
107
+ end
108
+
109
+ def neighbours
110
+ self_and_siblings.select([:id, :parent_id, :title, :uri, :slug])
111
+ end
112
+
113
+ def self.retrieve(uri)
114
+ uri = Activa::Page.normalize_uri(uri)
115
+ uri = '/' if uri == '/home'
116
+ Activa::Page.find_by_uri(Activa::Page.normalize_uri(uri))
117
+ end
118
+
119
+ def self.normalize_uri(uri)
120
+ "/#{uri}".sub(/\/+/, '/')
121
+ end
122
+
123
+ def self.normalize_path(path)
124
+ path.sub(/^\/+/, '')
125
+ end
126
+
127
+ private
128
+
129
+ # После переноса узла запускается этот метод и успешно
130
+ # генерирует URI (на данный момент).
131
+ def generate_uri
132
+ slices = (ancestors.reject {|x| x.root? }).map(&:slug)
133
+ slices << slug if Activa::Page.has_root?
134
+
135
+ "/#{slices.join('/')}".gsub(/^\/+/, '/')
136
+ end
137
+
138
+ end
139
+ end
@@ -0,0 +1,37 @@
1
+ <%= simple_form_for @page, :html => { :class => 'activa-page' } do |f| %>
2
+
3
+ <div id="activa-title-wrapper">
4
+ <%= f.input :title %>
5
+ <a href="javascript:;" title="Permalink"></a>
6
+ </div>
7
+
8
+ <% unless @page.root? %>
9
+ <%= f.input :slug, :as => :slug, :wrapper_html => { :class => 'hidden' } %>
10
+ <%= f.input :parent_id, :as => :pages_tree, :page => @page %>
11
+ <% end %>
12
+
13
+ <%= f.input :article, :as => :editor %>
14
+
15
+ <div class="actions">
16
+ <%= f.button :submit, t('views.pages.shared.save_as_draft'), :name => :save_as_draft %>
17
+ <%= t('views.pages.shared.or') %> <%= link_to t('views.pages.shared.back_link'), pages_path %>
18
+
19
+ <%= f.button :submit, :id => 'commit-button' %>
20
+ </div>
21
+ <% end %>
22
+
23
+ <script>
24
+ $(function() {
25
+ var activa;
26
+ return activa = new Activa({
27
+ title_input: $('#page_title'),
28
+ slug_input: $('#page_slug'),
29
+ toggle_btn: $('#activa-title-wrapper a'),
30
+ toggle_wrapper: $('form.activa-page div.slug'),
31
+ done_btn: $('form.activa-page button'),
32
+ cancel_btn: $('form.activa-page a.cancel'),
33
+ update_uri: '<%= slug_pages_path(:format => :json) %>',
34
+ persisted: <%= @page.persisted? %>
35
+ });
36
+ });
37
+ </script>
@@ -0,0 +1,9 @@
1
+ <li>
2
+ <%= link_to page.title, main_app.activa_page_path(page.path) %>
3
+
4
+ <% unless page.leaf? %>
5
+ <ul>
6
+ <%= render :partial => :page, :collection => page.children.published %>
7
+ </ul>
8
+ <% end %>
9
+ </li>
@@ -0,0 +1,7 @@
1
+ <%= heading_with_title t('views.pages.edit.heading') + " (#{@page.state})" %>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <% if can?(:destroy, @page) %>
6
+ <%= link_to t('views.pages.edit.sidebar.link'), activa.page_path(@page), confirm: t('views.pages.edit.sidebar.link_confirmation'), method: :delete %>
7
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%= heading_with_title t('views.pages.index.heading') %>
2
+
3
+ <% if @pages.any? %>
4
+ <ul id="pages">
5
+ <%= render :partial => :page, :collection => @pages %>
6
+ </ul>
7
+ <% else %>
8
+ <p>No pages yet.</p>
9
+ <% end %>
10
+
11
+ <%= render 'activa/pages/partials/menu/index' %>
12
+
@@ -0,0 +1,3 @@
1
+ <%= heading_with_title t('views.pages.new.heading') %>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,11 @@
1
+ <ul id="pages-neighbours">
2
+ <% if page.inner_pages.any? %>
3
+ <% page.inner_pages.each do |page| %>
4
+ <li><%= link_to page.title, main_app.activa_page_path(page.path) %></li>
5
+ <% end %>
6
+ <% elsif page.neighbours.any? %>
7
+ <% page.neighbours.each do |page| %>
8
+ <li><%= link_to_unless_current page.title, main_app.activa_page_path(page.path) %></li>
9
+ <% end %>
10
+ <% end %>
11
+ </ul>
@@ -0,0 +1,3 @@
1
+ <% if can?(:create, Activa::Page) %>
2
+ <%= link_to t('views.pages.index.sidebar.link'), activa.new_page_path %>
3
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <% if can?(:edit, page) %>
2
+ <%= link_to t('views.pages.show.sidebar.link'), activa.edit_page_path(page) %>
3
+ <% end %>
4
+
5
+ <% if can?(:create, page) %>
6
+ <%= link_to t('views.pages.index.sidebar.link'), activa.new_page_path(:parent_id => page.id) %>
7
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <%= heading_with_title @page.title %>
2
+
3
+ <article id="article"><%= raw @page.article %></article>
4
+
5
+ <%= render 'activa/pages/partials/menu/show', :page => @page %>
6
+ <%= render 'activa/pages/partials/neighbours', :page => @page %>
@@ -0,0 +1,136 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Wrappers are used by the form builder to generate a
4
+ # complete input. You can remove any component from the
5
+ # wrapper, change the order or even add your own to the
6
+ # stack. The options given below are used to wrap the
7
+ # whole input.
8
+ config.wrappers :default, :class => :input,
9
+ :hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
10
+ ## Extensions enabled by default
11
+ # Any of these extensions can be disabled for a
12
+ # given input by passing: `f.input EXTENSION_NAME => false`.
13
+ # You can make any of these extensions optional by
14
+ # renaming `b.use` to `b.optional`.
15
+
16
+ # Determines whether to use HTML5 (:email, :url, ...)
17
+ # and required attributes
18
+ b.use :html5
19
+
20
+ # Calculates placeholders automatically from I18n
21
+ # You can also pass a string as f.input :placeholder => "Placeholder"
22
+ b.use :placeholder
23
+
24
+ ## Optional extensions
25
+ # They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
26
+ # to the input. If so, they will retrieve the values from the model
27
+ # if any exists. If you want to enable the lookup for any of those
28
+ # extensions by default, you can change `b.optional` to `b.use`.
29
+
30
+ # Calculates maxlength from length validations for string inputs
31
+ b.optional :maxlength
32
+
33
+ # Calculates pattern from format validations for string inputs
34
+ b.optional :pattern
35
+
36
+ # Calculates min and max from length validations for numeric inputs
37
+ b.optional :min_max
38
+
39
+ # Calculates readonly automatically from readonly attributes
40
+ b.optional :readonly
41
+
42
+ ## Inputs
43
+ b.use :label_input
44
+ b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
45
+ b.use :error, :wrap_with => { :tag => :span, :class => :error }
46
+ end
47
+
48
+ # The default wrapper to be used by the FormBuilder.
49
+ config.default_wrapper = :default
50
+
51
+ # Define the way to render check boxes / radio buttons with labels.
52
+ # Defaults to :nested for bootstrap config.
53
+ # :inline => input + label
54
+ # :nested => label > input
55
+ config.boolean_style = :nested
56
+
57
+ # Default class for buttons
58
+ config.button_class = 'btn'
59
+
60
+ # Method used to tidy up errors.
61
+ # config.error_method = :first
62
+
63
+ # Default tag used for error notification helper.
64
+ config.error_notification_tag = :div
65
+
66
+ # CSS class to add for error notification helper.
67
+ config.error_notification_class = 'alert alert-error'
68
+
69
+ # ID to add for error notification helper.
70
+ # config.error_notification_id = nil
71
+
72
+ # Series of attempts to detect a default label method for collection.
73
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
74
+
75
+ # Series of attempts to detect a default value method for collection.
76
+ # config.collection_value_methods = [ :id, :to_s ]
77
+
78
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
79
+ # config.collection_wrapper_tag = nil
80
+
81
+ # You can define the class to use on all collection wrappers. Defaulting to none.
82
+ # config.collection_wrapper_class = nil
83
+
84
+ # You can wrap each item in a collection of radio/check boxes with a tag,
85
+ # defaulting to :span. Please note that when using :boolean_style = :nested,
86
+ # SimpleForm will force this option to be a label.
87
+ # config.item_wrapper_tag = :span
88
+
89
+ # You can define a class to use in all item wrappers. Defaulting to none.
90
+ # config.item_wrapper_class = nil
91
+
92
+ # How the label text should be generated altogether with the required text.
93
+ # config.label_text = lambda { |label, required| "#{required} #{label}" }
94
+
95
+ # You can define the class to use on all labels. Default is nil.
96
+ config.label_class = 'control-label'
97
+
98
+ # You can define the class to use on all forms. Default is simple_form.
99
+ # config.form_class = :simple_form
100
+
101
+ # You can define which elements should obtain additional classes
102
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
103
+
104
+ # Whether attributes are required by default (or not). Default is true.
105
+ # config.required_by_default = true
106
+
107
+ # Tell browsers whether to use default HTML5 validations (novalidate option).
108
+ # Default is enabled.
109
+ config.browser_validations = false
110
+
111
+ # Collection of methods to detect if a file type was given.
112
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
113
+
114
+ # Custom mappings for input types. This should be a hash containing a regexp
115
+ # to match as key, and the input type that will be used when the field name
116
+ # matches the regexp as value.
117
+ # config.input_mappings = { /count/ => :integer }
118
+
119
+ # Default priority for time_zone inputs.
120
+ # config.time_zone_priority = nil
121
+
122
+ # Default priority for country inputs.
123
+ # config.country_priority = nil
124
+
125
+ # Default size for text inputs.
126
+ # config.default_input_size = 50
127
+
128
+ # When false, do not use translations for labels.
129
+ # config.translate_labels = true
130
+
131
+ # Automatically discover new inputs in Rails' autoload path.
132
+ # config.inputs_discovery = true
133
+
134
+ # Cache SimpleForm inputs discovery
135
+ # config.cache_discovery = !Rails.env.development?
136
+ end
@@ -0,0 +1,65 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ simple_form:
6
+ labels:
7
+ page:
8
+ title: 'Page title'
9
+ article: 'Page content'
10
+ parent_id: 'Choose parent page'
11
+ slug: 'Permalink'
12
+ helpers:
13
+ submit:
14
+ slug:
15
+ done: 'Done'
16
+ cancel: 'сancel'
17
+ or: 'or'
18
+ page:
19
+ create: 'Publish'
20
+ controllers:
21
+ pages:
22
+ create:
23
+ published_notice: 'Page successfully published.'
24
+ draft_notice: 'Page saved as draft. You can continue editing.'
25
+ update:
26
+ notice: 'Page successfully updated'
27
+ destroy:
28
+ notice: 'Page was deleted forever'
29
+ views:
30
+ pages:
31
+ # TODO: move all actions to 'action' scope
32
+ new:
33
+ heading: 'New page'
34
+ edit:
35
+ heading: 'Editing page'
36
+ sidebar:
37
+ heading: 'Delete page'
38
+ link: 'Delete'
39
+ link_confirmation: 'Are you sure?'
40
+ show:
41
+ sidebar:
42
+ heading: 'Actions'
43
+ link: 'Edit'
44
+ index:
45
+ heading: 'Pages'
46
+ sidebar:
47
+ heading: 'Actions'
48
+ link: 'Create Page'
49
+ shared:
50
+ back_link: 'back'
51
+ save_as_draft: 'Save as draft'
52
+ or: 'or'
53
+ activerecord:
54
+ errors:
55
+ models:
56
+ page:
57
+ attributes:
58
+ title:
59
+ blank: 'You need to specify page title'
60
+ taken: 'Same title already exists. Please specify another title.'
61
+ article:
62
+ blank: 'You need to write something'
63
+ slug:
64
+ format:
65
+ with: 'Incorrect slug format specified.'