├── log └── .gitkeep ├── tmp └── .gitkeep ├── public ├── .htaccess ├── cache │ └── .gitkeep ├── files │ └── .gitkeep ├── images │ ├── rss.png │ ├── border.png │ ├── rdown.png │ ├── controls.png │ ├── grippie.png │ ├── loading.gif │ ├── overlay.png │ ├── sort_asc.png │ ├── swift16.png │ ├── swift32.png │ ├── swift64.png │ ├── error-404.png │ ├── error-500.png │ ├── grey-thumb.png │ ├── loading-big.gif │ ├── mime │ │ ├── audio.png │ │ ├── text │ │ │ ├── x-c.png │ │ │ ├── html.png │ │ │ ├── plain.png │ │ │ ├── x-chdr.png │ │ │ ├── x-csrc.png │ │ │ ├── x-java.png │ │ │ ├── x-sh.png │ │ │ ├── x-tex.png │ │ │ ├── x-c++src.png │ │ │ └── x-python.png │ │ ├── audio │ │ │ ├── mid.png │ │ │ ├── x-generic.png │ │ │ ├── x-realaudio.png │ │ │ └── x-pn-realaudio.png │ │ ├── image │ │ │ ├── gif.png │ │ │ ├── jpeg.png │ │ │ ├── png.png │ │ │ ├── svg+xml.png │ │ │ └── x-generic.png │ │ ├── application │ │ │ ├── pdf.png │ │ │ ├── zip.png │ │ │ ├── msword.png │ │ │ ├── x-core.png │ │ │ ├── x-dvi.png │ │ │ ├── x-font.png │ │ │ ├── x-tar.png │ │ │ ├── x-xcf.png │ │ │ ├── postscript.png │ │ │ ├── x-font-ttf.png │ │ │ ├── x-httpd-php.png │ │ │ ├── x-troff-man.png │ │ │ ├── octet-stream.png │ │ │ ├── vnd.ms-excel.png │ │ │ ├── x-7z-compressed.png │ │ │ ├── x-debian-package.png │ │ │ ├── x-iso9660-image.png │ │ │ ├── vnd.ms-powerpoint.png │ │ │ ├── x-shockwave-flash.png │ │ │ ├── x-redhat-package-manager.png │ │ │ ├── vnd.oasis.opendocument.chart.png │ │ │ ├── vnd.oasis.opendocument.image.png │ │ │ ├── vnd.oasis.opendocument.text.png │ │ │ ├── vnd.oasis.opendocument.database.png │ │ │ ├── vnd.oasis.opendocument.formula.png │ │ │ ├── vnd.oasis.opendocument.graphics.png │ │ │ ├── vnd.oasis.opendocument.spreadsheet.png │ │ │ └── vnd.oasis.opendocument.presentation.png │ │ └── video │ │ │ ├── quicktime.png │ │ │ └── x-generic.png │ ├── slider_knob.gif │ ├── sort_both.png │ ├── sort_desc.png │ ├── image_missing.png │ ├── social │ │ ├── google.png │ │ └── yandex.png │ ├── glyphicons-big.png │ ├── loading_background.png │ ├── sort_asc_disabled.png │ ├── sort_desc_disabled.png │ ├── Markdown.Editor.Icons.png │ ├── glyphicons-halflings.png │ ├── glyphicons-halflings-white.png │ └── extname │ │ ├── 16 │ │ ├── file_extension_7z.png │ │ ├── file_extension_ai.png │ │ ├── file_extension_gz.png │ │ ├── file_extension_ps.png │ │ ├── file_extension_rm.png │ │ ├── file_extension_ss.png │ │ ├── file_extension_3gp.png │ │ ├── file_extension_ace.png │ │ ├── file_extension_aif.png │ │ ├── file_extension_aiff.png │ │ ├── file_extension_amr.png │ │ ├── file_extension_asf.png │ │ ├── file_extension_asx.png │ │ ├── file_extension_bat.png │ │ ├── file_extension_bin.png │ │ ├── file_extension_bmp.png │ │ ├── file_extension_bup.png │ │ ├── file_extension_cab.png │ │ ├── file_extension_cbr.png │ │ ├── file_extension_cda.png │ │ ├── file_extension_cdl.png │ │ ├── file_extension_cdr.png │ │ ├── file_extension_chm.png │ │ ├── file_extension_dat.png │ │ ├── file_extension_divx.png │ │ ├── file_extension_dll.png │ │ ├── file_extension_dmg.png │ │ ├── file_extension_doc.png │ │ ├── file_extension_dss.png │ │ ├── file_extension_dvf.png │ │ ├── file_extension_dwg.png │ │ ├── file_extension_eml.png │ │ ├── file_extension_eps.png │ │ ├── file_extension_exe.png │ │ ├── file_extension_fla.png │ │ ├── file_extension_flv.png │ │ ├── file_extension_gif.png │ │ ├── file_extension_hqx.png │ │ ├── file_extension_htm.png │ │ ├── file_extension_html.png │ │ ├── file_extension_ifo.png │ │ ├── file_extension_indd.png │ │ ├── file_extension_iso.png │ │ ├── file_extension_jar.png │ │ ├── file_extension_jpeg.png │ │ ├── file_extension_jpg.png │ │ ├── file_extension_lnk.png │ │ ├── file_extension_log.png │ │ ├── file_extension_m4a.png │ │ ├── file_extension_m4b.png │ │ ├── file_extension_m4p.png │ │ ├── file_extension_m4v.png │ │ ├── file_extension_mcd.png │ │ ├── file_extension_mdb.png │ │ ├── file_extension_mid.png │ │ ├── file_extension_mov.png │ │ ├── file_extension_mp2.png │ │ ├── file_extension_mp4.png │ │ ├── file_extension_mpeg.png │ │ ├── file_extension_mpg.png │ │ ├── file_extension_msi.png │ │ ├── file_extension_mswmm.png │ │ ├── file_extension_ogg.png │ │ ├── file_extension_pdf.png │ │ ├── file_extension_png.png │ │ ├── file_extension_pps.png │ │ ├── file_extension_ppt.png │ │ ├── file_extension_psd.png │ │ ├── file_extension_pst.png │ │ ├── file_extension_ptb.png │ │ ├── file_extension_pub.png │ │ ├── file_extension_qbb.png │ │ ├── file_extension_qbw.png │ │ ├── file_extension_qxd.png │ │ ├── file_extension_ram.png │ │ ├── file_extension_rar.png │ │ ├── file_extension_rmvb.png │ │ ├── file_extension_rtf.png │ │ ├── file_extension_sea.png │ │ ├── file_extension_ses.png │ │ ├── file_extension_sit.png │ │ ├── file_extension_sitx.png │ │ ├── file_extension_swf.png │ │ ├── file_extension_tgz.png │ │ ├── file_extension_thm.png │ │ ├── file_extension_tif.png │ │ ├── file_extension_tmp.png │ │ ├── file_extension_ttf.png │ │ ├── file_extension_txt.png │ │ ├── file_extension_vcd.png │ │ ├── file_extension_vob.png │ │ ├── file_extension_wav.png │ │ ├── file_extension_wma.png │ │ ├── file_extension_wmv.png │ │ ├── file_extension_wps.png │ │ ├── file_extension_xls.png │ │ ├── file_extension_xpi.png │ │ ├── file_extension_zip.png │ │ └── file_extension_torrent.png │ │ └── 32 │ │ ├── file_extension_7z.png │ │ ├── file_extension_ai.png │ │ ├── file_extension_gz.png │ │ ├── file_extension_ps.png │ │ ├── file_extension_rm.png │ │ ├── file_extension_ss.png │ │ ├── file_extension_3gp.png │ │ ├── file_extension_ace.png │ │ ├── file_extension_aif.png │ │ ├── file_extension_aiff.png │ │ ├── file_extension_amr.png │ │ ├── file_extension_asf.png │ │ ├── file_extension_asx.png │ │ ├── file_extension_bat.png │ │ ├── file_extension_bin.png │ │ ├── file_extension_bmp.png │ │ ├── file_extension_bup.png │ │ ├── file_extension_cab.png │ │ ├── file_extension_cbr.png │ │ ├── file_extension_cda.png │ │ ├── file_extension_cdl.png │ │ ├── file_extension_cdr.png │ │ ├── file_extension_chm.png │ │ ├── file_extension_dat.png │ │ ├── file_extension_divx.png │ │ ├── file_extension_dll.png │ │ ├── file_extension_dmg.png │ │ ├── file_extension_doc.png │ │ ├── file_extension_dss.png │ │ ├── file_extension_dvf.png │ │ ├── file_extension_dwg.png │ │ ├── file_extension_eml.png │ │ ├── file_extension_eps.png │ │ ├── file_extension_exe.png │ │ ├── file_extension_fla.png │ │ ├── file_extension_flv.png │ │ ├── file_extension_gif.png │ │ ├── file_extension_hqx.png │ │ ├── file_extension_htm.png │ │ ├── file_extension_html.png │ │ ├── file_extension_ifo.png │ │ ├── file_extension_indd.png │ │ ├── file_extension_iso.png │ │ ├── file_extension_jar.png │ │ ├── file_extension_jpeg.png │ │ ├── file_extension_jpg.png │ │ ├── file_extension_lnk.png │ │ ├── file_extension_log.png │ │ ├── file_extension_m4a.png │ │ ├── file_extension_m4b.png │ │ ├── file_extension_m4p.png │ │ ├── file_extension_m4v.png │ │ ├── file_extension_mcd.png │ │ ├── file_extension_mdb.png │ │ ├── file_extension_mid.png │ │ ├── file_extension_mov.png │ │ ├── file_extension_mp2.png │ │ ├── file_extension_mp4.png │ │ ├── file_extension_mpeg.png │ │ ├── file_extension_mpg.png │ │ ├── file_extension_msi.png │ │ ├── file_extension_mswmm.png │ │ ├── file_extension_ogg.png │ │ ├── file_extension_pdf.png │ │ ├── file_extension_png.png │ │ ├── file_extension_pps.png │ │ ├── file_extension_psd.png │ │ ├── file_extension_pst.png │ │ ├── file_extension_ptb.png │ │ ├── file_extension_pub.png │ │ ├── file_extension_qbb.png │ │ ├── file_extension_qbw.png │ │ ├── file_extension_qxd.png │ │ ├── file_extension_ram.png │ │ ├── file_extension_rar.png │ │ ├── file_extension_rmvb.png │ │ ├── file_extension_rtf.png │ │ ├── file_extension_sea.png │ │ ├── file_extension_ses.png │ │ ├── file_extension_sit.png │ │ ├── file_extension_sitx.png │ │ ├── file_extension_swf.png │ │ ├── file_extension_tgz.png │ │ ├── file_extension_thm.png │ │ ├── file_extension_tif.png │ │ ├── file_extension_tmp.png │ │ ├── file_extension_ttf.png │ │ ├── file_extension_txt.png │ │ ├── file_extension_vcd.png │ │ ├── file_extension_vob.png │ │ ├── file_extension_wav.png │ │ ├── file_extension_wma.png │ │ ├── file_extension_wmv.png │ │ ├── file_extension_wps.png │ │ ├── file_extension_xls.png │ │ ├── file_extension_xpi.png │ │ ├── file_extension_zip.png │ │ └── file_extension_torrent.png ├── robots.txt.default └── javascripts │ └── html5ie8tags.js ├── admin ├── views │ ├── base │ │ ├── _help.slim │ │ ├── _index_operations_show.slim │ │ ├── _index_operations.slim │ │ ├── _meta.slim │ │ ├── _data-table.slim │ │ ├── _flash.slim │ │ ├── _edit_operations_multiple.slim │ │ ├── _show_operations.slim │ │ ├── error.slim │ │ ├── _edit_operations_show.slim │ │ ├── _group-select.slim │ │ ├── _index_operations_bottom.slim │ │ ├── _edit_operations.slim │ │ └── _group-select-for-bonds.slim │ ├── layouts │ │ ├── ajax.slim │ │ ├── _form.slim │ │ ├── pick.slim │ │ ├── dialog_slim.slim │ │ ├── new.slim │ │ ├── pick_one.slim │ │ ├── edit.slim │ │ ├── login.slim │ │ ├── pick_many.slim │ │ ├── dialog.slim │ │ └── index.slim │ ├── dialogs │ │ ├── preview.slim │ │ ├── bonds_ajax.json.slim │ │ ├── create_parent.json.slim │ │ ├── folder_images_object.slim │ │ ├── pick_pages.slim │ │ ├── dropdown_codes.slim │ │ ├── create_parent.slim │ │ ├── pick_blocks.slim │ │ ├── cat_cards.slim │ │ ├── cat_groups.slim │ │ ├── bonds_tab.slim │ │ ├── forms_cards.slim │ │ ├── news_rubrics.slim │ │ ├── folders.slim │ │ ├── pick_codes.slim │ │ ├── _folder_images_object.slim │ │ ├── folder_images.slim │ │ ├── folder_assets.slim │ │ ├── pick_images.slim │ │ ├── _tree.slim │ │ └── bonds.slim │ ├── elements │ │ ├── _form.slim │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── news_rubrics │ │ ├── _form.slim │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── mailers │ │ ├── reset_account_done.slim │ │ └── reset_account.slim │ ├── pages │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── blocks │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── folders │ │ ├── new.slim │ │ ├── _form.slim │ │ ├── index.slim │ │ ├── edit.slim │ │ └── _tree.slim │ ├── options │ │ ├── _form.slim │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── codes │ │ ├── _form.slim │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── images │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── cat_cards │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── fragments │ │ ├── new.slim │ │ ├── _pages.slim │ │ ├── edit.slim │ │ ├── _form.slim │ │ └── index.slim │ ├── accounts │ │ ├── show.slim │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── _form.slim │ │ └── index.slim │ ├── cat_groups │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── forms_faqs │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── assets │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── forms_cards │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── news_articles │ │ ├── new.slim │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── cat_nodes │ │ ├── new.slim │ │ ├── edit.slim │ │ └── index.slim │ ├── forms_results │ │ ├── edit.slim │ │ ├── index.slim │ │ └── _form.slim │ ├── protocols │ │ └── _step.slim │ ├── forms_stats │ │ └── index.slim │ ├── multiple │ │ └── edit.slim │ └── login │ │ └── new.slim ├── controllers │ ├── base.rb │ └── forms_stats.rb └── helpers │ └── view_helpers.rb ├── app ├── views │ ├── fragments │ │ └── .gitkeep │ ├── elements │ │ ├── Cat │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Folders │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Gallery │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Block │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Date │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Image │ │ │ ├── view.slim │ │ │ ├── view-original.slim │ │ │ ├── view-thumbnail.slim │ │ │ ├── view-link.slim │ │ │ ├── view-thumbnail-link.slim │ │ │ └── core.rb │ │ ├── LegacyLinkCheck │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── PageURL │ │ │ └── view.slim │ │ ├── NewsRubrics │ │ │ ├── core.rb │ │ │ └── view.slim │ │ ├── PageContent │ │ │ └── view.slim │ │ ├── PageHeader │ │ │ └── view.slim │ │ ├── Meta │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── PageTitle │ │ │ └── view.slim │ │ ├── NewsArticle │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── PageLink │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Forms │ │ │ ├── inquiry.slim │ │ │ ├── view.slim │ │ │ ├── input.slim │ │ │ └── core.rb │ │ ├── File │ │ │ ├── core.rb │ │ │ └── view.slim │ │ ├── PagesLastUpdated │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Notice │ │ │ └── view.slim │ │ ├── CatNode │ │ │ ├── core.rb │ │ │ └── view.slim │ │ ├── FoldersRandomImage │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── NewsTop │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── GalleryList │ │ │ ├── core.rb │ │ │ └── view.slim │ │ ├── FreshPages │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── NewsToday │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── BlockSlider │ │ │ └── core.rb │ │ ├── GalleryRandomImage │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── GalleryFolder │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── NewsPager │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── Breadcrumbs │ │ │ └── view.slim │ │ ├── News │ │ │ ├── article_body.slim │ │ │ └── article_description.slim │ │ ├── CatGroups │ │ │ └── view.slim │ │ ├── RecentUpdates │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── FoldersImages │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── MapTree │ │ │ └── view.slim │ │ ├── FoldersList │ │ │ ├── core.rb │ │ │ └── view.slim │ │ ├── FoldersCarousel │ │ │ ├── view.slim │ │ │ └── core.rb │ │ ├── LocaleLinks │ │ │ └── view.slim │ │ ├── FormsForm │ │ │ ├── core.rb │ │ │ └── view.slim │ │ ├── NewsCalendar │ │ │ └── view.slim │ │ ├── Pager │ │ │ └── view.slim │ │ ├── CatNodes │ │ │ └── core.rb │ │ └── FormsInquiry │ │ │ └── view.slim │ ├── layouts │ │ ├── raw.slim │ │ ├── sitemap.xml.slim │ │ ├── application.slim │ │ └── news.xml.slim │ └── mailers │ │ └── form_saved.slim └── locale │ ├── en.yml │ └── ru.yml ├── assets └── stylesheets │ ├── app │ └── .gitkeep │ ├── admin │ ├── 12-block.css │ ├── 01-colors.css │ ├── 97-glyph.css │ ├── 95-stats.css │ └── 13-fileupload.css │ ├── login.css │ └── elements │ └── Image.css ├── config ├── legacy.yml.default ├── setup.rb ├── database.yml.default ├── database.rb ├── apps.rb └── setup-options.yml ├── config.ru ├── README.md ├── .components ├── lib ├── swift.rb ├── swift │ ├── monkey.rb │ ├── monkey │ │ ├── i18n.rb │ │ ├── sinatra.rb │ │ ├── http_router.rb │ │ ├── rack.rb │ │ └── datamapper.rb │ ├── engine.rb │ ├── model_plugins │ │ ├── uuid.rb │ │ ├── metable.rb │ │ ├── dateable.rb │ │ ├── stamps.rb │ │ └── loggable.rb │ ├── deprecate.rb │ ├── helpers.rb │ ├── helpers │ │ ├── defer.rb │ │ ├── legacy.rb │ │ └── error.rb │ └── model_plugins.rb └── tasks │ ├── fill_path.rake │ ├── rebuild_tree.rake │ ├── se.rake │ ├── db.rake │ └── load_events.rake ├── UPGRADE.md ├── test ├── minitest_helper.rb ├── elements │ ├── meta_test.rb │ ├── file_test.rb │ ├── pagelink_test.rb │ ├── pagetitle_test.rb │ ├── breadcrumbs_test.rb │ ├── forms_test.rb │ └── sitemap_test.rb └── elements_helper.rb ├── models ├── element.rb ├── access.rb ├── translation.rb ├── cat_group.rb ├── code.rb ├── layout.rb ├── news_rubric.rb ├── fragment.rb ├── forms_faq.rb └── block.rb ├── Rakefile ├── .gitignore ├── vendor └── javascripts │ └── bootstrap │ └── bootstrap-datetimepicker.ru.js └── Gemfile /log/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/cache/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/views/base/_help.slim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/fragments/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/elements/Cat/view.slim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/stylesheets/app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/views/layouts/ajax.slim: -------------------------------------------------------------------------------- 1 | = yield -------------------------------------------------------------------------------- /app/views/elements/Folders/view.slim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/elements/Gallery/view.slim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/layouts/raw.slim: -------------------------------------------------------------------------------- 1 | = yield 2 | -------------------------------------------------------------------------------- /admin/views/dialogs/preview.slim: -------------------------------------------------------------------------------- 1 | = @content -------------------------------------------------------------------------------- /app/views/elements/Block/view.slim: -------------------------------------------------------------------------------- 1 | = @text 2 | -------------------------------------------------------------------------------- /app/views/elements/Date/view.slim: -------------------------------------------------------------------------------- 1 | h3= @today 2 | -------------------------------------------------------------------------------- /admin/views/dialogs/bonds_ajax.json.slim: -------------------------------------------------------------------------------- 1 | == @answer.to_json -------------------------------------------------------------------------------- /app/locale/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | home: Home 3 | news: News 4 | -------------------------------------------------------------------------------- /app/locale/ru.yml: -------------------------------------------------------------------------------- 1 | ru: 2 | home: Главная 3 | news: Новости 4 | -------------------------------------------------------------------------------- /app/views/elements/Image/view.slim: -------------------------------------------------------------------------------- 1 | img *@identity src=@outlet.url 2 | -------------------------------------------------------------------------------- /app/views/elements/Image/view-original.slim: -------------------------------------------------------------------------------- 1 | img *@identity src=@image.file.url 2 | -------------------------------------------------------------------------------- /app/views/elements/Image/view-thumbnail.slim: -------------------------------------------------------------------------------- 1 | img *@identity src=@outlet.url 2 | -------------------------------------------------------------------------------- /app/views/elements/LegacyLinkCheck/view.slim: -------------------------------------------------------------------------------- 1 | a href=@legacy_uri = @legacy_uri 2 | -------------------------------------------------------------------------------- /app/views/elements/PageURL/view.slim: -------------------------------------------------------------------------------- 1 | = "http://#{swift.host}#{swift.uri}" rescue '/' 2 | -------------------------------------------------------------------------------- /public/images/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/rss.png -------------------------------------------------------------------------------- /public/images/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/border.png -------------------------------------------------------------------------------- /public/images/rdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/rdown.png -------------------------------------------------------------------------------- /app/views/elements/NewsRubrics/core.rb: -------------------------------------------------------------------------------- 1 | swift.module_path_ids = [] 2 | @rubrics = NewsRubric.all 3 | -------------------------------------------------------------------------------- /app/views/elements/PageContent/view.slim: -------------------------------------------------------------------------------- 1 | - @page ||= @opts[:page] 2 | = engine_render( @page.text ) 3 | -------------------------------------------------------------------------------- /app/views/elements/PageHeader/view.slim: -------------------------------------------------------------------------------- 1 | h2= swift.resource ? swift.resource.title : @page.title 2 | -------------------------------------------------------------------------------- /public/images/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/controls.png -------------------------------------------------------------------------------- /public/images/grippie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/grippie.png -------------------------------------------------------------------------------- /public/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/loading.gif -------------------------------------------------------------------------------- /public/images/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/overlay.png -------------------------------------------------------------------------------- /public/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/sort_asc.png -------------------------------------------------------------------------------- /public/images/swift16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/swift16.png -------------------------------------------------------------------------------- /public/images/swift32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/swift32.png -------------------------------------------------------------------------------- /public/images/swift64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/swift64.png -------------------------------------------------------------------------------- /app/views/elements/Date/core.rb: -------------------------------------------------------------------------------- 1 | date = Date.today 2 | @today = I18n.l( date, :format => @opts[:format]) 3 | -------------------------------------------------------------------------------- /app/views/elements/Meta/view.slim: -------------------------------------------------------------------------------- 1 | - @meta.each do |k,v| 2 | = meta_tag( v, :name => k ) if v.present? 3 | -------------------------------------------------------------------------------- /app/views/elements/PageTitle/view.slim: -------------------------------------------------------------------------------- 1 | title #{Option(:site_title)} — #{swift.path_pages.last.title} 2 | -------------------------------------------------------------------------------- /public/images/error-404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/error-404.png -------------------------------------------------------------------------------- /public/images/error-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/error-500.png -------------------------------------------------------------------------------- /public/images/grey-thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/grey-thumb.png -------------------------------------------------------------------------------- /public/images/loading-big.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/loading-big.gif -------------------------------------------------------------------------------- /public/images/mime/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/audio.png -------------------------------------------------------------------------------- /public/images/slider_knob.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/slider_knob.gif -------------------------------------------------------------------------------- /public/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/sort_both.png -------------------------------------------------------------------------------- /public/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/sort_desc.png -------------------------------------------------------------------------------- /config/legacy.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | url_base: "legacy/" 3 | url_map: 4 | example: "/" 5 | about: "/info" 6 | -------------------------------------------------------------------------------- /public/images/image_missing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/image_missing.png -------------------------------------------------------------------------------- /public/images/mime/text/x-c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-c.png -------------------------------------------------------------------------------- /public/images/social/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/social/google.png -------------------------------------------------------------------------------- /public/images/social/yandex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/social/yandex.png -------------------------------------------------------------------------------- /app/views/elements/NewsArticle/view.slim: -------------------------------------------------------------------------------- 1 | = element_view 'News/article_body', :locals => { :article => @article } 2 | -------------------------------------------------------------------------------- /app/views/elements/PageLink/view.slim: -------------------------------------------------------------------------------- 1 | = link_to @opts[:title].blank? ? @link.title : @opts[:title], @link.path 2 | -------------------------------------------------------------------------------- /public/images/glyphicons-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/glyphicons-big.png -------------------------------------------------------------------------------- /public/images/mime/audio/mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/audio/mid.png -------------------------------------------------------------------------------- /public/images/mime/image/gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/image/gif.png -------------------------------------------------------------------------------- /public/images/mime/image/jpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/image/jpeg.png -------------------------------------------------------------------------------- /public/images/mime/image/png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/image/png.png -------------------------------------------------------------------------------- /public/images/mime/text/html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/html.png -------------------------------------------------------------------------------- /public/images/mime/text/plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/plain.png -------------------------------------------------------------------------------- /public/images/mime/text/x-chdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-chdr.png -------------------------------------------------------------------------------- /public/images/mime/text/x-csrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-csrc.png -------------------------------------------------------------------------------- /public/images/mime/text/x-java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-java.png -------------------------------------------------------------------------------- /public/images/mime/text/x-sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-sh.png -------------------------------------------------------------------------------- /public/images/mime/text/x-tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-tex.png -------------------------------------------------------------------------------- /public/robots.txt.default: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /admin/ 3 | 4 | Sitemap: http://example.com/sitemap.xml 5 | -------------------------------------------------------------------------------- /public/images/loading_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/loading_background.png -------------------------------------------------------------------------------- /public/images/mime/image/svg+xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/image/svg+xml.png -------------------------------------------------------------------------------- /public/images/mime/text/x-c++src.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-c++src.png -------------------------------------------------------------------------------- /public/images/mime/text/x-python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/text/x-python.png -------------------------------------------------------------------------------- /public/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /public/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /admin/views/dialogs/create_parent.json.slim: -------------------------------------------------------------------------------- 1 | == { :field => params[:field], :key => @object.id, :value => @object.title }.to_json -------------------------------------------------------------------------------- /app/views/elements/Forms/inquiry.slim: -------------------------------------------------------------------------------- 1 | = @f.inquiry key, :as => value[0].to_sym, :options => value[1].split(/[\r\n]+/) 2 | 3 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env rackup 2 | require File.expand_path("../config/boot.rb", __FILE__) 3 | 4 | run Padrino.application 5 | -------------------------------------------------------------------------------- /public/images/Markdown.Editor.Icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/Markdown.Editor.Icons.png -------------------------------------------------------------------------------- /public/images/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/glyphicons-halflings.png -------------------------------------------------------------------------------- /public/images/mime/application/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/pdf.png -------------------------------------------------------------------------------- /public/images/mime/application/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/zip.png -------------------------------------------------------------------------------- /public/images/mime/audio/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/audio/x-generic.png -------------------------------------------------------------------------------- /public/images/mime/image/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/image/x-generic.png -------------------------------------------------------------------------------- /public/images/mime/video/quicktime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/video/quicktime.png -------------------------------------------------------------------------------- /public/images/mime/video/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/video/x-generic.png -------------------------------------------------------------------------------- /app/views/elements/PageLink/core.rb: -------------------------------------------------------------------------------- 1 | @link = Page.get(@args[0]) 2 | throw :output, "[Page ##{@args[0]} missing]" unless @link 3 | -------------------------------------------------------------------------------- /config/setup.rb: -------------------------------------------------------------------------------- 1 | # load initial objects 2 | load 'config/seed.rb' 3 | 4 | # load additional objects 5 | load 'config/grow.rb' 6 | -------------------------------------------------------------------------------- /public/images/mime/application/msword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/msword.png -------------------------------------------------------------------------------- /public/images/mime/application/x-core.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-core.png -------------------------------------------------------------------------------- /public/images/mime/application/x-dvi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-dvi.png -------------------------------------------------------------------------------- /public/images/mime/application/x-font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-font.png -------------------------------------------------------------------------------- /public/images/mime/application/x-tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-tar.png -------------------------------------------------------------------------------- /public/images/mime/application/x-xcf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-xcf.png -------------------------------------------------------------------------------- /public/images/mime/audio/x-realaudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/audio/x-realaudio.png -------------------------------------------------------------------------------- /admin/views/elements/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title 2 | = f.input :text, :as => :text, :markdown => true 3 | = f.input :id 4 | = f.submits -------------------------------------------------------------------------------- /app/views/elements/File/core.rb: -------------------------------------------------------------------------------- 1 | @file = Asset.first :id => @args[0] 2 | throw :output, "[Asset ##{@args[0]} missing]" unless @file 3 | -------------------------------------------------------------------------------- /public/images/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /public/images/mime/audio/x-pn-realaudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/audio/x-pn-realaudio.png -------------------------------------------------------------------------------- /admin/views/base/_index_operations_show.slim: -------------------------------------------------------------------------------- 1 | ul.nav.nav-tabs.operations 2 | li.first.active= mk_single_op :list, url(@models, :index) 3 | -------------------------------------------------------------------------------- /app/views/elements/Forms/view.slim: -------------------------------------------------------------------------------- 1 | dl 2 | - @forms.each do |o| 3 | dt= link_to o.title, se_url(o) 4 | dd= engine_render( o.text ) 5 | -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_7z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_7z.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ai.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_gz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_gz.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ps.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_rm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_rm.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ss.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_7z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_7z.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ai.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_gz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_gz.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ps.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_rm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_rm.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ss.png -------------------------------------------------------------------------------- /public/images/mime/application/postscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/postscript.png -------------------------------------------------------------------------------- /public/images/mime/application/x-font-ttf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-font-ttf.png -------------------------------------------------------------------------------- /public/images/mime/application/x-httpd-php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-httpd-php.png -------------------------------------------------------------------------------- /public/images/mime/application/x-troff-man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-troff-man.png -------------------------------------------------------------------------------- /admin/views/dialogs/folder_images_object.slim: -------------------------------------------------------------------------------- 1 | - @objects.each do |o| 2 | = partial 'dialogs/folder_images_object', :locals => { :image => o } 3 | -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_3gp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_3gp.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ace.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_aif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_aif.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_aiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_aiff.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_amr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_amr.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_asf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_asf.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_asx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_asx.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_bat.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_bin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_bin.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_bmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_bmp.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_bup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_bup.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_cab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_cab.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_cbr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_cbr.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_cda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_cda.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_cdl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_cdl.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_cdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_cdr.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_chm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_chm.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_dat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_dat.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_divx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_divx.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_dll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_dll.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_dmg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_dmg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_doc.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_dss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_dss.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_dvf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_dvf.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_dwg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_dwg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_eml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_eml.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_eps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_eps.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_exe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_exe.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_fla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_fla.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_flv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_flv.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_gif.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_hqx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_hqx.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_htm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_htm.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_html.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ifo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ifo.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_indd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_indd.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_iso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_iso.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_jar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_jar.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_jpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_jpeg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_jpg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_lnk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_lnk.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_log.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_m4a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_m4a.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_m4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_m4b.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_m4p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_m4p.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_m4v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_m4v.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mcd.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mdb.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mid.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mov.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mp2.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mp4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mp4.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mpeg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mpg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_msi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_msi.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_mswmm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_mswmm.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ogg.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_pdf.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_png.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_pps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_pps.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ppt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ppt.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_psd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_psd.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_pst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_pst.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ptb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ptb.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_pub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_pub.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_qbb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_qbb.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_qbw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_qbw.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_qxd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_qxd.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ram.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_rar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_rar.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_rmvb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_rmvb.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_rtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_rtf.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_sea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_sea.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ses.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_sit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_sit.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_sitx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_sitx.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_swf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_swf.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_tgz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_tgz.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_thm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_thm.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_tif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_tif.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_tmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_tmp.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_ttf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_ttf.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_txt.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_vcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_vcd.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_vob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_vob.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_wav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_wav.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_wma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_wma.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_wmv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_wmv.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_wps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_wps.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_xls.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_xpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_xpi.png -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_zip.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_3gp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_3gp.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ace.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_aif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_aif.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_aiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_aiff.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_amr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_amr.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_asf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_asf.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_asx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_asx.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_bat.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_bin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_bin.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_bmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_bmp.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_bup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_bup.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_cab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_cab.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_cbr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_cbr.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_cda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_cda.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_cdl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_cdl.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_cdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_cdr.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_chm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_chm.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_dat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_dat.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_divx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_divx.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_dll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_dll.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_dmg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_dmg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_doc.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_dss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_dss.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_dvf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_dvf.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_dwg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_dwg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_eml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_eml.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_eps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_eps.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_exe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_exe.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_fla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_fla.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_flv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_flv.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_gif.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_hqx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_hqx.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_htm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_htm.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_html.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ifo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ifo.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_indd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_indd.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_iso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_iso.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_jar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_jar.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_jpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_jpeg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_jpg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_lnk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_lnk.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_log.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_m4a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_m4a.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_m4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_m4b.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_m4p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_m4p.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_m4v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_m4v.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mcd.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mdb.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mid.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mov.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mp2.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mp4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mp4.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mpeg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mpg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_msi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_msi.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_mswmm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_mswmm.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ogg.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_pdf.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_png.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_pps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_pps.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_psd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_psd.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_pst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_pst.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ptb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ptb.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_pub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_pub.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_qbb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_qbb.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_qbw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_qbw.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_qxd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_qxd.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ram.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_rar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_rar.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_rmvb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_rmvb.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_rtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_rtf.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_sea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_sea.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ses.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_sit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_sit.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_sitx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_sitx.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_swf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_swf.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_tgz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_tgz.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_thm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_thm.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_tif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_tif.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_tmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_tmp.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_ttf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_ttf.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_txt.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_vcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_vcd.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_vob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_vob.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_wav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_wav.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_wma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_wma.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_wmv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_wmv.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_wps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_wps.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_xls.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_xpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_xpi.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_zip.png -------------------------------------------------------------------------------- /public/images/mime/application/octet-stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/octet-stream.png -------------------------------------------------------------------------------- /public/images/mime/application/vnd.ms-excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.ms-excel.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Installation 2 | 3 | git clone https://github.com/ujifgc/swift.git new-app 4 | cd new-app 5 | bundle 6 | rake se:setup 7 | -------------------------------------------------------------------------------- /public/images/extname/16/file_extension_torrent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/16/file_extension_torrent.png -------------------------------------------------------------------------------- /public/images/extname/32/file_extension_torrent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/extname/32/file_extension_torrent.png -------------------------------------------------------------------------------- /public/images/mime/application/x-7z-compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-7z-compressed.png -------------------------------------------------------------------------------- /public/images/mime/application/x-debian-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-debian-package.png -------------------------------------------------------------------------------- /public/images/mime/application/x-iso9660-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-iso9660-image.png -------------------------------------------------------------------------------- /public/images/mime/application/vnd.ms-powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.ms-powerpoint.png -------------------------------------------------------------------------------- /public/images/mime/application/x-shockwave-flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-shockwave-flash.png -------------------------------------------------------------------------------- /.components: -------------------------------------------------------------------------------- 1 | --- 2 | :orm: datamapper 3 | :test: none 4 | :mock: none 5 | :script: jquery 6 | :renderer: slim 7 | :stylesheet: css 8 | :admin_renderer: slim 9 | -------------------------------------------------------------------------------- /app/views/elements/PagesLastUpdated/view.slim: -------------------------------------------------------------------------------- 1 | dl *@identity 2 | - @pages.each do |p| 3 | dt= link_to p.title, se_url(p) 4 | dd= p.meta['description'] 5 | -------------------------------------------------------------------------------- /assets/stylesheets/admin/12-block.css: -------------------------------------------------------------------------------- 1 | .edit-table td, .edit-table th { 2 | white-space: pre; 3 | } 4 | div.inline-block { 5 | display: inline-block; 6 | } 7 | -------------------------------------------------------------------------------- /public/images/mime/application/x-redhat-package-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/x-redhat-package-manager.png -------------------------------------------------------------------------------- /app/views/elements/Notice/view.slim: -------------------------------------------------------------------------------- 1 | - if flash.any? 2 | .flash 3 | - [:error, :warning, :notice].each do |type| 4 | = flash_tag type, :class => "message #{type}" 5 | -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.chart.png -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.image.png -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.text.png -------------------------------------------------------------------------------- /admin/views/base/_index_operations.slim: -------------------------------------------------------------------------------- 1 | ul.nav.nav-tabs.operations 2 | li.first.active= mk_single_op :list, url(@models, :index) 3 | li= mk_single_op :new, url(@models, :new) 4 | -------------------------------------------------------------------------------- /admin/views/dialogs/pick_pages.slim: -------------------------------------------------------------------------------- 1 | .dialog-pages 2 | = partial 'dialogs/tree', :locals => { :tree => @tree, :level => 0 } 3 | javascript: 4 | addCheckboxes('.dialog-pages'); 5 | -------------------------------------------------------------------------------- /admin/views/news_rubrics/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title 2 | = f.input :text, :as => :text, :markdown => true 3 | = f.input :slug 4 | = f.submits :append => mk_timestamps( @object ) 5 | -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.database.png -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.formula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.formula.png -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.graphics.png -------------------------------------------------------------------------------- /public/javascripts/html5ie8tags.js: -------------------------------------------------------------------------------- 1 | var tags='article,aside,footer,header,hgroup,nav,section,main,time,address'.split(','); 2 | for(var i in tags) { document.createElement(tags[i]) } -------------------------------------------------------------------------------- /admin/views/layouts/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title 2 | = f.input :code, :as => :text, :code => true, :value => @code 3 | = f.input :id 4 | = f.submits :append => mk_timestamps( @object ) 5 | -------------------------------------------------------------------------------- /app/views/elements/CatNode/core.rb: -------------------------------------------------------------------------------- 1 | @node ||= CatNode.by_slug swift.slug 2 | not_found unless @node 3 | swift.path_pages[-1] = Page.new :title => @node.title 4 | swift.resource = @node 5 | -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.spreadsheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.spreadsheet.png -------------------------------------------------------------------------------- /app/views/elements/FoldersRandomImage/view.slim: -------------------------------------------------------------------------------- 1 | .random-image 2 | a href=('/gallery/'+@folder.slug) 3 | = image_tag @image_src, :alt => @image.title 4 | .caption= @image.title 5 | -------------------------------------------------------------------------------- /app/views/elements/NewsTop/view.slim: -------------------------------------------------------------------------------- 1 | section.news-top.news-list 2 | - @articles.each do |article| 3 | = element_view 'News/article_description', :locals => { :article => article } 4 | -------------------------------------------------------------------------------- /lib/swift.rb: -------------------------------------------------------------------------------- 1 | require 'swift/nozzle' 2 | require 'swift/model_plugins' 3 | require 'swift/core_ext' 4 | require 'swift/monkey' 5 | 6 | require 'swift/engine' 7 | require 'swift/helpers' 8 | -------------------------------------------------------------------------------- /public/images/mime/application/vnd.oasis.opendocument.presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ujifgc/swift/master/public/images/mime/application/vnd.oasis.opendocument.presentation.png -------------------------------------------------------------------------------- /admin/controllers/base.rb: -------------------------------------------------------------------------------- 1 | Admin.controllers :base do 2 | set_access :admin, :designer, :auditor, :editor, :user 3 | 4 | get :index, :map => "/" do 5 | render "base/index" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /admin/views/base/_meta.slim: -------------------------------------------------------------------------------- 1 | = f.input 'meta[description]', :value => @object.meta['description'], :class => :long 2 | = f.input 'meta[keywords]', :value => @object.meta['keywords'], :class => :long 3 | -------------------------------------------------------------------------------- /UPGRADE.md: -------------------------------------------------------------------------------- 1 | ## b3020943cd99c 2 | 3 | $ rake se:grow 4 | $ rake set:paths 5 | Move folders from `public/img` and `public/doc` to `public/files` 6 | Move files from `public/img` to `public/files/images` 7 | -------------------------------------------------------------------------------- /admin/views/mailers/reset_account_done.slim: -------------------------------------------------------------------------------- 1 | | Пароль успешно сброшен. 2 | br 3 | br 4 | | Адрес панели управления: #{admin} 5 | br 6 | | Логин для входа: #{email} 7 | br 8 | | Новый пароль: #{password} 9 | -------------------------------------------------------------------------------- /admin/views/pages/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:pages, :create), :class => 'form form-horizontal edit' do |f| 3 | = partial "pages/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/GalleryList/core.rb: -------------------------------------------------------------------------------- 1 | @galleries = [] 2 | folders = Bond.all.children_for @page, 'Folder' 3 | folders.each do |f| 4 | if f.images.count > 0 5 | @galleries << f 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /admin/views/base/_data-table.slim: -------------------------------------------------------------------------------- 1 | table.table.smart class=@dynamic 2 | thead 3 | tr 4 | - @columns.each do |k,v| 5 | th class=v[:head_class] data=v[:data] = I18n.t(v[:header_title_key]) 6 | -------------------------------------------------------------------------------- /admin/views/blocks/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:blocks, :create), :class => 'form form-horizontal edit' do |f| 3 | = partial "blocks/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/folders/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:folders, :create), :class => 'form form-horizontal edit' do |f| 3 | = partial "folders/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/Forms/input.slim: -------------------------------------------------------------------------------- 1 | = @f.input key, :as => value[0].to_sym, :options => value[1].split(/[\r\n]+/), :required => value[2], :label => { :caption => "#{value[2]?'* ':''}#{key}" } 2 | 3 | -------------------------------------------------------------------------------- /assets/stylesheets/admin/01-colors.css: -------------------------------------------------------------------------------- 1 | .red { 2 | color: #DA4F49; 3 | } 4 | .green { 5 | color: #5BB75B; 6 | } 7 | .white { 8 | color: #fff; 9 | } 10 | .white:hover { 11 | color: #fff; 12 | } 13 | -------------------------------------------------------------------------------- /app/views/elements/File/view.slim: -------------------------------------------------------------------------------- 1 | .download 2 | i.mime-icon 3 | = icon_for(@file.file.filename) 4 | = link_to @opts[:title].blank? ? @file.title : @opts[:title], @file.file.url, :target => @opts[:target] 5 | -------------------------------------------------------------------------------- /app/views/mailers/form_saved.slim: -------------------------------------------------------------------------------- 1 | dl 2 | - @result.json.each do |k,v| 3 | dt= k 4 | - if @card.json[k][0] == 'file' 5 | dd= Asset.all(:id => v).map(&:info).join(', ') 6 | - else 7 | dd= v 8 | -------------------------------------------------------------------------------- /admin/views/options/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :id 2 | = f.input :title 3 | = f.input :value, :as => :text, :value => @object.json['value'].kind_of?(String) ? "\"#{@object.json['value']}\"" : @object.json['value'] 4 | = f.submits -------------------------------------------------------------------------------- /app/views/elements/Image/view-link.slim: -------------------------------------------------------------------------------- 1 | - databox = @image.file.outlets[:box] ? { :'data-box' => @image.file.outlets[:box].url } : {} 2 | a rel='box-image' href=@image.file.url title=@identity[:alt] *databox = @image.title 3 | -------------------------------------------------------------------------------- /app/views/elements/FreshPages/view.slim: -------------------------------------------------------------------------------- 1 | - @fresh_pages.each do |page| 2 | article 3 | header 4 | time pubdate=true datetime=page.updated_at = page.updated_at.as_date 5 | h4.title= link_to(page.title, page.path) 6 | -------------------------------------------------------------------------------- /admin/views/codes/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title 2 | = f.input :text, :as => :text, :markdown => true 3 | = f.input :html, :as => :text 4 | = f.input :placeholder 5 | = f.input :is_single, :as => :boolean 6 | = f.input :slug 7 | = f.submits -------------------------------------------------------------------------------- /app/views/elements/NewsToday/view.slim: -------------------------------------------------------------------------------- 1 | dl 2 | span class='label label-info' 3 | = 'Сегодня' + Date.today.as_date.to_s 4 | - @news.each do |o| 5 | dt 6 | = link_to o.title, se_url(o) 7 | dd= engine_render( o.info ) 8 | -------------------------------------------------------------------------------- /admin/views/base/_flash.slim: -------------------------------------------------------------------------------- 1 | - [:error, :warning, :success, :notice].each do |type| 2 | - next if flash[type].blank? 3 | .alert.alert-message class=('alert-' + (type == :notice ? :info : type).to_s) data-alert=true 4 | = flash[type] 5 | -------------------------------------------------------------------------------- /admin/views/codes/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:codes, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-codes" do |f| 3 | = partial "codes/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/BlockSlider/core.rb: -------------------------------------------------------------------------------- 1 | block = Block.by_slug(@args[0] || 'sliders') 2 | throw :output, "[Block ##{@args[0]} missing]" unless block 3 | @sliders = block.text.split(/---+/).map(&:strip).reject(&:blank?).map(&method(:split_image)) 4 | -------------------------------------------------------------------------------- /admin/views/images/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:images, :create), :class => 'form form-horizontal edit', :id => "edit-images", :multipart => true do |f| 3 | = partial "images/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/layouts/pick.slim: -------------------------------------------------------------------------------- 1 | .modal-header 2 | a.close data-dismiss=:modal × 3 | h3= @title 4 | .modal-body 5 | = yield 6 | .modal-footer 7 | = link_to pat('cancel'), 'javascript:;', :class => 'btn cancel-dialog', :'data-dismiss' => :modal 8 | -------------------------------------------------------------------------------- /app/views/elements/GalleryRandomImage/view.slim: -------------------------------------------------------------------------------- 1 | .thumbnail 2 | - href = '/gallery/' + @folder.slug 3 | a href=href 4 | = image_tag @image.file.thumb.url 5 | .caption 6 | = @image.title 7 | br 8 | = link_to @folder.title, href 9 | -------------------------------------------------------------------------------- /admin/views/elements/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:elements, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-elements" do |f| 3 | = partial "elements/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/layouts/dialog_slim.slim: -------------------------------------------------------------------------------- 1 | .modal-header 2 | a.close data-dismiss=:modal × 3 | h3= @title 4 | .modal-body 5 | = yield 6 | .modal-footer 7 | = link_to pat('close'), 'javascript:;', :class => 'btn cancel-dialog', :'data-dismiss' => :modal 8 | -------------------------------------------------------------------------------- /admin/views/layouts/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:layouts, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-layouts" do |f| 3 | = partial "layouts/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/layouts/pick_one.slim: -------------------------------------------------------------------------------- 1 | .modal-header 2 | a.close data-dismiss=:modal × 3 | h3= @title 4 | .modal-body 5 | = yield 6 | .modal-footer 7 | = link_to pat('cancel'), 'javascript:;', :class => 'btn cancel-dialog', :'data-dismiss' => :modal 8 | -------------------------------------------------------------------------------- /admin/views/options/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:options, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-options" do |f| 3 | = partial "options/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/Image/view-thumbnail-link.slim: -------------------------------------------------------------------------------- 1 | - databox = @image.file.outlets[:box] ? { :'data-box' => @image.file.outlets[:box].url } : {} 2 | a rel='box-image' href=@image.file.url title=@identity[:alt] *databox 3 | img *@identity src=@outlet.url 4 | -------------------------------------------------------------------------------- /admin/views/cat_cards/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:cat_cards, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-cat_cards" do |f| 3 | = partial "cat_cards/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/fragments/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:fragments, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-fragments" do |f| 3 | = partial "fragments/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/GalleryFolder/view.slim: -------------------------------------------------------------------------------- 1 | ul.gallery_images 2 | - @pics.each do |pic| 3 | li 4 | a rel="box-image" href=pic.file.url title=pic.title 5 | = image_tag pic.file.thumb.url 6 | a id="image_title" 7 | = pic.title 8 | -------------------------------------------------------------------------------- /app/views/elements/NewsPager/view.slim: -------------------------------------------------------------------------------- 1 | section.news-pager.news-list 2 | - @articles.each do |article| 3 | = element_view 'News/article_description', :locals => { :article => article } 4 | - if @pages_count > 1 5 | = element 'Pager', :allow => [] 6 | -------------------------------------------------------------------------------- /test/minitest_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RACK_ENV'] = 'test' 2 | require File.expand_path('../../config/boot.rb', __FILE__) 3 | require 'minitest/autorun' 4 | 5 | class MiniTest::Spec 6 | def swift 7 | @test_swift ||= OpenStruct.new 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /admin/views/accounts/show.slim: -------------------------------------------------------------------------------- 1 | - @by_user = @subject 2 | - @by_object = @object 3 | - @object = @subject 4 | = partial 'base/show_operations' 5 | - Protocol.for( @by_user, @by_object ).each do |step| 6 | = partial 'protocols/step', :locals => { :step => step } 7 | -------------------------------------------------------------------------------- /admin/views/cat_groups/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:cat_groups, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-cat_groups" do |f| 3 | = partial "cat_groups/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/codes/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:codes, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-codes" do |f| 3 | = partial "codes/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/forms_faqs/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:forms_faqs, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-forms_faqs" do |f| 3 | = partial "forms_faqs/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/pages/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:pages, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-pages" do |f| 3 | = partial "pages/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/FreshPages/core.rb: -------------------------------------------------------------------------------- 1 | filter = {} 2 | filter[:limit] = @opts[:limit].to_i if @opts[:limit] 3 | filter[:limit] ||= 5 4 | filter[:order] = [ :updated_at.desc, :id.desc ] 5 | filter[:is_system] = false 6 | @fresh_pages = Page.published.all(filter) 7 | -------------------------------------------------------------------------------- /app/views/elements/NewsArticle/core.rb: -------------------------------------------------------------------------------- 1 | @article = NewsArticle.by_slug swift.slug 2 | not_found unless @article 3 | @article.text = @article.info if @article.text.blank? 4 | swift.path_pages[-1] = Page.new :title => @article.title 5 | swift.resource = @article 6 | -------------------------------------------------------------------------------- /assets/stylesheets/login.css: -------------------------------------------------------------------------------- 1 | legend { 2 | margin-bottom: 14px; 3 | } 4 | legend + .control-group { 5 | margin-top: 14px; 6 | } 7 | .alert { 8 | padding-right: 14px; 9 | } 10 | .login .well { 11 | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.067); 12 | } 13 | -------------------------------------------------------------------------------- /lib/swift/monkey.rb: -------------------------------------------------------------------------------- 1 | require 'swift/monkey/datamapper' 2 | require 'swift/monkey/http_router' 3 | require 'swift/monkey/i18n' 4 | require 'swift/monkey/markdown' 5 | require 'swift/monkey/padrino' 6 | require 'swift/monkey/rack' 7 | require 'swift/monkey/sinatra' 8 | -------------------------------------------------------------------------------- /admin/views/assets/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:assets, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-assets", :multipart => true do |f| 3 | = partial "assets/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/blocks/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:blocks, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-blocks" do |f| 3 | = partial "blocks/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/forms_cards/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:forms_cards, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-forms_cards" do |f| 3 | = partial "forms_cards/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/fragments/_pages.slim: -------------------------------------------------------------------------------- 1 | .control-group 2 | label.control-label= mat(:fragment, :pages) 3 | .controls 4 | ul.nav.nav-pills 5 | - @object.pages.each do |page| 6 | li 7 | = link_to page.title, url(:pages, :edit, :id => page.id) 8 | -------------------------------------------------------------------------------- /admin/views/layouts/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:layouts, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-layouts" do |f| 3 | = partial "layouts/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/options/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:options, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-options" do |f| 3 | = partial "options/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/NewsRubrics/view.slim: -------------------------------------------------------------------------------- 1 | nav.rubrics 2 | ul 3 | - @rubrics.each do |rubric| 4 | li class=(rubric.slug == swift.slug && 'active') 5 | = link_to rubric.title, url_replace(swift.uri, "#{swift.module_root}/#{rubric.slug}", :page => nil) 6 | -------------------------------------------------------------------------------- /lib/swift/monkey/i18n.rb: -------------------------------------------------------------------------------- 1 | module I18n 2 | # Shows full path to translation key instead of "humanizing" it 3 | class MissingTranslation 4 | module Base 5 | def message 6 | "#{keys.join('.')}" 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /admin/views/elements/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:elements, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-elements" do |f| 3 | = partial "elements/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/news_articles/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:news_articles, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-news_articles" do |f| 3 | = partial "news_articles/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/news_rubrics/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:news_rubrics, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-news_rubrics" do |f| 3 | = partial "news_rubrics/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/accounts/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:accounts, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-accounts", :autocomplete => :off do |f| 3 | = partial "accounts/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/cat_nodes/new.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:cat_nodes, :create), :method => :post, :class => 'form form-horizontal edit', :id => "edit-cat_nodes", :multipart => true do |f| 3 | = partial "cat_nodes/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/forms_results/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations_show' 2 | = form_for :object, url(:forms_results, :index), :method => :put, :class => 'form form-horizontal edit', :id => "edit-forms_results" do |f| 3 | = partial "forms_results/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/fragments/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:fragments, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-fragments" do |f| 3 | = partial "fragments/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/cat_groups/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:cat_groups, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-cat_groups" do |f| 3 | = partial "cat_groups/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/forms_faqs/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:forms_faqs, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-forms_faqs" do |f| 3 | = partial "forms_faqs/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /lib/swift/monkey/sinatra.rb: -------------------------------------------------------------------------------- 1 | require 'rack/showexceptions' 2 | module Sinatra 3 | class ShowExceptions < Rack::ShowExceptions 4 | def initialize(app) 5 | @app = app 6 | @template = ERB.new( File.read 'lib/error-500.erb' ) 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/elements/meta_test.rb: -------------------------------------------------------------------------------- 1 | #coding: utf-8 2 | require 'elements_helper' 3 | 4 | describe Swift do 5 | before do 6 | end 7 | 8 | it 'should write meta' do 9 | skip 10 | el = element('Meta') 11 | el.must_equal "%{placeholder[:meta]}" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /admin/views/assets/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:assets, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-assets", :multipart => true do |f| 3 | = partial "assets/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/base/_edit_operations_multiple.slim: -------------------------------------------------------------------------------- 1 | ul.nav.nav-tabs.operations 2 | li.first= mk_single_op :list, url(@models, :index) 3 | li= mk_single_op :new, url(@models, :new) 4 | li.active= mk_single_op :multiedit, url(:multiple, :edit, :models => @models, :ids => params[:ids]) 5 | -------------------------------------------------------------------------------- /admin/views/forms_cards/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:forms_cards, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-forms_cards" do |f| 3 | = partial "forms_cards/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/images/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:images, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-images", :multipart => true do |f| 3 | = partial "images/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/news_rubrics/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:news_rubrics, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-news_rubrics" do |f| 3 | = partial "news_rubrics/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /app/views/elements/Meta/core.rb: -------------------------------------------------------------------------------- 1 | object = swift.resource || @page 2 | @meta = object.respond_to?(:meta) ? object.meta : {} 3 | if @meta['description'].blank? 4 | @meta['description'] = strip_code( object.respond_to?(:info) && object.info.present? && object.info || object.title ) 5 | end 6 | -------------------------------------------------------------------------------- /app/views/elements/PagesLastUpdated/core.rb: -------------------------------------------------------------------------------- 1 | filter = {} 2 | filter[:offset] = @opts[:offset].to_i if @opts[:offset] 3 | filter[:limit] = @opts[:limit].to_i if @opts[:limit] 4 | filter[:limit] ||= 5 5 | filter[:order] = :updated_at.desc 6 | @pages = Page.published.all( filter ) 7 | 8 | -------------------------------------------------------------------------------- /app/views/layouts/sitemap.xml.slim: -------------------------------------------------------------------------------- 1 | doctype xml 2 | urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 3 | - @pages.each do |page| 4 | url 5 | loc= absolute_url(page.path) 6 | lastmod= page.last_update.xmlschema 7 | changefreq monthly 8 | priority 0.5 9 | -------------------------------------------------------------------------------- /admin/views/news_articles/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:news_articles, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-news_articles" do |f| 3 | = partial "news_articles/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/controllers/forms_stats.rb: -------------------------------------------------------------------------------- 1 | Admin.controllers :forms_stats do 2 | set_access :admin, :designer, :auditor 3 | 4 | get :index do 5 | filter = { 6 | :kind => 'inquiry' 7 | } 8 | @objects = FormsCard.all filter 9 | render 'forms_stats/index' 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /admin/views/accounts/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:accounts, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-accounts", :autocomplete => :off do |f| 3 | = partial "accounts/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /admin/views/cat_nodes/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:cat_nodes, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-cat_nodes", :multipart => true do |f| 3 | = partial "cat_nodes/form", :locals => { :f => f } 4 | -------------------------------------------------------------------------------- /models/element.rb: -------------------------------------------------------------------------------- 1 | class Element 2 | include DataMapper::Resource 3 | 4 | property :id, String, :length => 63, :key => true 5 | property :title, String 6 | property :text, Text 7 | 8 | # hookers 9 | before :valid? do 10 | self.id = title if id.blank? 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /config/database.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | development: &defaults 3 | adapter: mysql 4 | database: swift_site 5 | username: swift 6 | password: XXX 7 | host: 10.6.7.55 8 | 9 | test: 10 | <<: *defaults 11 | 12 | production: 13 | <<: *defaults 14 | 15 | rake: 16 | <<: *defaults 17 | -------------------------------------------------------------------------------- /admin/views/dialogs/dropdown_codes.slim: -------------------------------------------------------------------------------- 1 | ul.dropdown-menu 2 | - @objects.each do |o| 3 | li 4 | a href="#" data={ :single => o.is_single ? 'true' : 'false', :code => o.slug } 5 | - unless o.icon.blank? 6 | i class="icon-#{o.icon}" 7 | code= o.slug 8 | = o.title 9 | -------------------------------------------------------------------------------- /admin/views/layouts/login.slim: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | meta charset="utf-8" 5 | meta name="robots" content="noindex" 6 | title Swift :: #{Option(:site_title)} 7 | == pipeline :login, :css 8 | body.login 9 | .container.login style='width: 287px' 10 | = yield 11 | -------------------------------------------------------------------------------- /admin/views/cat_nodes/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-cat_nodes action=url(:cat_nodes, :index)/:multiple method=:post 3 | = csrf_token_field 4 | = mk_group_selector CatNode, CatCard, params 5 | = mk_data_table CatNode 6 | = partial 'base/index_operations_bottom' 7 | -------------------------------------------------------------------------------- /app/views/elements/Breadcrumbs/view.slim: -------------------------------------------------------------------------------- 1 | nav.breadcrumbs 2 | - swift.path_pages[0..-1].each do |p| 3 | a href=(p.path.blank? ? swift.uri : p.path) 4 | = p.parent || p.new? ? p.title : t('home') 5 | = ' ' 6 | - if @opts[:spacer] && p != swift.path_pages.last 7 | = @opts[:spacer] + ' ' 8 | -------------------------------------------------------------------------------- /admin/views/assets/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-assets action=url(:assets, :index)/:multiple method=:post 3 | = csrf_token_field 4 | = mk_group_selector Asset, Folder, params, :with => :assets 5 | = mk_data_table Asset 6 | = partial 'base/index_operations_bottom' 7 | -------------------------------------------------------------------------------- /admin/views/images/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-images action=url(:images, :index)/:multiple method=:post 3 | = csrf_token_field 4 | = mk_group_selector Image, Folder, params, :with => :images 5 | = mk_data_table Image 6 | = partial 'base/index_operations_bottom' 7 | -------------------------------------------------------------------------------- /admin/views/base/_show_operations.slim: -------------------------------------------------------------------------------- 1 | ul.nav.nav-tabs.operations 2 | li.first= mk_single_op :list, url(@models, :index) 3 | li class=(@object.new? && :active) = mk_single_op :new, url(@models, :new) 4 | - if !@object.new? && @object.respond_to?(:id) 5 | li.active= mk_single_op :show, url(@models, :show, params) 6 | -------------------------------------------------------------------------------- /config/database.rb: -------------------------------------------------------------------------------- 1 | DataMapper::Property::String.length(255) 2 | DataMapper::Logger.new('log/sql.log', Padrino.env == :development ? :debug : :error) 3 | DataMapper::Model.append_extensions(Swift::ModelPlugins::ClassMethods) 4 | 5 | DataMapper.setup(:default, YAML.load_file(Padrino.root('config/database.yml'))[RACK_ENV]) 6 | -------------------------------------------------------------------------------- /admin/views/dialogs/create_parent.slim: -------------------------------------------------------------------------------- 1 | form action=url(:dialogs, :create_parent, :field => params[:field], :parent_model => params[:parent_model]) method=:post 2 | = csrf_token_field 3 | label 4 | | Имя папки 5 | input.text_field#parent_title name=:parent_title value='' 6 | javascript: 7 | bindDialogCreateParent(); 8 | -------------------------------------------------------------------------------- /app/views/elements/Folders/core.rb: -------------------------------------------------------------------------------- 1 | if swift.slug == '' 2 | throw :output, element( 'FoldersList', *@args, @opts ) 3 | else 4 | @folder = Folder.by_slug(swift.slug) 5 | not_found unless @folder 6 | swift.path_pages << Page.new( :title => @folder.title ) 7 | throw :output, element( 'FoldersImages', *@args, @opts ) 8 | end 9 | -------------------------------------------------------------------------------- /admin/views/fragments/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title 2 | = f.input :code, :as => :text, :code => true, :value => @code 3 | = f.input :id 4 | = f.input :is_fragment, :as => :boolean 5 | = f.input :is_module, :as => :boolean 6 | - if @object.pages.count > 0 7 | = partial 'fragments/pages' 8 | = f.submits :append => mk_timestamps( @object ) 9 | -------------------------------------------------------------------------------- /admin/views/layouts/pick_many.slim: -------------------------------------------------------------------------------- 1 | .modal-header 2 | a.close data-dismiss=:modal × 3 | h3= @title 4 | .modal-body 5 | = yield 6 | .modal-footer 7 | = link_to pat('pick'), 'javascript:;', :class => 'btn btn-primary pick-dialog' 8 | = link_to pat('cancel'), 'javascript:;', :class => 'btn cancel-dialog', :'data-dismiss' => :modal 9 | -------------------------------------------------------------------------------- /admin/views/news_articles/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-news_articles action=url(:news_articles, :index)/:multiple method=:post 3 | = csrf_token_field 4 | = mk_group_selector NewsArticle, NewsRubric, params 5 | = mk_data_table NewsArticle 6 | = partial 'base/index_operations_bottom' 7 | -------------------------------------------------------------------------------- /app/views/elements/News/article_body.slim: -------------------------------------------------------------------------------- 1 | article.news-article itemscope=true itemtype='http://schema.org/NewsArticle' 2 | header 3 | time itemprop='datePublished' datetime=article.date.iso8601 = article.date.as_date 4 | h2 itemprop='headline' = article.title 5 | .body itemprop='articleBody' = engine_render(@article.text) 6 | -------------------------------------------------------------------------------- /admin/views/dialogs/pick_blocks.slim: -------------------------------------------------------------------------------- 1 | .dialog-blocks 2 | - @objects.each do |o| 3 | .item 4 | - data = { :id => o.id, :title => o.title, :type => 'block', :single => true } 5 | = link_to( "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' ) 6 | javascript: 7 | addCheckboxes('.dialog-blocks'); 8 | -------------------------------------------------------------------------------- /admin/views/forms_results/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations_show' 2 | form.inner.multiple#multiple-forms_results action=url(:forms_results, :index)/:multiple method=:post 3 | = csrf_token_field 4 | = mk_group_selector FormsResult, FormsCard, params 5 | = mk_data_table FormsResult 6 | = partial 'base/index_operations_bottom' 7 | -------------------------------------------------------------------------------- /lib/tasks/fill_path.rake: -------------------------------------------------------------------------------- 1 | #coding:utf-8 2 | namespace :set do 3 | desc "init database for se" 4 | task :paths => :environment do 5 | folders = Folder.all 6 | folders.each do |folder| 7 | p folder.slug 8 | folder.path = folder.slug 9 | folder.save 10 | p "success" 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /admin/views/mailers/reset_account.slim: -------------------------------------------------------------------------------- 1 | | Введите код сброса пароля #{account.reset_code} 2 | br 3 | | или перейдите по ссылке 4 | - url = absolute_url(:login, :reset, :email => account.email, :reset => account.reset_code) 5 | a href=url 6 | = url 7 | br 8 | br 9 | | Код и ссылка действуют только #{I18n.l Date.today, :format => :long} 10 | -------------------------------------------------------------------------------- /app/views/elements/LegacyLinkCheck/core.rb: -------------------------------------------------------------------------------- 1 | require 'open-uri' 2 | @legacy_uri = 'http://' + @opts[:host] + swift.uri 3 | begin 4 | status = open(@legacy_uri).status 5 | rescue OpenURI::HTTPError => e 6 | @legacy_uri = 'http://' + @opts[:host] 7 | else 8 | redirect @legacy_uri if status.first == "200" && @opts[:redirect] 9 | end 10 | -------------------------------------------------------------------------------- /app/views/elements/Gallery/core.rb: -------------------------------------------------------------------------------- 1 | if swift.slug != '' 2 | @folder = Folder.by_slug(swift.slug) 3 | not_found unless @folder 4 | swift.path_pages << Page.new 5 | @opts[:folder] = swift.slug 6 | throw :output, element( 'GalleryFolder', *@args, @opts ) 7 | else 8 | throw :output, element( 'GalleryList', *@args, @opts ) 9 | end 10 | -------------------------------------------------------------------------------- /lib/tasks/rebuild_tree.rake: -------------------------------------------------------------------------------- 1 | #coding:utf-8 2 | namespace :se do 3 | def rebuild_tree(root) 4 | root.path = nil 5 | root.save 6 | root.children.each{ |c| rebuild_tree(c) } 7 | end 8 | 9 | desc "rebuild page tree" 10 | task :retree => :environment do 11 | rebuild_tree Page.first( :parent => nil ) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | ENV['RACK_ENV'] = 'test' 2 | 3 | require 'padrino-core/cli/rake' 4 | require 'awesome_print' 5 | require 'rake/testtask' 6 | 7 | PadrinoTasks.use :database 8 | PadrinoTasks.init 9 | 10 | task :default => :test 11 | 12 | Rake::TestTask.new :test do |t| 13 | t.libs << "test" 14 | t.test_files = FileList['test/**/*_test.rb'] 15 | end 16 | -------------------------------------------------------------------------------- /admin/views/blocks/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-blocks action=url(:blocks, :index)/:multiple method=:post 3 | = csrf_token_field 4 | = mk_group_selector Block, { :type => Hash[Block::Types.keys.map{|k| [k,Block.get_type(k)] }] }, params 5 | = mk_data_table Block 6 | = partial 'base/index_operations_bottom' 7 | -------------------------------------------------------------------------------- /admin/views/forms_results/_form.slim: -------------------------------------------------------------------------------- 1 | dl 2 | - @object.json.each do |k,v| 3 | dt= k 4 | - if @object.forms_card.json[k] && @object.forms_card.json[k][0] == 'file' 5 | dd= Asset.all(:id => v).map(&:info).join(', ') 6 | - else 7 | dd= v 8 | 9 | .form-actions.buttons 10 | = f.submit :back 11 | = mk_timestamps( @object ) 12 | -------------------------------------------------------------------------------- /admin/views/layouts/dialog.slim: -------------------------------------------------------------------------------- 1 | .modal-header 2 | a.close data-dismiss=:modal × 3 | h3= @title 4 | .modal-body 5 | = yield 6 | .modal-footer 7 | = link_to pat('save'), 'javascript:;', :class => 'btn btn-primary save-dialog', :'data-dismiss' => :modal 8 | = link_to pat('cancel'), 'javascript:;', :class => 'btn cancel-dialog', :'data-dismiss' => :modal 9 | -------------------------------------------------------------------------------- /app/views/elements/CatGroups/view.slim: -------------------------------------------------------------------------------- 1 | - tree ||= @tree 2 | ul.nav.nav-list 3 | - tree.each do |leaf| 4 | - if leaf[:title] 5 | li class=leaf[:class] 6 | a href=leaf[:href] class=leaf[:class] 7 | = leaf[:title] 8 | - if leaf[:child] 9 | = element_view 'CatGroups/view', :locals => { :tree => leaf[:child] } 10 | -------------------------------------------------------------------------------- /models/access.rb: -------------------------------------------------------------------------------- 1 | class Access 2 | include DataMapper::Resource 3 | 4 | property :id, Serial 5 | 6 | #relations 7 | belongs_to :account, :required => true 8 | property :object_id, Integer, :required => true 9 | property :object_type, String, :required => true 10 | property :deny, Boolean, :required => true, :default => false 11 | end 12 | -------------------------------------------------------------------------------- /app/views/elements/RecentUpdates/view.slim: -------------------------------------------------------------------------------- 1 | section.recent-updates 2 | header 3 | h3 Новое на сайте 4 | - @updated_objects.each do |object| 5 | article class=("recent-#{object.class.name}") 6 | header 7 | time pubdate=true datetime=object.updated_at = object.updated_at.as_date 8 | h4.title= link_to object.title, se_url(object) 9 | -------------------------------------------------------------------------------- /lib/tasks/se.rake: -------------------------------------------------------------------------------- 1 | #coding:utf-8 2 | namespace :se do 3 | desc "init database for se" 4 | task :setup => :environment do 5 | DataMapper.auto_upgrade! 6 | load 'config/setup.rb' 7 | end 8 | 9 | desc "grow database for se" 10 | task :grow => :environment do 11 | DataMapper.auto_upgrade! 12 | load 'config/grow.rb' 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /models/translation.rb: -------------------------------------------------------------------------------- 1 | class Translation 2 | include DataMapper::Resource 3 | 4 | property :id, Serial 5 | property :locale, String, :length => 7 6 | property :object_model, String, :length => 31 7 | property :object_id, Integer 8 | property :field, String 9 | property :text, Text, :lazy => false 10 | end 11 | -------------------------------------------------------------------------------- /app/views/elements/RecentUpdates/core.rb: -------------------------------------------------------------------------------- 1 | models = @opts[:models] || [Page, NewsArticle] 2 | limit = @opts[:limit] || 5 3 | 4 | @updated_objects = [] 5 | models.each do |model| 6 | @updated_objects += model.published.all( :order => :updated_at ).last(limit).to_a 7 | end 8 | @updated_objects = @updated_objects.sort_by{ |object| -object.updated_at.to_i }.first(limit) 9 | -------------------------------------------------------------------------------- /admin/views/dialogs/cat_cards.slim: -------------------------------------------------------------------------------- 1 | .dialog-cat_cards 2 | ul 3 | - @objects.each do |o| 4 | - data = { :id => o.id, :title => o.title } 5 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 6 | li= link_to "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' 7 | -------------------------------------------------------------------------------- /admin/views/dialogs/cat_groups.slim: -------------------------------------------------------------------------------- 1 | .dialog-cat_groups 2 | ul 3 | - @objects.each do |o| 4 | - data = { :id => o.id, :title => o.title } 5 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 6 | li= link_to( "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' ) 7 | -------------------------------------------------------------------------------- /lib/swift/engine.rb: -------------------------------------------------------------------------------- 1 | require 'ostruct' 2 | 3 | module Swift 4 | module Engine 5 | module_function 6 | 7 | def registered(app) 8 | app.send(:include, InstanceMethods) 9 | app.helpers Swift::Helpers 10 | end 11 | 12 | module InstanceMethods 13 | def swift 14 | @swift ||= OpenStruct.new 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/swift/monkey/http_router.rb: -------------------------------------------------------------------------------- 1 | class HttpRouter::Request 2 | def initialize(path, rack_request) 3 | @rack_request = rack_request 4 | @path = Rack::Utils.unescape(path).split(/\//) 5 | @path.shift if @path.first == '' 6 | @path.push('') if path[-1] == ?/ 7 | @extra_env = {} 8 | @params = [] 9 | @acceptable_methods = Set.new 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /admin/views/dialogs/bonds_tab.slim: -------------------------------------------------------------------------------- 1 | .active-bonds 2 | - @bonds.each do |bond| 3 | - next unless bond.child 4 | .item 5 | - title = bond.child.title 6 | - data = { :model => bond.child_model, :id => bond.child_id, :title => title, :bound => true } 7 | = link_to "#{title} (#{data[:model]})", 'javascript:;', :data => data, :class => :pick, :onclick => 'return false' 8 | -------------------------------------------------------------------------------- /admin/views/dialogs/forms_cards.slim: -------------------------------------------------------------------------------- 1 | .dialog-forms_cards 2 | ul 3 | - @objects.each do |o| 4 | - data = { :id => o.id, :title => o.title } 5 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 6 | li= link_to( "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' ) 7 | -------------------------------------------------------------------------------- /admin/views/dialogs/news_rubrics.slim: -------------------------------------------------------------------------------- 1 | .dialog-news_rubrics 2 | ul 3 | - @objects.each do |o| 4 | - data = { :id => o.id, :title => o.title } 5 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 6 | li= link_to( "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' ) 7 | -------------------------------------------------------------------------------- /test/elements/file_test.rb: -------------------------------------------------------------------------------- 1 | #coding: utf-8 2 | require 'elements_helper' 3 | 4 | describe Swift do 5 | before do 6 | end 7 | 8 | it "should file exists" do 9 | el = element("File") 10 | el.must_equal "[Asset # missing]" 11 | end 12 | 13 | it "should throw error" do 14 | el = element("File", -1) 15 | el.must_equal "[Asset #-1 missing]" 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /admin/views/dialogs/folders.slim: -------------------------------------------------------------------------------- 1 | .dialog-folders 2 | ul 3 | - current_account.get_folders.each do |o| 4 | - data = { :id => o.id, :title => o.title } 5 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 6 | li= link_to "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' 7 | -------------------------------------------------------------------------------- /app/views/elements/FoldersImages/view.slim: -------------------------------------------------------------------------------- 1 | h2= @page && @page.title 2 | = element 'PageContent' 3 | section.folders-images 4 | - @images.each do |image| 5 | article 6 | = link_to image.file.url, :title => image.title, :rel => 'box-image' do 7 | = image_tag image.file.gallery_thumb.url, :alt => image.title 8 | / 9 | header 10 | h4= image.title 11 | -------------------------------------------------------------------------------- /admin/views/blocks/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title 2 | = f.input :type, :as => :select, :selected => @object.type, :options => Block::Types.map{|k,v|[mat(:object,"type_#{v}"),k]}, :include_blank => false 3 | = f.input :text, :as => :text, :markdown => true 4 | - allow :auditor do 5 | = f.input :slug 6 | = f.submits :append => mk_timestamps( @object ) 7 | 8 | javascript: 9 | bindBlockType(); 10 | -------------------------------------------------------------------------------- /config/apps.rb: -------------------------------------------------------------------------------- 1 | Padrino.configure_apps do 2 | set :session_secret, 'fd3a32d61be75844ffaf63deaeff410cd4d686f0de3154f4497a3cab0d493289' 3 | 4 | `which /usr/sbin/exim` 5 | if $?.success? 6 | set :delivery_method, :smtp 7 | else 8 | set :delivery_method, :sendmail 9 | end 10 | end 11 | 12 | Padrino.mount("Admin").to("/admin") 13 | Padrino.mount("Swift::Application").to('/') 14 | -------------------------------------------------------------------------------- /assets/stylesheets/admin/97-glyph.css: -------------------------------------------------------------------------------- 1 | [class^="glyph-"],[class*=" glyph-"]{display:inline-block;width:28px;height:28px;line-height:28px;vertical-align:text-top;background-image:url("../images/glyphicons-big.png");background-position:28px 28px;background-repeat:no-repeat;*margin-right:.3em;}[class^="glyph-"]:last-child,[class*=" glyph-"]:last-child{*margin-left:0;} 2 | .glyph-glass{background-position:0 0;} 3 | -------------------------------------------------------------------------------- /lib/swift/model_plugins/uuid.rb: -------------------------------------------------------------------------------- 1 | require 'securerandom' 2 | 3 | module Swift 4 | module ModelPlugins 5 | module UUID 6 | module ClassMethods 7 | def uuid! 8 | property :uuid, String, :length => 40 9 | 10 | before :create do 11 | self.uuid = SecureRandom.uuid 12 | end 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/views/elements/MapTree/view.slim: -------------------------------------------------------------------------------- 1 | - identity = defined?(tree) ? {} : ( tree = @tree; @identity ) 2 | ul *identity 3 | - tree.each do |leaf| 4 | - if leaf[:title] 5 | li class=leaf[:class] 6 | a href=leaf[:href] class=leaf[:class] 7 | = leaf[:title] 8 | - if leaf[:child].any? 9 | div= element_view 'MapTree/view', :locals => { :tree => leaf[:child] } 10 | -------------------------------------------------------------------------------- /admin/views/protocols/_step.slim: -------------------------------------------------------------------------------- 1 | dl 2 | - unless @by_user 3 | dt 4 | dd 5 | = step.subject.role_title 6 | = step.subject.name 7 | dt 8 | dd 9 | = step.verb 10 | dt 11 | dd 12 | = step.time.as_date 13 | - unless @by_object 14 | dt 15 | dd 16 | = step.object_id 17 | dt 18 | dd 19 | = step.object_type 20 | dt 21 | dd 22 | = step.data 23 | -------------------------------------------------------------------------------- /admin/views/assets/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title, :brackets => pat('not_required') 2 | = f.input :file, { :as => :file }.merge( @object.new? ? { :multiple => true, :brackets => pat(:or_multiple) } : {} ) 3 | = f.input :folder_id, :as => :select, :selected => @object.folder_id, :collection => current_account.get_folders, :fields => [ :title, :id ], :with_create => true 4 | = f.submits :append => mk_timestamps( @object ) 5 | -------------------------------------------------------------------------------- /admin/views/images/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :title, :brackets => pat('not_required') 2 | = f.input :file, { :as => :file }.merge( @object.new? ? { :multiple => true, :brackets => pat(:or_multiple) } : {} ) 3 | = f.input :folder_id, :as => :select, :selected => @object.folder_id, :collection => current_account.get_folders, :fields => [ :title, :id ], :with_create => true 4 | = f.submits :append => mk_timestamps( @object ) 5 | -------------------------------------------------------------------------------- /lib/swift/deprecate.rb: -------------------------------------------------------------------------------- 1 | module MultiJson 2 | module_function 3 | 4 | def decode(*args) 5 | warn 'MultiJson in no longer used. Please use ActiveSupport::JSON.decode' 6 | ActiveSupport::JSON.decode(*args) 7 | end 8 | 9 | def encode(*args) 10 | warn 'MultiJson in no longer used. Please use ActiveSupport::JSON.encode' 11 | ActiveSupport::JSON.encode(*args) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/elements/FoldersList/core.rb: -------------------------------------------------------------------------------- 1 | @folders = if @opts[:folders] 2 | case @opts[:folders] 3 | when Symbol, String 4 | Folder.all( :slug => Array(@opts[:folders]) ) 5 | else 6 | @opts[:folders] 7 | end 8 | else 9 | Bond.children_for(@page, 'Folder') 10 | end 11 | @folders = Folder.with :images unless @folders.any? 12 | throw :output, "[No bound folders for FoldersList]" unless @folders.any? 13 | -------------------------------------------------------------------------------- /app/views/elements/GalleryFolder/core.rb: -------------------------------------------------------------------------------- 1 | if folder = Folder.by_slug( @args[0] || @opts[:folder] || @opts[:gallery] ) 2 | @pics = Image.all :folder => folder 3 | else 4 | @pics = [] 5 | bonds = Bond.bonds_for @page 6 | bonds.map do |bond| 7 | case bond.child_model 8 | when 'Image' 9 | @pics << bond.child 10 | when 'Folder' 11 | @pics += bond.child.images 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /admin/views/base/error.slim: -------------------------------------------------------------------------------- 1 | .content.dashboard 2 | ul.nav.nav-tabs.operations 3 | li.active 4 | = link_to "Ошибка, #{@error}", url(:base, :index) 5 | 6 | h5 7 | | Простите, что-то пошло не так 8 | p 9 | | Ошибка занесена в протокол и будет исправлена в ближайшее время 10 | small 11 | | Если данная ошибка блокирует вашу работу, пожалуйста, сообщите администратору код ошибки: 12 | code #{@time} 13 | -------------------------------------------------------------------------------- /app/views/elements/FoldersCarousel/view.slim: -------------------------------------------------------------------------------- 1 | .carousel 2 | nav.prev 3 | img src='/images/arrow_left.png' alt="Сюда" 4 | section.images 5 | - @folders.each do |folder| 6 | - image = folder.images.last or next 7 | article 8 | a href=('/gallery/'+folder.slug) 9 | = image_tag image.file.gallery_thumb.url, :alt => image.title 10 | nav.next 11 | img src='/images/arrow_right.png' alt="Туда" 12 | -------------------------------------------------------------------------------- /app/views/elements/FoldersCarousel/core.rb: -------------------------------------------------------------------------------- 1 | @folders = if @opts[:folders] 2 | case @opts[:folders] 3 | when Symbol, String 4 | Folder.all( :slug => Array(@opts[:folders]) ) 5 | else 6 | @opts[:folders] 7 | end 8 | else 9 | Bond.children_for(@opts[:page] || @page, 'Folder') 10 | end 11 | @folders = Folder.with :images unless @folders.any? 12 | throw :output, "[No bound folders for FoldersList]" unless @folders.any? 13 | -------------------------------------------------------------------------------- /models/cat_group.rb: -------------------------------------------------------------------------------- 1 | class CatGroup 2 | include DataMapper::Resource 3 | 4 | property :id, Serial 5 | 6 | property :title, String, :required => true 7 | property :text, Text 8 | 9 | sluggable! 10 | timestamps! 11 | userstamps! 12 | loggable! 13 | publishable! 14 | bondable! 15 | amorphous! 16 | recursive! 17 | bondable! 18 | 19 | # relations 20 | belongs_to :cat_card, :required => true 21 | end 22 | -------------------------------------------------------------------------------- /app/views/elements/LocaleLinks/view.slim: -------------------------------------------------------------------------------- 1 | - locale_names = { 'ru' => 'русский', 'udm' => 'удмуртский', 'en' => 'английский' } 2 | nav.locale 3 | ul 4 | - swift.locales.each do |locale| 5 | li 6 | - if locale == swift.locale 7 | = locale_names[locale] 8 | - else 9 | a rel='alternate' hreflang=locale lang='ru' href="#{domain_with_locale(swift.host, locale)}#{swift.uri}" = locale_names[locale] 10 | -------------------------------------------------------------------------------- /app/views/elements/FormsForm/core.rb: -------------------------------------------------------------------------------- 1 | @card = FormsCard.by_slug swift.slug 2 | not_found unless @card 3 | swift.path_pages << Page.new( :title => @card.title ) 4 | swift.resource = @card 5 | case @opts[:method].to_sym 6 | when :post 7 | @result = @card.fill request 8 | if @result.saved? 9 | flash[:notice] = 'Saved' 10 | else 11 | flash[:notice] = 'Error' 12 | end 13 | else 14 | @result = FormsResult.new :forms_card => @card 15 | end 16 | -------------------------------------------------------------------------------- /app/views/elements/NewsToday/core.rb: -------------------------------------------------------------------------------- 1 | inc = @opts[:include] || @opts[:rubrics] 2 | filter = {} 3 | filter['news_rubric.slug'] = inc.to_s.split /\W+/ if inc 4 | filter['news_rubric.slug.not'] = @opts[:exclude].to_s.split /\W+/ if @opts[:exclude] 5 | filter[:offset] = @opts[:offset].to_i if @opts[:offset] 6 | filter[:order] = :date.desc 7 | filter[:date] = Date.today 8 | @news = NewsArticle.published.all( filter ) 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | log/* 3 | tmp/* 4 | bin/* 5 | vendor/gems/* 6 | !vendor/gems/cache/ 7 | .sass-cache/* 8 | uploads/* 9 | public/uploads/* 10 | public/files/* 11 | public/cache/* 12 | public/favicon.ico 13 | private/* 14 | app/views/fragments/* 15 | app/views/layouts/* 16 | config/database.yml 17 | config/legacy.yml 18 | assets/stylesheets/app/* 19 | assets/javascripts/app/* 20 | Gemfile.lock 21 | .bundle/* 22 | vendor/ruby/* 23 | public/robots.txt 24 | -------------------------------------------------------------------------------- /models/code.rb: -------------------------------------------------------------------------------- 1 | class Code 2 | include DataMapper::Resource 3 | 4 | property :id, Serial 5 | property :title, String, :required => true 6 | property :icon, String 7 | property :placeholder, String 8 | property :text, Text 9 | property :html, Text, :lazy => false 10 | property :is_single, Boolean, :default => false 11 | property :is_system, Boolean, :default => false 12 | 13 | sluggable! 14 | end 15 | -------------------------------------------------------------------------------- /admin/views/dialogs/pick_codes.slim: -------------------------------------------------------------------------------- 1 | .dialog-codes 2 | - @objects.each do |o| 3 | - data = { :id => nil, :title => o.placeholder.to_s, :type => o.slug, :single => o.is_single } 4 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 5 | .item= link_to "#{o.title}", o.slug, :data => data, :class => :pick, :onclick => 'return false' 6 | javascript: 7 | addCheckboxes('.dialog-codes'); 8 | -------------------------------------------------------------------------------- /assets/stylesheets/admin/95-stats.css: -------------------------------------------------------------------------------- 1 | /* bootstrap stats bars*/ 2 | .form-horizontal .stats .control-group { 3 | margin-bottom: 0; 4 | } 5 | .form-horizontal .stats .progress { 6 | margin-bottom: 0; 7 | width: 200px; 8 | } 9 | .form-horizontal .stats .control-label { 10 | padding-top: 0; 11 | margin-right: 9px; 12 | } 13 | .form-horizontal .stats { 14 | margin-bottom: 18px; 15 | } 16 | .form-horizontal .stats h3 { 17 | margin-bottom: 9px; 18 | } 19 | -------------------------------------------------------------------------------- /app/views/elements/FoldersList/view.slim: -------------------------------------------------------------------------------- 1 | h2= @page && @page.title 2 | = element 'PageContent' 3 | section.folders-list 4 | - @folders.each do |folder| 5 | article 6 | - if image = folder.bound('Image').last || folder.images.last 7 | = link_to File.join(swift.path, folder.slug) do 8 | = image_tag image.file.gallery_thumb.url, :alt => image.title 9 | header 10 | h4= link_to folder.title, File.join(swift.path, folder.slug) 11 | -------------------------------------------------------------------------------- /lib/swift/model_plugins/metable.rb: -------------------------------------------------------------------------------- 1 | module Swift 2 | module ModelPlugins 3 | module Metable 4 | module ClassMethods 5 | def metable! 6 | send :include, InstanceMethods 7 | property :meta, DataMapper::Property::Json, :default => {} 8 | end 9 | end 10 | 11 | module InstanceMethods 12 | def meta 13 | attribute_get(:meta) || {} 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/views/elements/GalleryRandomImage/core.rb: -------------------------------------------------------------------------------- 1 | @folder = if @opts[:folder] 2 | case @opts[:folder] 3 | when Symbol, String 4 | Folder.all( :slug => Array(@opts[:folder]) ).sample 5 | else 6 | @opts[:folder].sample 7 | end 8 | else 9 | Bond.children_for(@page, 'Folder').sample 10 | end 11 | throw :output, "[No bound folders for GalleryRandomImage]" unless @folder 12 | @image = @folder.images.sample 13 | throw :output, "[No images in Folder##{@folder.slug}]" unless @image 14 | -------------------------------------------------------------------------------- /lib/swift/model_plugins/dateable.rb: -------------------------------------------------------------------------------- 1 | module Swift 2 | module ModelPlugins 3 | module Dateable 4 | module ClassMethods 5 | # Resource is dateable 6 | # It has date property and does some fixing before save 7 | def dateable! 8 | property :date, DateTime, :required => true 9 | 10 | before :valid? do |i| 11 | self.date = nil if date.blank? 12 | end 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /admin/views/folders/_form.slim: -------------------------------------------------------------------------------- 1 | = f.inputs :title 2 | = f.input :text, :as => :text, :markdown => true 3 | = f.input :parent_id, :as => :select, :collection => Folder.all(:id.not => @object.id, :order => :title), :fields => [:title, :id], :selected => @object.parent_id, :class => 'long', :include_blank => true 4 | 5 | - allow :auditor do 6 | = f.input :slug 7 | 8 | - allow :designer do 9 | = f.input :is_private, :as => :boolean 10 | 11 | = f.submits :append => mk_timestamps( @object ) 12 | -------------------------------------------------------------------------------- /admin/views/dialogs/_folder_images_object.slim: -------------------------------------------------------------------------------- 1 | li.span2 2 | - data = { :id => image.id, :title => image.title, :type => 'image', :single => true } 3 | - data.merge! :bound => image.bound?( params[:parent_model], params[:parent_id] ), :model => image.class.name if params[:parent_id] 4 | = link_to( image.file.url, :class => 'pick thumbnail', :data => data, :onclick => 'return false' ) do 5 | = image_tag image.file.fill_thumb.url 6 | - unless image.title.blank? 7 | .caption= "#{image.title}" 8 | -------------------------------------------------------------------------------- /test/elements/pagelink_test.rb: -------------------------------------------------------------------------------- 1 | #coding: utf-8 2 | require 'elements_helper' 3 | 4 | describe Swift do 5 | before do 6 | @page1 = Page.new :title => "Page 1", :path => "/", :parent => nil 7 | end 8 | 9 | it "should link created" do 10 | skip 11 | el = element("PageLink", @page1) 12 | el.must_equal "[Page ##{@args[0]} missing]" 13 | end 14 | 15 | it "should throw error" do 16 | skip 17 | el = element("PageLink") 18 | el.must_equal "[Page # missing]" 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /admin/views/dialogs/folder_images.slim: -------------------------------------------------------------------------------- 1 | ul.thumbnails 2 | - unless params[:parent_model] 3 | li.span2 4 | a.thumbnail.fileinput-button 5 | input type='file' name='images[]' multiple=true data-url='/admin/assets/upload' 6 | .placeholder 7 | | + 8 | .caption 9 | = pat 'dialog.upload_images' 10 | javascript: 11 | bindDialogFileUpload(); 12 | - @objects.each do |o| 13 | = partial 'dialogs/folder_images_object', :locals => { :image => o } 14 | -------------------------------------------------------------------------------- /app/views/elements/GalleryList/view.slim: -------------------------------------------------------------------------------- 1 | .thumbnails 2 | - @galleries.each do |g| 3 | .thumbnail 4 | - bonds = Bond.bonds_for g 5 | - img = g.images.sample :folder => g 6 | - bonds.map do |bond| 7 | - if bond.child_model == 'Image' 8 | - img = bond.child 9 | a href=('/gallery/' + g.slug) 10 | = image_tag img.file.fill_thumb.url 11 | .caption 12 | = link_to g.title, '/gallery/' + g.slug 13 | br 14 | = engine_render( g.text ) 15 | -------------------------------------------------------------------------------- /app/views/elements/FormsForm/view.slim: -------------------------------------------------------------------------------- 1 | - if @result.errors.any? 2 | .article Ошибка при заполнении формы 3 | - elsif @result.new? 4 | .article 5 | h3= @card.title 6 | .text= engine_render( @card.text ) 7 | = form_for @result, se_url(@card, :post), :class => 'form form-horizontal' do |f| 8 | - @f = f 9 | - @card.json.each do |k,v| 10 | = element_view 'Forms/input', :locals => { :key => k, :value => v } 11 | = f.submits 12 | - else 13 | .article Спасибо за заполнение формы 14 | -------------------------------------------------------------------------------- /lib/tasks/db.rake: -------------------------------------------------------------------------------- 1 | #coding:utf-8 2 | namespace :db do 3 | desc "backup database" 4 | task :backup => :environment do 5 | connection = YAML.load_file( Padrino.root('config/database.yml') )[RACK_ENV] 6 | dbname = "#{connection['database']}-#{`date +%Y%m%d%H%M%S`.strip}.sql" 7 | `mysqldump #{connection['database']} --host=#{connection['host']} --user=#{connection['username']} --password=#{connection['password']} --databases > #{Padrino.root}/tmp/#{dbname}` 8 | p "tmp/#{dbname}" 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /admin/views/cat_cards/edit.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/edit_operations' 2 | = form_for :object, url(:cat_cards, :update, :id => @object.id), :method => :put, :class => 'form form-horizontal edit', :id => "edit-cat_cards" do |f| 3 | = partial "cat_cards/form", :locals => { :f => f } 4 | 5 | - content_for :help do 6 | li.nav-header= pat('menu.help') 7 | li 8 | = link_to url(:cat_nodes, :new, :cat_card_id => @object.id) do 9 | = mk_glyphs 'folder-close', 'arrow-right', 'inbox' 10 | = pat('menu.add.nodes') 11 | -------------------------------------------------------------------------------- /app/views/layouts/application.slim: -------------------------------------------------------------------------------- 1 | doctype 5 2 | html class=swift.print? 3 | head 4 | meta charset="utf-8" 5 | link rel="shortcut icon" href="/favicon.ico" 6 | link rel="alternate" type="application/rss+xml" title=Option(:site_title) href="/news.xml" 7 | /[if lt IE 9] 8 | script src='/javascripts/html5ie8tags.js' 9 | = element 'PageTitle' 10 | = element 'Meta' 11 | == pipeline :app, :css 12 | == pipeline :app, :js 13 | body class="#{swift.fragment} #{swift.locale}" 14 | = yield 15 | -------------------------------------------------------------------------------- /models/layout.rb: -------------------------------------------------------------------------------- 1 | class Layout 2 | include DataMapper::Resource 3 | 4 | property :id, String, :length => 20, :key => true 5 | property :title, String 6 | 7 | # plugins 8 | timestamps! 9 | userstamps! 10 | loggable! 11 | 12 | # relations 13 | has n, :pages, :child_key => :layout_id 14 | 15 | # hookers 16 | before :valid? do 17 | self.id = title if id.blank? 18 | end 19 | 20 | after :destroy do 21 | FileUtils.rm_f "#{Swift::Application.views}/layouts/#{id}.slim" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /admin/views/codes/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-codes action=url(:codes, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :title) 9 | th= mat(:object, :slug) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td.last= mk_checkbox object 14 | td= mk_edit object 15 | td= object.slug 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /app/views/elements/FoldersImages/core.rb: -------------------------------------------------------------------------------- 1 | if @folder ||= Folder.by_slug( @args[0] || @opts[:folder] || @opts[:gallery] ) 2 | @page = @folder 3 | swift.path_pages[-1] = Page.new :title => @folder.title 4 | swift.resource = @folder 5 | @images = @folder.images 6 | else 7 | @images = [] 8 | bonds = Bond.bonds_for @page 9 | bonds.map do |bond| 10 | case bond.child_model 11 | when 'Image' 12 | @images << bond.child 13 | when 'Folder' 14 | @images += bond.child.images 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/elements_helper.rb: -------------------------------------------------------------------------------- 1 | require 'minitest_helper' 2 | require 'rack/test' 3 | require 'digest/md5' 4 | 5 | class ElementApp < Padrino::Application 6 | register Swift::Engine 7 | end 8 | 9 | class MiniTest::Spec 10 | include Rack::Test::Methods 11 | 12 | def app 13 | ElementApp 14 | end 15 | 16 | def element(*args) 17 | ElementApp.get(Digest::MD5.hexdigest(args.inspect)) do 18 | element(*args) 19 | end 20 | get Digest::MD5.hexdigest(args.inspect) 21 | last_response.body 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /admin/views/accounts/_form.slim: -------------------------------------------------------------------------------- 1 | = f.input :name 2 | = f.input :surname 3 | = f.input :email 4 | = f.input :password, :as => :password 5 | = f.input :password_confirmation, :as => :password 6 | - allow :admin do 7 | = f.input :suggested_password, :value => Account.create_password 8 | = f.input :text, :as => :text 9 | = f.input :group_id, :as => :select, :selected => @object.group_id, :collection => Account.all( :group_id => nil ), :fields => [ :title, :id ], :include_blank => false 10 | = f.submits :append => mk_timestamps( @object ) 11 | -------------------------------------------------------------------------------- /admin/views/base/_edit_operations_show.slim: -------------------------------------------------------------------------------- 1 | ul.nav.nav-tabs.operations 2 | li.first= mk_single_op :list, url(@models, :index) 3 | - if !@object.new? && @object.respond_to?(:id) 4 | li.active= mk_single_op :edit, url(@models, :edit, :id => @object.id) 5 | - if BONDABLE_PARENTS.include? @object.class.name 6 | li.toggle 7 | - bc = @object.bond_count 8 | = mk_dialog_op :bind, url(:dialogs, :bonds, :parent_model => @object.class, :parent_id => @object.id), :title => pat('dialog.bind_objects'), :add => (bc > 0 && " (#{bc})") 9 | -------------------------------------------------------------------------------- /admin/views/base/_group-select.slim: -------------------------------------------------------------------------------- 1 | - @groups.each do |name,variants| 2 | .dataTables_group id="DataTables_Table_0_group_#{name}" 3 | label 4 | = pat("group.#{name}") + ': ' 5 | select name="DataTables_Table_0_group_#{name}" size="1" aria-controls="DataTables_Table_0" data={ :name => name.classify } 6 | - variants.each do |variant| 7 | option value=variant.id selected=(@selected[name][variant.id] && "selected") = variant.title 8 | option value="all" selected=(@selected[name].blank? && "selected") = pat('all') 9 | -------------------------------------------------------------------------------- /admin/views/base/_index_operations_bottom.slim: -------------------------------------------------------------------------------- 1 | .form-actions 2 | label.btn for='check-all' 3 | = check_box_tag :check_all, :checked => false, :id => 'check-all', :class => 'inline' 4 | = pat('select_all') 5 | - allow :auditor do 6 | - if @the_model && Admin::MULTIPLE_EDIT_FIELDS.any?{ |property| @the_model.properties.named?(property) } 7 | = mk_multiple_op :multiedit 8 | - if @the_model.respond_to? :published 9 | = mk_multiple_op :publish 10 | = mk_multiple_op :unpublish 11 | = mk_multiple_op :delete 12 | -------------------------------------------------------------------------------- /admin/views/dialogs/folder_assets.slim: -------------------------------------------------------------------------------- 1 | - @objects.each do |o| 2 | .item 3 | - data = { :id => o.id, :title => o.title, :type => 'file', :single => true } 4 | - data.merge! :bound => o.bound?( params[:parent_model], params[:parent_id] ), :model => o.class.name if params[:parent_id] 5 | = link_to o.file.url, :class => :pick, :data => data, :onclick => 'return false' do 6 | / i.icon-file class="icon-file-#{o.file.content_type.split(/[.\/]/).last}" 7 | span.title= "#{o.title} (#{File.extname(o.file.path)} #{o.file.size.as_size})" 8 | -------------------------------------------------------------------------------- /app/views/elements/NewsCalendar/view.slim: -------------------------------------------------------------------------------- 1 | nav.news-calendar 2 | .years 3 | - @news_years.to_a.reverse.each do |year| 4 | = link_to year.to_s, url_replace(@target, :year => year.to_s, :month => nil, :page => nil), :class => @new_year.to_i == year.to_i ? 'active' : nil 5 | .months 6 | - @news_months.each do |month| 7 | = link_to I18n.t("date.month_names_nominative")[month], url_replace(@target, :year => "#{@new_year||Date.today.year}", :month => month.to_s, :page => nil), :class => @new_month.to_i == month.to_i ? 'active' : nil 8 | -------------------------------------------------------------------------------- /admin/views/cat_cards/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-cat_cards action=url(:cat_cards, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :title) 9 | th= mat(:object, :slug) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td.last= mk_checkbox object 14 | td= mk_edit object 15 | td= object.path 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /admin/views/forms_faqs/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-forms_faqs action=url(:forms_faqs, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :title) 9 | th= mat(:object, :slug) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td.last= mk_checkbox object 14 | td= mk_edit object 15 | td= object.slug 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /lib/swift/helpers.rb: -------------------------------------------------------------------------------- 1 | Dir.glob( File.dirname(__FILE__) + '/helpers/*.rb' ).each { |file| require file } 2 | 3 | module Swift 4 | module Helpers 5 | include Swift::Helpers::Init 6 | include Swift::Helpers::Locale 7 | include Swift::Helpers::Defer 8 | include Swift::Helpers::Template 9 | include Swift::Helpers::Render 10 | include Swift::Helpers::Url 11 | include Swift::Helpers::Error 12 | include Swift::Helpers::Utils 13 | include Swift::Helpers::Legacy 14 | include Swift::Helpers::Remote 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/views/elements/NewsTop/core.rb: -------------------------------------------------------------------------------- 1 | inc = @opts[:include] || @opts[:rubrics] 2 | filter = {} 3 | filter['news_rubric.slug'] = inc.to_s.split /\W+/ if inc 4 | filter['news_rubric.slug.not'] = @opts[:exclude].to_s.split /\W+/ if @opts[:exclude] 5 | filter[:offset] = @opts[:offset].to_i if @opts[:offset] 6 | filter[:limit] = @opts[:limit].to_i if @opts[:limit] 7 | filter[:limit] ||= 5 8 | filter[:order] = [ :date.desc, :id.desc ] 9 | @articles = NewsArticle.published.all( filter ) 10 | -------------------------------------------------------------------------------- /admin/views/news_rubrics/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-news_rubrics action=url(:news_rubrics, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :title) 9 | th= mat(:object, :slug) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td.last= mk_checkbox object 14 | td= mk_edit object 15 | td= object.slug 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /test/elements/pagetitle_test.rb: -------------------------------------------------------------------------------- 1 | #coding: utf-8 2 | require 'elements_helper' 3 | 4 | describe Swift do 5 | before do 6 | @page = Page.new :title => "Page 1", :path => "/", :text => "small text info" 7 | end 8 | 9 | it "should write page title" do 10 | skip 11 | el = element("PageTitle").strip 12 | el.must_equal "
small text info
" 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /app/views/elements/News/article_description.slim: -------------------------------------------------------------------------------- 1 | article itemscope=true itemtype='http://schema.org/NewsArticle' 2 | header 3 | time itemprop='datePublished' datetime=article.date.iso8601 = article.date.as_date 4 | - if article.has_image? 5 | = image_tag article.image.file.mini_thumb.url, :alt => article.image.title, :itemprop => 'image' 6 | h4 itemprop='headline' 7 | = link_to article.title, "/news/show/#{article.slug}" 8 | - if article.info.present? 9 | .description itemprop='description' 10 | = engine_render(article.info) 11 | -------------------------------------------------------------------------------- /admin/views/layouts/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-layouts action=url(:layouts, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :id) 9 | th= mat(:object, :title) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td= mk_checkbox object 14 | td= link_to object.id, url(:layouts, :edit, :id => object.id) 15 | td= mk_edit object 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /app/views/elements/CatNode/view.slim: -------------------------------------------------------------------------------- 1 | - node = @node 2 | .article 3 | h4= node.title 4 | .text= engine_render( node.text ) 5 | dl 6 | - node.cat_card.json.each do |key, value| 7 | - unless node.json[key].blank? 8 | - if value[0] == 'assets' 9 | dt= key 10 | dd 11 | - node.json[key].each do |asset_id| 12 | - asset = Asset.get(asset_id) 13 | - next unless asset 14 | = show_asset asset 15 | br 16 | - else 17 | dt= key 18 | dd= node.json[key] 19 | -------------------------------------------------------------------------------- /admin/views/options/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-options action=url(:options, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :id) 9 | th= mat(:object, :title) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td.last= mk_checkbox object 14 | td= link_to object.id, url(:options, :edit, :id => object.id) 15 | td= object.title 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /admin/views/elements/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-elements action=url(:elements, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table 5 | thead 6 | tr 7 | th.first 8 | th= mat(:object, :id) 9 | th= mat(:object, :title) 10 | tbody 11 | - @objects.each do |object| 12 | tr 13 | td.last= mk_checkbox object 14 | td= link_to object.id, url(:elements, :edit, :id => object.id) 15 | td= object.title 16 | = partial 'base/index_operations_bottom' 17 | -------------------------------------------------------------------------------- /admin/views/dialogs/pick_images.slim: -------------------------------------------------------------------------------- 1 | .dialog-images 2 | - tabs = current_account.get_folders.with(:images).all( :order => :created_at.desc ).to_a 3 | = mk_group_selector Image, Folder, params, :with => :images, :instance => 'for-bonds' 4 | .tab-content 5 | - @first = true 6 | - tabs.each do |folder| 7 | - if @first 8 | - klass = 'active' 9 | - @first = false 10 | - else 11 | - klass = '' 12 | .tab-pane id="images-#{folder.id}" class=klass 13 | .tab-pane#images-all 14 | javascript: 15 | bindCustomFilter('#DataTables_Table_0_group_folder', "images"); 16 | -------------------------------------------------------------------------------- /admin/views/pages/index.slim: -------------------------------------------------------------------------------- 1 | = partial 'base/index_operations' 2 | form.inner.multiple#multiple-pages action=url(:pages, :index)/:multiple method=:post 3 | = csrf_token_field 4 | table.table.smart 5 | thead 6 | tr 7 | th.first 8 | th data={ :search => 1 } = mat(:object, :title) 9 | th data={ :search => 1 } = mat(:object, :slug) 10 | th data={ :search => 1 } = mat(:object, :path) 11 | th= mat(:object, :fragment) 12 | tbody 13 | - @k = 0 14 | = partial 'pages/tree', :locals => { :tree => @tree, :level => 0 } 15 | = partial 'base/index_operations_bottom' 16 | -------------------------------------------------------------------------------- /app/views/elements/Block/core.rb: -------------------------------------------------------------------------------- 1 | block = Block.by_slug @args[0] 2 | throw :output, "[Block ##{@args[0]} missing]" unless block 3 | @text = 4 | case 5 | when Block::Types[block.type] == :html 6 | # this ensures that tagged HTML content is brought directly to response body without escaping 7 | block.text.html_safe 8 | when Block::Types[block.type] == :table && !@identity[:class].index('notitle') 9 | block.text.gsub!(/