├── dev-requirements.txt ├── README.rst ├── .scss-lint.yml ├── ckanext ├── dadosgovbr │ ├── tests │ │ ├── __init__.py │ │ └── test_plugin.py │ ├── controllers │ │ ├── __init__.py │ │ ├── wordpress.py │ │ └── aplicativos.py │ ├── fanstatic │ │ ├── .gitignore │ │ ├── resource.config │ │ └── custom.js │ ├── templates │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── home │ │ │ ├── index.html │ │ │ ├── snippets │ │ │ │ ├── tags.html │ │ │ │ ├── featured_group.html │ │ │ │ └── latest_datasets.html │ │ │ └── layout1.html │ │ ├── package │ │ │ ├── read_base.html │ │ │ ├── snippets │ │ │ │ ├── tags.html │ │ │ │ ├── stages.html │ │ │ │ └── package_form.html │ │ │ ├── activity.html │ │ │ ├── edit.html │ │ │ ├── new.html │ │ │ ├── resource_read.html │ │ │ ├── group_list.html │ │ │ ├── base_form_page.html │ │ │ ├── read.html │ │ │ └── search.html │ │ ├── user │ │ │ ├── dashboard_datasets.html │ │ │ └── login.html │ │ ├── organization │ │ │ ├── bulk_process.html │ │ │ ├── snippets │ │ │ │ └── helper.html │ │ │ └── view_scheming_organization.html │ │ ├── scheming │ │ │ ├── form_snippets │ │ │ │ ├── large_text2.html │ │ │ │ └── upload2.html │ │ │ ├── aplicativo_modal.html │ │ │ ├── aplicativo_single.html │ │ │ ├── aplicativo │ │ │ │ ├── package_list.html │ │ │ │ ├── new.html │ │ │ │ ├── edit.html │ │ │ │ ├── read.html │ │ │ │ ├── read_base.html │ │ │ │ ├── package_item.html │ │ │ │ └── search.html │ │ │ ├── snippets │ │ │ │ └── additional_info.html │ │ │ ├── concurso │ │ │ │ ├── edit.html │ │ │ │ ├── new.html │ │ │ │ ├── read.html │ │ │ │ ├── read_base.html │ │ │ │ └── search.html │ │ │ ├── inventario │ │ │ │ ├── new.html │ │ │ │ ├── edit.html │ │ │ │ ├── read.html │ │ │ │ ├── read_base.html │ │ │ │ └── search.html │ │ │ ├── package │ │ │ │ └── read.html │ │ │ ├── concurso_search.html │ │ │ └── inventario_search.html │ │ ├── snippets │ │ │ ├── search_field.html │ │ │ ├── search_field_header.html │ │ │ ├── example_theme_most_popular_groups.html │ │ │ ├── organization_item.html │ │ │ └── search_result_text.html │ │ ├── test.html │ │ ├── wordpress │ │ │ ├── snippets │ │ │ │ └── latest_posts.html │ │ │ ├── page_single.html │ │ │ ├── post_single.html │ │ │ └── posts.html │ │ ├── group │ │ │ └── snippets │ │ │ │ └── group_item.html │ │ └── report │ │ │ └── view.html │ ├── public │ │ ├── .gitignore │ │ ├── sass │ │ │ ├── _r_desktop.scss │ │ │ ├── old │ │ │ │ ├── twitter_bootstrap │ │ │ │ │ ├── _grid.scss │ │ │ │ │ ├── _utilities.scss │ │ │ │ │ ├── _component-animations.scss │ │ │ │ │ ├── _close.scss │ │ │ │ │ ├── _wells.scss │ │ │ │ │ ├── _hero-unit.scss │ │ │ │ │ ├── _layouts.scss │ │ │ │ │ ├── _breadcrumbs.scss │ │ │ │ │ ├── _pager.scss │ │ │ │ │ ├── _accordion.scss │ │ │ │ │ ├── _scaffolding.scss │ │ │ │ │ ├── _thumbnails.scss │ │ │ │ │ ├── _labels.scss │ │ │ │ │ ├── _tooltip.scss │ │ │ │ │ ├── _pagination.scss │ │ │ │ │ ├── _popovers.scss │ │ │ │ │ ├── _code.scss │ │ │ │ │ ├── _alerts.scss │ │ │ │ │ ├── bootstrap.scss │ │ │ │ │ ├── _modals.scss │ │ │ │ │ ├── _progress-bars.scss │ │ │ │ │ ├── _carousel.scss │ │ │ │ │ ├── _dropdowns.scss │ │ │ │ │ ├── _variables.scss │ │ │ │ │ ├── _tables.scss │ │ │ │ │ └── _button-groups.scss │ │ │ │ └── _grid.scss │ │ │ ├── _pag_home.scss │ │ │ ├── _r_tablet.scss │ │ │ ├── _bugfix.scss │ │ │ └── _pag_wordpress.scss │ │ └── img │ │ │ ├── logo.png │ │ │ ├── brasil.png │ │ │ ├── brasil2.png │ │ │ ├── bg │ │ │ ├── .DS_Store │ │ │ ├── body-bg.jpg │ │ │ ├── busca.png │ │ │ ├── bg_boxes.png │ │ │ ├── bg_busca.png │ │ │ ├── bg_footer.jpg │ │ │ ├── bg_header.png │ │ │ ├── bts_redes.png │ │ │ ├── bg_boxes_fino.png │ │ │ ├── bg_boxes_head.jpg │ │ │ ├── bg_footer_fill.jpg │ │ │ ├── bg_header_over.png │ │ │ ├── logo.harlley.2.png │ │ │ ├── logo.harlley.3.png │ │ │ ├── bts_redes_brancos.png │ │ │ ├── barra-brasil-v3-azul.gif │ │ │ └── barra-brasil-v3-cinza.gif │ │ │ ├── bt │ │ │ ├── .DS_Store │ │ │ ├── bt_busca.png │ │ │ ├── bts_redes.png │ │ │ ├── bt_rede_rss.png │ │ │ ├── bt_rede_identica.png │ │ │ ├── bt_rede_twitter.png │ │ │ └── bts_redes_brancos.png │ │ │ ├── dadosgovbr.ico │ │ │ ├── logo-mono.png │ │ │ ├── no-image.png │ │ │ ├── favicon │ │ │ ├── favicon.ico │ │ │ ├── apple-icon.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── ms-icon-70x70.png │ │ │ ├── apple-icon-57x57.png │ │ │ ├── apple-icon-60x60.png │ │ │ ├── apple-icon-72x72.png │ │ │ ├── apple-icon-76x76.png │ │ │ ├── ms-icon-144x144.png │ │ │ ├── ms-icon-150x150.png │ │ │ ├── ms-icon-310x310.png │ │ │ ├── android-icon-36x36.png │ │ │ ├── android-icon-48x48.png │ │ │ ├── android-icon-72x72.png │ │ │ ├── android-icon-96x96.png │ │ │ ├── apple-icon-114x114.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-144x144.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-180x180.png │ │ │ ├── android-icon-144x144.png │ │ │ ├── android-icon-192x192.png │ │ │ ├── apple-icon-precomposed.png │ │ │ ├── browserconfig.xml │ │ │ └── manifest.json │ │ │ ├── app │ │ │ ├── geoleis110px.png │ │ │ ├── geoleis546px.png │ │ │ ├── willbot110px.jpg │ │ │ ├── willbot546px.png │ │ │ ├── acidentes110px.png │ │ │ ├── acidentes250px.png │ │ │ ├── acidentes546px.png │ │ │ ├── basometro110px.png │ │ │ ├── basometro546px.png │ │ │ ├── falacamara110px.png │ │ │ ├── falacamara546px.png │ │ │ ├── meudinheiro110px.png │ │ │ ├── meudinheiro250px.png │ │ │ ├── meudinheiro546px.png │ │ │ ├── olhoneles110px.png │ │ │ ├── olhoneles546px.png │ │ │ ├── pro-analise110px.png │ │ │ ├── pro-analise546px.png │ │ │ ├── vereadores110px.png │ │ │ ├── vereadores546px.png │ │ │ ├── wikicamara110px.png │ │ │ ├── wikicamara546px.png │ │ │ ├── camaravisual110px.png │ │ │ ├── camaravisual546px.png │ │ │ ├── fornecedores110px.png │ │ │ ├── fornecedores250px.png │ │ │ ├── fornecedores546px.png │ │ │ ├── ondeacontece110px.png │ │ │ ├── ondeacontece250px.png │ │ │ ├── ondeacontece546px.png │ │ │ ├── reputacao-sa110px.png │ │ │ ├── reputacao-sa546px.png │ │ │ ├── aeroportosbrasil110px.png │ │ │ ├── aeroportosbrasil546px.png │ │ │ ├── radarparlamentar110px.png │ │ │ ├── radarparlamentar546px.png │ │ │ ├── reclamacoes-br110px.jpg │ │ │ ├── reclamacoes-br546px.png │ │ │ ├── dashboardobraspac110px.png │ │ │ ├── dashboardobraspac546px.png │ │ │ ├── reclamacoes-procon110px.png │ │ │ └── reclamacoes-procon546px.png │ │ │ ├── acesso-a-informacao.png │ │ │ └── acesso-a-informacao2.png │ ├── __init__.py │ ├── helpers │ │ ├── __init__.py │ │ └── scheming.py │ ├── newssection_plugin.py │ ├── theme.py │ └── dataset_plugin.py └── __init__.py ├── pip-requirements.txt ├── .coveragerc ├── MANIFEST.in ├── docs └── dadosgovbr-logo │ ├── dadosgovbr-logo.png │ ├── dadosgovbr-logo-dark.png │ ├── dadosgovbr-logo-light.png │ └── dadosgovbr-logo-border.png ├── .vscode └── tasks.json ├── .travis.yml ├── y.pub ├── setup.cfg ├── test.ini ├── .gitignore ├── bin ├── travis-run.sh └── travis-build.bash ├── gulpfile.js ├── y ├── README.md └── setup.py /dev-requirements.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Check README.md -------------------------------------------------------------------------------- /.scss-lint.yml: -------------------------------------------------------------------------------- 1 | scss_files: "**/*.scss" -------------------------------------------------------------------------------- /ckanext/dadosgovbr/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/fanstatic/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/.gitignore: -------------------------------------------------------------------------------- 1 | sass/.sass-cache 2 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/_r_desktop.scss: -------------------------------------------------------------------------------- 1 | // main: extra.scss 2 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/fanstatic/resource.config: -------------------------------------------------------------------------------- 1 | [main] 2 | 3 | force_top = custom.js 4 | -------------------------------------------------------------------------------- /pip-requirements.txt: -------------------------------------------------------------------------------- 1 | urllib3[secure] 2 | certifi 3 | pyOpenSSL 4 | cryptography 5 | idna -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [report] 2 | omit = 3 | */site-packages/* 4 | */python?.?/* 5 | ckan/* -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | recursive-include ckanext/dadosabertos *.html *.json *.js *.less *.css *.mo -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/__init__.py: -------------------------------------------------------------------------------- 1 | # empty file needed for pylons to find templates in this directory 2 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/home/index.html: -------------------------------------------------------------------------------- 1 | {% ckan_extends %} 2 | 3 | {% block content %} 4 | {{ super() }} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/logo.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/brasil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/brasil.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/brasil2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/brasil2.png -------------------------------------------------------------------------------- /docs/dadosgovbr-logo/dadosgovbr-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/docs/dadosgovbr-logo/dadosgovbr-logo.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/.DS_Store -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/body-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/body-bg.jpg -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/busca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/busca.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/.DS_Store -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/dadosgovbr.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/dadosgovbr.ico -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/logo-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/logo-mono.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/no-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/no-image.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/tests/test_plugin.py: -------------------------------------------------------------------------------- 1 | """Tests for plugin.py.""" 2 | import ckanext.dadosgovbr.plugin as plugin 3 | 4 | def test_plugin(): 5 | pass -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_boxes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_boxes.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_busca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_busca.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_footer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_footer.jpg -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_header.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bts_redes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bts_redes.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/bt_busca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/bt_busca.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/bts_redes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/bts_redes.png -------------------------------------------------------------------------------- /docs/dadosgovbr-logo/dadosgovbr-logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/docs/dadosgovbr-logo/dadosgovbr-logo-dark.png -------------------------------------------------------------------------------- /docs/dadosgovbr-logo/dadosgovbr-logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/docs/dadosgovbr-logo/dadosgovbr-logo-light.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/bt_rede_rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/bt_rede_rss.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/favicon.ico -------------------------------------------------------------------------------- /docs/dadosgovbr-logo/dadosgovbr-logo-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/docs/dadosgovbr-logo/dadosgovbr-logo-border.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/geoleis110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/geoleis110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/geoleis546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/geoleis546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/willbot110px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/willbot110px.jpg -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/willbot546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/willbot546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_boxes_fino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_boxes_fino.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_boxes_head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_boxes_head.jpg -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_footer_fill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_footer_fill.jpg -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bg_header_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bg_header_over.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/logo.harlley.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/logo.harlley.2.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/logo.harlley.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/logo.harlley.3.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/acesso-a-informacao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/acesso-a-informacao.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/acesso-a-informacao2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/acesso-a-informacao2.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/acidentes110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/acidentes110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/acidentes250px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/acidentes250px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/acidentes546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/acidentes546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/basometro110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/basometro110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/basometro546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/basometro546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/falacamara110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/falacamara110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/falacamara546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/falacamara546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/meudinheiro110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/meudinheiro110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/meudinheiro250px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/meudinheiro250px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/meudinheiro546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/meudinheiro546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/olhoneles110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/olhoneles110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/olhoneles546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/olhoneles546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/pro-analise110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/pro-analise110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/pro-analise546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/pro-analise546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/vereadores110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/vereadores110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/vereadores546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/vereadores546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/wikicamara110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/wikicamara110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/wikicamara546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/wikicamara546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/bts_redes_brancos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/bts_redes_brancos.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/bt_rede_identica.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/bt_rede_identica.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/bt_rede_twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/bt_rede_twitter.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bt/bts_redes_brancos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bt/bts_redes_brancos.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/camaravisual110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/camaravisual110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/camaravisual546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/camaravisual546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/fornecedores110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/fornecedores110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/fornecedores250px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/fornecedores250px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/fornecedores546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/fornecedores546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/ondeacontece110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/ondeacontece110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/ondeacontece250px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/ondeacontece250px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/ondeacontece546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/ondeacontece546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/reputacao-sa110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/reputacao-sa110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/reputacao-sa546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/reputacao-sa546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/aeroportosbrasil110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/aeroportosbrasil110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/aeroportosbrasil546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/aeroportosbrasil546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/radarparlamentar110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/radarparlamentar110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/radarparlamentar546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/radarparlamentar546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/reclamacoes-br110px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/reclamacoes-br110px.jpg -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/reclamacoes-br546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/reclamacoes-br546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/barra-brasil-v3-azul.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/barra-brasil-v3-azul.gif -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/bg/barra-brasil-v3-cinza.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/bg/barra-brasil-v3-cinza.gif -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/dashboardobraspac110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/dashboardobraspac110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/dashboardobraspac546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/dashboardobraspac546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/reclamacoes-procon110px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/reclamacoes-procon110px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/app/reclamacoes-procon546px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/app/reclamacoes-procon546px.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadosgovbr/ckanext-dadosgovbr/HEAD/ckanext/dadosgovbr/public/img/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /ckanext/dadosgovbr/fanstatic/custom.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // Homepage - Latest Datasets snippet 3 | $("#latest-datasets tbody tr div.author").popover({ trigger: "hover focus", placement: "left" }); 4 | 5 | 6 | })(); 7 | -------------------------------------------------------------------------------- /ckanext/__init__.py: -------------------------------------------------------------------------------- 1 | # this is a namespace package 2 | try: 3 | import pkg_resources 4 | pkg_resources.declare_namespace(__name__) 5 | except ImportError: 6 | import pkgutil 7 | __path__ = pkgutil.extend_path(__path__, __name__) 8 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/__init__.py: -------------------------------------------------------------------------------- 1 | # this is a namespace package 2 | try: 3 | import pkg_resources 4 | pkg_resources.declare_namespace(__name__) 5 | except ImportError: 6 | import pkgutil 7 | __path__ = pkgutil.extend_path(__path__, __name__) 8 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/read_base.html: -------------------------------------------------------------------------------- 1 | {% ckan_extends %} 2 | 3 | {% block content_action %} 4 | {% if h.check_access('package_update', {'id':pkg.id }) and c.user %} 5 | {% link_for _('Manage'), controller='package', action='edit', id=pkg.name, class_='btn', icon='wrench' %} 6 | {% endif %} 7 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_grid.scss: -------------------------------------------------------------------------------- 1 | // GRID SYSTEM 2 | // ----------- 3 | 4 | // Fixed (940px) 5 | @include gridSystem-generate($gridColumns, $gridColumnWidth, $gridGutterWidth); 6 | 7 | // Fluid (940px) 8 | @include fluidGridSystem-generate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth); 9 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "command": "gulp", 4 | "isShellCommand": true, 5 | "tasks": [ 6 | { 7 | "taskName": "compile-scss", 8 | "isBuildCommand": true, 9 | "showOutput": "silent", 10 | "isBackground": true 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: required 3 | language: python 4 | python: 5 | - "2.7" 6 | env: 7 | - CKANVERSION=2.6 8 | services: 9 | - redis-server 10 | install: 11 | - bash bin/travis-build.bash 12 | script: sh bin/travis-run.sh 13 | notifications: 14 | email: false 15 | irc: 16 | - "chat.freenode.net#dadosgovbr" 17 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/user/dashboard_datasets.html: -------------------------------------------------------------------------------- 1 | {% ckan_extends %} 2 | 3 | {% block page_primary_action %} 4 | {% if h.check_access('package_create') %} 5 | 6 | Adicionar conjunto de dados 7 | 8 | {% endif %} 9 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/organization/bulk_process.html: -------------------------------------------------------------------------------- 1 | {% ckan_extends %} 2 | 3 | {% block page_primary_action %} 4 | {% if h.check_access('package_create') %} 5 | 6 | Adicionar conjunto de dados 7 | 8 | {% endif %} 9 | {% endblock %} -------------------------------------------------------------------------------- /y.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDEy4Yd8slyLY030oeWJAs7cAGxv/bIrl7LgtEr+edHh/a5rJzVeXTdm6TJ1NYEhi7jWrGuQrDREVyMui0IOSS/7k9VXgICpsFj+dVrXMXCX1+NoAtRaaSgWvrhnxBAntR5H6qn9d0QvS3/JCnTtwA4V5+si3wBqfeax8WoXopyS1xjLEoS8AVyeuX2AM3aqn0HIb9lUNKj5mLQz2QZhkBcRKGSs00yB+oHe759J6hWUbp4G4U0lrKeP5CAOv9ARzCvqIO4cRhZJUmVyc6DmGYBulycwbiPOuWohUD3kn4ouQG6cHyLGjbNp+L0HEeLFgGsFtBZiFRdb3v0ZlDa2vV root@ckan-dev 2 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_utilities.scss: -------------------------------------------------------------------------------- 1 | // UTILITY CLASSES 2 | // --------------- 3 | 4 | // Quick floats 5 | .pull-right { 6 | float: right; 7 | } 8 | .pull-left { 9 | float: left; 10 | } 11 | 12 | // Toggling content 13 | .hide { 14 | display: none; 15 | } 16 | .show { 17 | display: block; 18 | } 19 | 20 | // Visibility 21 | .invisible { 22 | visibility: hidden; 23 | } 24 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/_grid.scss: -------------------------------------------------------------------------------- 1 | @mixin container{ 2 | @include clearfix(); 3 | margin: 0 auto; 4 | } 5 | 6 | @mixin row(){ 7 | @include clearfix(); 8 | } 9 | @mixin column($column, $isLast: false){ 10 | @include gridSystem-gridColumn($gridGutterWidth); 11 | @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridColumnWidth, $column); 12 | @if $isLast { 13 | margin-right: 20px 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_component-animations.scss: -------------------------------------------------------------------------------- 1 | // COMPONENT ANIMATIONS 2 | // -------------------- 3 | 4 | .fade { 5 | @include transition(opacity .15s linear); 6 | opacity: 0; 7 | &.in { 8 | opacity: 1; 9 | } 10 | } 11 | 12 | .collapse { 13 | @include transition(height .35s ease); 14 | position:relative; 15 | overflow:hidden; 16 | height: 0; 17 | &.in { height: auto; } 18 | } 19 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/_pag_home.scss: -------------------------------------------------------------------------------- 1 | // Page: Home 2 | // ========================================================================== 3 | .homepage { 4 | // Snippet: Featured Groups 5 | #featureddata { 6 | .dataset-item { 7 | padding-bottom: 0; 8 | margin-bottom: 0; 9 | } 10 | } 11 | .group-list.module.module-narrow.module-shallow { 12 | .module-image { 13 | display: none; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_close.scss: -------------------------------------------------------------------------------- 1 | // CLOSE ICONS 2 | // ----------- 3 | 4 | .close { 5 | float: right; 6 | font-size: 20px; 7 | font-weight: bold; 8 | line-height: $baseLineHeight; 9 | color: $black; 10 | text-shadow: 0 1px 0 rgba(255,255,255,1); 11 | @include opacity(20); 12 | &:hover { 13 | color: $black; 14 | text-decoration: none; 15 | @include opacity(40); 16 | cursor: pointer; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_wells.scss: -------------------------------------------------------------------------------- 1 | // WELLS 2 | // ----- 3 | 4 | .well { 5 | min-height: 20px; 6 | padding: 19px; 7 | margin-bottom: 20px; 8 | background-color: #f5f5f5; 9 | border: 1px solid #eee; 10 | border: 1px solid rgba(0,0,0,.05); 11 | @include border-radius(4px); 12 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 13 | blockquote { 14 | border-color: #ddd; 15 | border-color: rgba(0,0,0,.15); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_hero-unit.scss: -------------------------------------------------------------------------------- 1 | // HERO UNIT 2 | // --------- 3 | 4 | .hero-unit { 5 | padding: 60px; 6 | margin-bottom: 30px; 7 | background-color: #f5f5f5; 8 | @include border-radius(6px); 9 | h1 { 10 | margin-bottom: 0; 11 | font-size: 60px; 12 | line-height: 1; 13 | letter-spacing: -1px; 14 | } 15 | p { 16 | font-size: 18px; 17 | font-weight: 200; 18 | line-height: $baseLineHeight * 1.5; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/organization/snippets/helper.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 4 | {{ _('What are Organizations?') }} 5 |

6 |
7 |

8 | {% trans %} 9 | Organizações são os órgãos, autarquias, ou entidades da Administração Pública que disponibilizam dados em formato aberto. 10 | {% endtrans %} 11 |

12 |
13 |
-------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_layouts.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Layouts 3 | // Fixed-width and fluid (with sidebar) layouts 4 | // -------------------------------------------- 5 | 6 | 7 | // Container (centered, fixed-width layouts) 8 | .container { 9 | @include container-fixed(); 10 | } 11 | 12 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 13 | .container-fluid { 14 | padding-left: $gridGutterWidth; 15 | padding-right: $gridGutterWidth; 16 | @include clearfix(); 17 | } 18 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [extract_messages] 2 | keywords = translate isPlural 3 | add_comments = TRANSLATORS: 4 | output_file = i18n/ckanext-dadosgovbr.pot 5 | width = 80 6 | 7 | [init_catalog] 8 | domain = ckanext-dadosgovbr 9 | input_file = i18n/ckanext-dadosgovbr.pot 10 | output_dir = i18n 11 | 12 | [update_catalog] 13 | domain = ckanext-dadosgovbr 14 | input_file = i18n/ckanext-dadosgovbr.pot 15 | output_dir = i18n 16 | previous = true 17 | 18 | [compile_catalog] 19 | domain = ckanext-dadosgovbr 20 | directory = i18n 21 | statistics = true -------------------------------------------------------------------------------- /ckanext/dadosgovbr/helpers/__init__.py: -------------------------------------------------------------------------------- 1 | # this is a namespace package 2 | try: 3 | import pkg_resources 4 | pkg_resources.declare_namespace(__name__) 5 | 6 | # Import all helpers modules 7 | import os 8 | for module in os.listdir(os.path.dirname(__file__)): 9 | if module == '__init__.py' or module[-3:] != '.py': 10 | continue 11 | __import__(module[:-3], locals(), globals()) 12 | del module 13 | except ImportError: 14 | import pkgutil 15 | __path__ = pkgutil.extend_path(__path__, __name__) 16 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | // BREADCRUMBS 2 | // ----------- 3 | 4 | .breadcrumb { 5 | padding: 7px 14px; 6 | margin: 0 0 $baseLineHeight; 7 | @include gradient-vertical($white, #f5f5f5); 8 | border: 1px solid #ddd; 9 | @include border-radius(3px); 10 | @include box-shadow(inset 0 1px 0 $white); 11 | li { 12 | display: inline-block; 13 | text-shadow: 0 1px 0 $white; 14 | } 15 | .divider { 16 | padding: 0 5px; 17 | color: $grayLight; 18 | } 19 | .active a { 20 | color: $grayDark; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/snippets/tags.html: -------------------------------------------------------------------------------- 1 | {% if tags %} 2 |
3 | {% snippet 'snippets/tag_list.html', tags=tags, _class='tag-list well' %} 4 |
5 | 6 | 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_pager.scss: -------------------------------------------------------------------------------- 1 | // PAGER 2 | // ----- 3 | 4 | .pager { 5 | margin-left: 0; 6 | margin-bottom: $baseLineHeight; 7 | list-style: none; 8 | text-align: center; 9 | @include clearfix(); 10 | } 11 | .pager li { 12 | display: inline; 13 | } 14 | .pager a { 15 | display: inline-block; 16 | padding: 5px 14px; 17 | background-color: #fff; 18 | border: 1px solid #ddd; 19 | @include border-radius(15px); 20 | } 21 | .pager a:hover { 22 | text-decoration: none; 23 | background-color: #f5f5f5; 24 | } 25 | .pager .next a { 26 | float: right; 27 | } 28 | .pager .previous a { 29 | float: left; 30 | } 31 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/home/snippets/tags.html: -------------------------------------------------------------------------------- 1 | {% set tags = h.get_facet_items_dict('tags', limit=20) %} 2 | 3 |
4 |
5 |
6 |

Dados por etiqueta

7 |
8 |
9 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/newssection_plugin.py: -------------------------------------------------------------------------------- 1 | import os 2 | from ckan.plugins import implements, SingletonPlugin 3 | from ckan.plugins import IRoutes 4 | 5 | class DadosGovBrNewsSection(SingletonPlugin): 6 | '''The feed reader for the dados.gov.br site. 7 | 8 | Uses CKAN's IRoutes plugin interface to call the feed reader feature from this plugin 9 | package. 10 | 11 | ''' 12 | implements(IRoutes, inherit=True) 13 | 14 | def before_map(self, map): 15 | map.connect('home', '/', 16 | controller='ckanext.dadosgovbr.controllers.home:DadosGovBrHomeController', 17 | action='index') 18 | return map 19 | 20 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/form_snippets/large_text2.html: -------------------------------------------------------------------------------- 1 | {% import 'macros/form.html' as form %} 2 | 3 | {% call form.input( 4 | field.field_name, 5 | id='field-' + field.field_name, 6 | label=h.scheming_language_text(field.label), 7 | placeholder=h.scheming_language_text(field.form_placeholder), 8 | value=data[field.field_name], 9 | error=errors[field.field_name], 10 | classes=['control-full', 'control-large'], 11 | attrs=field.form_attrs if 'form_attrs' in field else {}, 12 | is_required=h.scheming_field_required(field) 13 | ) 14 | %} 15 | {%- snippet 'scheming/form_snippets/help_text.html', field=field -%} 16 | {% endcall %} 17 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/activity.html: -------------------------------------------------------------------------------- 1 | {% extends "package/read_base.html" %} 2 | 3 | {% block subtitle %}{{ _('Activity Stream') }} - {{ super() }}{% endblock %} 4 | 5 | {% block breadcrumb_content %} 6 |
  • {{h.dadosgovbr_get_schema_title(c.pkg_dict.type, plural=True).title()}}
  • 7 |
  • {{c.pkg_dict.title}}
  • 8 | {% endblock %} 9 | 10 | {% block primary_content_inner %} 11 |

    {% block page_heading %}{{ _('Activity Stream') }}{% endblock %}

    12 | {% block activity_stream %} 13 | {{ c.package_activity_stream | safe }} 14 | {% endblock %} 15 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_accordion.scss: -------------------------------------------------------------------------------- 1 | // ACCORDION 2 | // --------- 3 | 4 | 5 | // Parent container 6 | .accordion { 7 | margin-bottom: $baseLineHeight; 8 | } 9 | 10 | // Group == heading + body 11 | .accordion-group { 12 | margin-bottom: 2px; 13 | border: 1px solid #e5e5e5; 14 | @include border-radius(4px); 15 | } 16 | .accordion-heading { 17 | border-bottom: 0; 18 | } 19 | .accordion-heading .accordion-toggle { 20 | display: block; 21 | padding: 8px 15px; 22 | } 23 | 24 | // Inner needs the styles because you can't animate properly with any styles on the element 25 | .accordion-inner { 26 | padding: 9px 15px; 27 | border-top: 1px solid #e5e5e5; 28 | } 29 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_scaffolding.scss: -------------------------------------------------------------------------------- 1 | // Scaffolding 2 | // Basic and global styles for generating a grid system, structural layout, and page templates 3 | // ------------------------------------------------------------------------------------------- 4 | 5 | 6 | // STRUCTURAL LAYOUT 7 | // ----------------- 8 | 9 | .clearfix { 10 | @include clearfix(); 11 | } 12 | 13 | body { 14 | margin: 0; 15 | font-family: $baseFontFamily; 16 | font-size: $baseFontSize; 17 | line-height: $baseLineHeight; 18 | color: $textColor; 19 | background-color: $white; 20 | } 21 | 22 | 23 | // LINKS 24 | // ----- 25 | 26 | a { 27 | color: $linkColor; 28 | text-decoration: none; 29 | } 30 | a:hover { 31 | color: $linkColorHover; 32 | text-decoration: underline; 33 | } 34 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/snippets/search_field.html: -------------------------------------------------------------------------------- 1 | {# Renders a search form #} 2 | 3 | 8 | 9 | 10 | {# 11 | {% set groups_popular = h.dadosgovbr_most_popular_groups() %} 12 | 13 | {% for group in groups_popular %} 14 |
    15 | {% snippet 'snippets/group_item.html', group=group, truncate=50, truncate_title=35 %} 16 |
    17 | {% endfor %} 18 | #} 19 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/home/layout1.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |
    5 | {% snippet 'snippets/search_field.html' %} 6 | 7 | {% snippet 'home/snippets/featured_group.html' %} 8 |
    9 |
    10 | {% snippet 'home/snippets/latest_datasets.html' %} 11 |
    12 |
    13 |
    14 |
    15 | 16 |
    17 | 18 |
    19 |
    20 |
    21 | {# Get "Noticias" from Wordpress #} 22 | {% snippet 'wordpress/snippets/latest_posts.html' %} 23 |
    24 |
    25 | {% snippet 'home/snippets/tags.html' %} 26 |
    27 |
    28 |
    29 |
    30 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo_modal.html: -------------------------------------------------------------------------------- 1 | {% set pkg = c.app_dict %} 2 | 3 |
    4 |
    5 | {{pkg.title|safe}} 6 |
    7 |
    8 |

    {{pkg.author_name|safe}}

    9 |

    Gratuito: {{pkg.is_free|safe}}

    10 |

    Código aberto: {{pkg.is_opensource|safe}}

    11 |

    {{pkg.url|safe}}

    12 |
    13 |
    14 | {{pkg.description|safe}} 15 |
    16 |
    -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_thumbnails.scss: -------------------------------------------------------------------------------- 1 | // THUMBNAILS 2 | // ---------- 3 | 4 | .thumbnails { 5 | margin-left: -$gridGutterWidth; 6 | list-style: none; 7 | @include clearfix(); 8 | } 9 | .thumbnails > li { 10 | float: left; 11 | margin: 0 0 $baseLineHeight $gridGutterWidth; 12 | } 13 | .thumbnail { 14 | display: block; 15 | padding: 4px; 16 | line-height: 1; 17 | border: 1px solid #ddd; 18 | @include border-radius(4px); 19 | @include box-shadow(0 1px 1px rgba(0,0,0,.075)); 20 | } 21 | // Add a hover state for linked versions only 22 | a.thumbnail:hover { 23 | border-color: $linkColor; 24 | @include box-shadow(0 1px 4px rgba(0,105,214,.25)); 25 | } 26 | // Images and captions 27 | .thumbnail > img { 28 | display: block; 29 | max-width: 100%; 30 | margin-left: auto; 31 | margin-right: auto; 32 | } 33 | .thumbnail .caption { 34 | padding: 9px; 35 | } 36 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo_single.html: -------------------------------------------------------------------------------- 1 | {% set pkg = c.app_dict %} 2 | 3 |
    4 |
    5 | {{pkg.title|safe}} 6 |
    7 |
    8 | {{pkg.author_name|safe}} 9 |
    10 |
    11 | {{pkg.description|safe}} 12 |
    13 |
    14 | 15 |
    16 | {% block package_additional_info %} 17 | {% snippet "package/snippets/additional_info.html", pkg_dict=pkg %} 18 | {% endblock %} 19 |
    20 | 21 | Informações do aplicativo aqui...
    22 | {{pkg.title|safe}} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/_r_tablet.scss: -------------------------------------------------------------------------------- 1 | // main: extra.scss 2 | 3 | @media (max-width: 980px) { 4 | // Bloco de busca da homepage 5 | // ========================================================================== 6 | body div[role='main'] form#search { 7 | margin: -3px -2px 16px; 8 | width: initial; 9 | 10 | #busca { 11 | width: 74%; 12 | } 13 | p { 14 | padding: 10px 5px 0; 15 | } 16 | } 17 | 18 | #accessibility { 19 | width: 380px; 20 | } 21 | 22 | 23 | // Rodapé 24 | // ========================================================================== 25 | .footer.outer footer { 26 | padding: 15px 30px 25px; 27 | width: 100%; 28 | 29 | a { 30 | font-size: 12px; 31 | } 32 | 33 | h3 { 34 | margin-bottom: 4px; 35 | margin-top: 24px; 36 | } 37 | 38 | .attribution { 39 | display: none; 40 | } 41 | } // END rodapé 42 | } 43 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/img/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Portal Brasileiro de Dados Abertos", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /test.ini: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | debug = false 3 | smtp_server = localhost 4 | error_email_from = paste@localhost 5 | 6 | [server:main] 7 | use = egg:Paste#http 8 | host = 0.0.0.0 9 | port = 5000 10 | 11 | [app:main] 12 | use = config:../ckan/test-core.ini 13 | 14 | # Insert any custom config settings to be used when running your extension's 15 | # tests here. 16 | 17 | 18 | # Logging configuration 19 | [loggers] 20 | keys = root, ckan, sqlalchemy 21 | 22 | [handlers] 23 | keys = console 24 | 25 | [formatters] 26 | keys = generic 27 | 28 | [logger_root] 29 | level = WARN 30 | handlers = console 31 | 32 | [logger_ckan] 33 | qualname = ckan 34 | handlers = 35 | level = INFO 36 | 37 | [logger_sqlalchemy] 38 | handlers = 39 | qualname = sqlalchemy.engine 40 | level = WARN 41 | 42 | [handler_console] 43 | class = StreamHandler 44 | args = (sys.stdout,) 45 | level = NOTSET 46 | formatter = generic 47 | 48 | [formatter_generic] 49 | format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .ropeproject 2 | node_modules 3 | bower_components 4 | 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | *.pyc 9 | 10 | # C extensions 11 | *.so 12 | 13 | # Distribution / packaging 14 | .Python 15 | env/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | sdist/ 20 | *.egg-info/ 21 | .installed.cfg 22 | *.egg 23 | 24 | # PyInstaller 25 | # Usually these files are written by a python script from a template 26 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 27 | *.manifest 28 | *.spec 29 | 30 | # Installer logs 31 | pip-log.txt 32 | pip-delete-this-directory.txt 33 | 34 | # Unit test / coverage reports 35 | htmlcov/ 36 | .tox/ 37 | .coverage 38 | .cache 39 | nosetests.xml 40 | coverage.xml 41 | 42 | # Sphinx documentation 43 | docs/_build/ 44 | 45 | # Replicated files 46 | ckanext-dadosgovbr/ 47 | 48 | # ATOM IDE 49 | .ftpconfig 50 | .remote-sync.json 51 | 52 | # Pylons / Python 53 | ckanext_dadosgovbr.egg-info/* 54 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/edit.html: -------------------------------------------------------------------------------- 1 | {# Scheming pages #} 2 | {% set pkg = c.pkg_dict %} 3 | {% if pkg.type == 'aplicativo' %} 4 | {% snippet "scheming/aplicativo/edit.html", pkg=pkg, form_vars=form_vars, form_snippet=form_snippet %} 5 | {% elif pkg.type == 'concurso' %} 6 | {% snippet "scheming/concurso/edit.html", pkg=pkg, form_vars=form_vars, form_snippet=form_snippet %} 7 | {% elif pkg.type == 'inventario' %} 8 | {% snippet "scheming/inventario/edit.html", pkg=pkg, form_vars=form_vars, form_snippet=form_snippet %} 9 | 10 | 11 | {# Default CKAN package #} 12 | {% else %} 13 | {% extends 'package/edit_base.html' %} 14 | {% block primary_content_inner %} 15 | {% block form %} 16 | {#- passing c to a snippet is bad but is required here 17 | for backwards compatibility with old templates and 18 | plugins using setup_template_variables() -#} 19 | {{- h.snippet(form_snippet, c=c, **form_vars) -}} 20 | {% endblock %} 21 | {% endblock %} 22 | {% endif %} 23 | 24 | 25 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/form_snippets/upload2.html: -------------------------------------------------------------------------------- 1 | {% import 'macros/form.html' as form %} 2 | 3 | {% if c.action == 'new_resource' %} 4 | {% set input_value = '' %} 5 | {% elif c.action == 'resource_edit' %} 6 | {% set input_value = data['url'] %} 7 | {% elif data.image %} 8 | {% set input_value = data.image %} 9 | {% else %} 10 | {# {% set input_value = 'domain/img/no-image.png'.replace('domain', g.site_url) %} #} 11 | {% set input_value = '' %} 12 | {% endif %} 13 | 14 | {% call form.input( 15 | field.field_name, 16 | id='field-' + field.field_name, 17 | label=h.scheming_language_text(field.label), 18 | placeholder=h.scheming_language_text(field.form_placeholder), 19 | value=input_value, 20 | error=errors[field.field_name], 21 | classes=['control-medium'], 22 | attrs=field.form_attrs if 'form_attrs' in field else {}, 23 | is_required=0 24 | ) 25 | %} 26 | {%- snippet 'scheming/form_snippets/help_text.html', field=field -%} 27 | {% endcall %} 28 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/new.html: -------------------------------------------------------------------------------- 1 | {# Scheming pages #} 2 | {% set pkg_type = h.dadosgovbr_get_schema_name() %} 3 | {% if pkg_type == 'aplicativo' %} 4 | {% snippet "scheming/aplicativo/new.html", pkg=pkg, form_vars=form_vars, form_snippet=form_snippet %} 5 | {% elif pkg_type == 'concurso' %} 6 | {% snippet "scheming/concurso/new.html", pkg=pkg, form_vars=form_vars, form_snippet=form_snippet %} 7 | {% elif pkg_type == 'inventario' %} 8 | {% snippet "scheming/inventario/new.html", pkg=pkg, form_vars=form_vars, form_snippet=form_snippet %} 9 | 10 | 11 | {# Default CKAN package #} 12 | {% else %} 13 | {% if not h.organizations_available('create_dataset') 14 | and not h.check_config_permission('ckan.auth.create_unowned_dataset') %} 15 | 16 | {% include "package/snippets/cannot_create_package.html" %} 17 | 18 | {% else %} 19 | {% extends "package/base_form_page.html" %} 20 | 21 | {% block subtitle %}{{ _('Create Dataset') }}{% endblock %} 22 | {% endif %} 23 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_labels.scss: -------------------------------------------------------------------------------- 1 | // LABELS 2 | // ------ 3 | 4 | // Base 5 | .label { 6 | padding: 2px 4px 3px; 7 | font-size: $baseFontSize * .85; 8 | font-weight: bold; 9 | color: $white; 10 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 11 | background-color: $grayLight; 12 | @include border-radius(3px); 13 | } 14 | 15 | // Hover state 16 | .label:hover { 17 | color: $white; 18 | text-decoration: none; 19 | } 20 | 21 | // Colors 22 | .label-important { background-color: $errorText; } 23 | .label-important:hover { background-color: darken($errorText, 10%); } 24 | 25 | .label-warning { background-color: $orange; } 26 | .label-warning:hover { background-color: darken($orange, 10%); } 27 | 28 | .label-success { background-color: $successText; } 29 | .label-success:hover { background-color: darken($successText, 10%); } 30 | 31 | .label-info { background-color: $infoText; } 32 | .label-info:hover { background-color: darken($infoText, 10%); } 33 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_tooltip.scss: -------------------------------------------------------------------------------- 1 | // TOOLTIP 2 | // ------- 3 | 4 | .tooltip { 5 | position: absolute; 6 | z-index: $zindexTooltip; 7 | display: block; 8 | visibility: visible; 9 | padding: 5px; 10 | font-size: 11px; 11 | @include opacity(0); 12 | &.in { @include opacity(80); } 13 | &.top { margin-top: -2px; } 14 | &.right { margin-left: 2px; } 15 | &.bottom { margin-top: 2px; } 16 | &.left { margin-left: -2px; } 17 | &.top .tooltip-arrow { @include popoverArrow-top(); } 18 | &.left .tooltip-arrow { @include popoverArrow-left(); } 19 | &.bottom .tooltip-arrow { @include popoverArrow-bottom(); } 20 | &.right .tooltip-arrow { @include popoverArrow-right(); } 21 | } 22 | .tooltip-inner { 23 | max-width: 200px; 24 | padding: 3px 8px; 25 | color: $white; 26 | text-align: center; 27 | text-decoration: none; 28 | background-color: $black; 29 | @include border-radius(4px); 30 | } 31 | .tooltip-arrow { 32 | position: absolute; 33 | width: 0; 34 | height: 0; 35 | } 36 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/organization/view_scheming_organization.html: -------------------------------------------------------------------------------- 1 | {% extends "organization/read.html" %} 2 | 3 | {# {% block breadcrumb_content %} 4 |
  • Organizações
  • 5 |
  • Parte 2 ativa
  • 6 | {% endblock %} #} 7 | 8 | {% block content_primary_nav %} 9 |   
  • 10 | Conjuntos de dados 11 |
  • 12 |
  • 13 | Aplicativos 14 |
  • 15 |
  • 16 | Concursos 17 |
  • 18 |   {{ h.build_nav_icon('organization_activity', _('Activity Stream'), id=c.group_dict.name, offset=0) }} 19 |   {{ h.build_nav_icon('organization_about', _('About'), id=c.group_dict.name) }} 20 | {% endblock %} 21 | 22 | {% block page_primary_action %} 23 | {% if h.check_access('package_create') %} 24 | {% endif %} 25 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/snippets/search_field_header.html: -------------------------------------------------------------------------------- 1 | {% import 'macros/form.html' as form %} 2 | 3 | {% set placeholder = placeholder if placeholder else _('Search datasets...') %} 4 | 5 | 6 |
    7 | {% block search_input %} 8 |
    9 | 10 | {% block search_input_button %} 11 | 15 | {% endblock %} 16 |
    17 | {% endblock %} 18 | 19 | {% block search_search_fields %} 20 | {% if fields -%} 21 | {{ form.hidden_from_list(fields=fields) }} 22 | {%- endif %} 23 | {% endblock %} 24 |
    25 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/package_list.html: -------------------------------------------------------------------------------- 1 | {# 2 | Displays a list of datasets. 3 | 4 | packages - A list of packages to display. 5 | list_class - The class name for the list item. 6 | item_class - The class name to use on each item. 7 | hide_resources - If true hides the resources (default: false). 8 | banner - If true displays a popular banner (default: false). 9 | truncate - The length to trucate the description to (default: 180) 10 | truncate_title - The length to truncate the title to (default: 80). 11 | 12 | Example: 13 | 14 | {% snippet 'snippets/package_list.html', packages=c.datasets %} 15 | 16 | #} 17 | {% block package_list %} 18 | {% if packages %} 19 | 26 | {% endif %} 27 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/resource_read.html: -------------------------------------------------------------------------------- 1 | {% ckan_extends %} 2 | 3 | {% block resource_actions_inner %} 4 | {% if h.check_access('package_update', {'id':pkg.id }) and c.user %} 5 |
  • {% link_for _('Manage'), controller='package', action='resource_edit', id=pkg.name, resource_id=res.id, class_='btn', icon='wrench' %}
  • 6 | {% endif %} 7 | {% if res.url and h.is_url(res.url) %} 8 |
  • 9 | 10 | {% if res.resource_type in ('listing', 'service') %} 11 | {{ _('View') }} 12 | {% elif res.resource_type == 'api' %} 13 | {{ _('API Endpoint') }} 14 | {% elif (not res.has_views or not res.can_be_previewed) and not res.url_type == 'upload' %} 15 | {{ _('Go to resource') }} 16 | {% else %} 17 | {{ _('Download') }} 18 | {% endif %} 19 | 20 |
  • 21 | {% endif %} 22 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/snippets/example_theme_most_popular_groups.html: -------------------------------------------------------------------------------- 1 | {# Renders a list of the site's most popular groups. #} 2 | 3 |
    4 |
    5 |

    Most popular groups

    6 |
    7 |
    8 | 29 |
    30 |
    31 | -------------------------------------------------------------------------------- /bin/travis-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # Test: Check build 4 | # =========================================================== 5 | nosetests --ckan --nologcapture --with-pylons=subdir/test.ini ckanext/dadosgovbr 6 | 7 | # Test: Front-end 8 | # =========================================================== 9 | 10 | # Start CKAN server 11 | cd ckan 12 | paster serve test-core.ini & 13 | cd - 14 | sleep 5 # Make sure the server has fully started 15 | 16 | # Run test 17 | mocha-phantomjs http://localhost:5000/base/test/index.html 18 | 19 | # Did an error occur? 20 | MOCHA_ERROR=$? 21 | 22 | # We are done so kill CKAN 23 | killall paster 24 | 25 | # Test: All nosetests 26 | # =========================================================== 27 | nosetests --ckan --reset-db --with-pylons=subdir/test.ini --nologcapture --with-coverage --cover-package=ckan --cover-package=ckanext ckanext/dadosgovbr 28 | 29 | # Did an error occur? 30 | NOSE_ERROR=$? 31 | [ "0" -ne "$MOCHA_ERROR" ] && echo MOCHA tests have failed 32 | [ "0" -ne "$NOSE_ERROR" ] && echo NOSE tests have failed 33 | 34 | 35 | # Error output to Travis 36 | # =========================================================== 37 | exit `expr $MOCHA_ERROR + $NOSE_ERROR` 38 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | // Install requirements (nodejs, gulp) for Ubuntu 16.04 2 | // cd /usr/lib/ckan/default/src/ckanext-dadosgovbr 3 | // curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - 4 | // sudo apt-get install -y build-essential nodejs 5 | // sudo npm install gulp-cli -g 6 | // sudo npm install gulp -D 7 | // sudo npm install node-sass 8 | // sudo npm install gulp-sass gulp-rename gulp-minify-css gulp-sourcemaps 9 | 10 | // Sass configuration 11 | var gulp = require('gulp'); 12 | var sass = require('gulp-sass'); 13 | var minify = require('gulp-minify-css'); 14 | var rename = require('gulp-rename'); 15 | var sourcemaps = require('gulp-sourcemaps'); 16 | 17 | gulp.task('sass', function() { 18 | gulp.src('ckanext/dadosgovbr/public/sass/*.scss') 19 | .pipe(sourcemaps.init()) 20 | .pipe(sass({ style: 'compressed' })) 21 | .pipe(rename({ extname: '.min.css' })) 22 | .pipe(minify()) 23 | .pipe(sourcemaps.write('.')) 24 | .pipe(gulp.dest(function(f) { 25 | return f.base+"/../css/"; 26 | })) 27 | }); 28 | 29 | gulp.task('compile-scss', ['sass'], function() { 30 | gulp.watch('ckanext/dadosgovbr/public/sass/*.scss', ['sass']); 31 | }) -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/test.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | 3 | {% block primary %} 4 |
    5 |
    6 |

    Buscas ckanext-scheming

    7 |
    8 | 12 | 16 | 20 |
    21 |
    22 |
    23 | {% endblock %} 24 | 25 | {% block breadcrumb %} 26 | {% endblock %} 27 | 28 | {% block flash %} 29 | {% endblock %} 30 | 31 | {% block secondary %}{% endblock %} 32 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/user/login.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | 3 | {% block subtitle %}{{ _('Login') }}{% endblock %} 4 | 5 | {% block breadcrumb_content %} 6 |
  • {{ h.nav_link(_('Login'), controller='user', action='login') }}
  • 7 | {% endblock %} 8 | 9 | {% block primary_content %} 10 |
    11 |
    12 |

    {% block page_heading %}{{ _('Login') }}{% endblock %}

    13 | {% block form %} 14 | {% snippet "user/snippets/login_form.html", action=c.login_handler, error_summary=error_summary %} 15 | {% endblock %} 16 |
    17 |
    18 | {% endblock %} 19 | 20 | {% block secondary_content %} 21 | {% if h.check_access('user_create') %} 22 | {% block help_register %} 23 |
    24 | {% block help_register_inner %} 25 |

    Área restrita.

    26 |
    27 |

    Acesso permitido apenas aos usuários do dados.gov.br.

    28 |
    29 | {% endblock %} 30 |
    31 | {% endblock %} 32 | {% endif %} 33 | 34 | {% block help_forgotten %} 35 | {% endblock %} 36 | {% endblock %} 37 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/new.html: -------------------------------------------------------------------------------- 1 | {% if not h.organizations_available('create_dataset') 2 | and not h.check_config_permission('ckan.auth.create_unowned_dataset') %} 3 | {% include "package/snippets/cannot_create_package.html" %} 4 | 5 | {% else %} 6 | {% extends "package/base_form_page.html" %} 7 | {% block subtitle %}{{ _('Criar aplicativo') }}{% endblock %} 8 | 9 | {% block secondary_content %} 10 | {% block info_module %} 11 |
    12 |

    O que é?

    13 |
    14 |

    15 | Aplicativos produzidos a partir dos dados que estão no portal. 16 |

    17 |
    18 |
    19 | {% endblock %} 20 | {% endblock %} 21 | 22 | {% block breadcrumb_content %} 23 |
  • Aplicativos
  • 24 |
  • Adicionar novo aplicativo
  • 25 | {% endblock %} 26 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/wordpress/snippets/latest_posts.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    5 | Notícias 6 |

    7 |
    8 | 9 | 10 | 11 | {% for post in h.dadosgovbr_wordpress_posts(3) %} 12 | 13 | 19 | 20 | {% endfor %} 21 | 22 |
    14 |
    {{h.dadosgovbr_format_timestamp(post.date,'%d/%m/%Y')}}
    15 |

    {{post.title.rendered|safe}}

    16 |

    {{h.dadosgovbr_trim_string(post.excerpt.rendered, 240)|safe}}

    17 |

    leia mais

    18 |
    23 | 24 |
    25 |

    27 | Ver todas as notícias 28 |

    29 | 30 |
    31 |
    32 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/wordpress/page_single.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | 3 | {% block title %}{{c.wp_page.title.rendered}} - {{ super() }}{% endblock %} 4 | 5 | {% block breadcrumb_content %} 6 | {% endblock %} 7 | 8 | {% block maintag %}
    {% endblock %} 9 | 10 | {% block primary %} 11 |
    12 | {# 13 | The primary_content block can be used to add content to the page. 14 | This is the main block that is likely to be used within a template. 15 | 16 | Example: 17 | 18 | {% block primary_content %} 19 |

    My page content

    20 |

    Some content for the page

    21 | {% endblock %} 22 | #} 23 | {% block primary_content %} 24 |
    25 | {% block page_header %} 26 | 29 | {% endblock %} 30 |
    31 |

    {{c.wp_page.content.rendered|safe}}

    32 |
    33 |
    34 | {% endblock %} 35 |
    36 | {% endblock %} 37 | 38 | 39 | {% block secondary %} 40 | {% endblock %} 41 | 42 | 43 | {% block sidebar %}{% endblock %} 44 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/snippets/additional_info.html: -------------------------------------------------------------------------------- 1 | {% extends "package/snippets/additional_info.html" %} 2 | 3 | {%- set exclude_fields = [ 4 | 'id', 5 | 'title', 6 | 'name', 7 | 'notes', 8 | 'tag_string', 9 | 'license_id', 10 | 'owner_org', 11 | ] -%} 12 | {% set schema = h.scheming_get_schema('dataset', h.dadosgovbr_get_schema_name()) %} 13 | 14 | {% block package_additional_info %} 15 | {%- for field in schema.dataset_fields -%} 16 | {%- if field.field_name not in exclude_fields 17 | and field.display_snippet is not none -%} 18 | 19 | {{ 20 | h.scheming_language_text(field.label) }} 21 | {%- snippet 'scheming/snippets/display_field.html', 24 | field=field, data=pkg_dict, schema=schema -%} 25 | 26 | {%- endif -%} 27 | {%- endfor -%} 28 | {% if h.check_access('package_update',{'id':pkg_dict.id}) %} 29 | 30 | {{ _("State") }} 31 | {{ _(pkg_dict.state) }} 32 | 33 | {% endif %} 34 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/concurso/edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'package/base.html' %} 2 | 3 | {% set pkg = c.pkg_dict %} 4 | {% set pkg_dict = c.pkg_dict %} 5 | 6 | {% block breadcrumb_content_selected %}{% endblock %} 7 | 8 | {% block breadcrumb_content %} 9 | {{ super() }} 10 | {% if pkg %} 11 |
  • {% link_for _('Edit'), controller='package', action='edit', id=pkg.name %}
  • 12 | {% endif %} 13 | {% endblock %} 14 | 15 | {% block content_action %} 16 | {% link_for _('Ver aplicativo'), controller='package', action='read', id=pkg.name, class_='btn', icon='eye' %} 17 | {% endblock %} 18 | 19 | {% block content_primary_nav %} 20 | {{ h.build_nav_icon('dataset_edit', _('Edit metadata'), id=pkg.name) }} 21 | {{ h.build_nav_icon('dataset_resources', _('Resources'), id=pkg.name) }} 22 | {% endblock %} 23 | 24 | {% block secondary_content %} 25 | {% snippet 'package/snippets/info.html', pkg=pkg, hide_follow_button=true %} 26 | {% endblock %} 27 | 28 | {% block primary_content_inner %} 29 | {% block form %} 30 | {#- passing c to a snippet is bad but is required here 31 | for backwards compatibility with old templates and 32 | plugins using setup_template_variables() -#} 33 | {{- h.snippet(form_snippet, c=c, **form_vars) -}} 34 | {% endblock %} 35 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/concurso/new.html: -------------------------------------------------------------------------------- 1 | {% if not h.organizations_available('create_dataset') 2 | and not h.check_config_permission('ckan.auth.create_unowned_dataset') %} 3 | {% include "package/snippets/cannot_create_package.html" %} 4 | 5 | {% else %} 6 | {% extends "package/base_form_page.html" %} 7 | {% block subtitle %}{{ _('Criar '+h.dadosgovbr_get_schema_title()) }}{% endblock %} 8 | 9 | {% block secondary_content %} 10 | {% block info_module %} 11 |
    12 |

    O que é?

    13 |
    14 |

    15 | Concursos, hackathons e outros eventos de promoção do uso de dados abertos. 16 |

    17 |
    18 |
    19 | {% endblock %} 20 | {% endblock %} 21 | 22 | {% block breadcrumb_content %} 23 |
  • {{h.dadosgovbr_get_schema_title(plural=True)}}
  • 24 |
  • Adicionar novo {{h.dadosgovbr_get_schema_title()}}
  • 25 | {% endblock %} 26 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/inventario/new.html: -------------------------------------------------------------------------------- 1 | {% if not h.organizations_available('create_dataset') 2 | and not h.check_config_permission('ckan.auth.create_unowned_dataset') %} 3 | {% include "package/snippets/cannot_create_package.html" %} 4 | 5 | {% else %} 6 | {% extends "package/base_form_page.html" %} 7 | {% block subtitle %}{{ _('Criar '+h.dadosgovbr_get_schema_title()) }}{% endblock %} 8 | 9 | {% block secondary_content %} 10 | {% block info_module %} 11 |
    12 |

    O que é?

    13 |
    14 |

    15 | Cada item do inventário é uma base de dados existente em uma organização pública. 16 |

    17 |
    18 |
    19 | {% endblock %} 20 | {% endblock %} 21 | 22 | {% block breadcrumb_content %} 23 |
  • {{h.dadosgovbr_get_schema_title(plural=True)}}
  • 24 |
  • Adicionar novo {{h.dadosgovbr_get_schema_title()}}
  • 25 | {% endblock %} 26 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_pagination.scss: -------------------------------------------------------------------------------- 1 | // PAGINATION 2 | // ---------- 3 | 4 | .pagination { 5 | height: $baseLineHeight * 2; 6 | margin: $baseLineHeight 0; 7 | } 8 | .pagination ul { 9 | display: inline-block; 10 | @include ie7-inline-block(); 11 | margin-left: 0; 12 | margin-bottom: 0; 13 | @include border-radius(3px); 14 | @include box-shadow(0 1px 2px rgba(0,0,0,.05)); 15 | } 16 | .pagination li { 17 | display: inline; 18 | } 19 | .pagination a { 20 | float: left; 21 | padding: 0 14px; 22 | line-height: ($baseLineHeight * 2) - 2; 23 | text-decoration: none; 24 | border: 1px solid #ddd; 25 | border-left-width: 0; 26 | } 27 | .pagination a:hover, 28 | .pagination .active a { 29 | background-color: #f5f5f5; 30 | } 31 | .pagination .active a { 32 | color: $grayLight; 33 | cursor: default; 34 | } 35 | .pagination .disabled a, 36 | .pagination .disabled a:hover { 37 | color: $grayLight; 38 | background-color: transparent; 39 | cursor: default; 40 | } 41 | .pagination li:first-child a { 42 | border-left-width: 1px; 43 | @include border-radius(3px 0 0 3px); 44 | } 45 | .pagination li:last-child a { 46 | @include border-radius(0 3px 3px 0); 47 | } 48 | 49 | // Centered 50 | .pagination-centered { 51 | text-align: center; 52 | } 53 | .pagination-right { 54 | text-align: right; 55 | } 56 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/group_list.html: -------------------------------------------------------------------------------- 1 | {% extends "package/read_base.html" %} 2 | {% import 'macros/form.html' as form %} 3 | 4 | {% block breadcrumb_content %} 5 |
  • {{h.dadosgovbr_get_schema_title(c.pkg_dict.type, plural=True).title()}}
  • 6 |
  • {{c.pkg_dict.title}}
  • 7 | {% endblock %} 8 | 9 | {% block primary_content_inner %} 10 |

    {{ _('Groups') }}

    11 | 12 | {% if c.group_dropdown and h.check_access('package_update', {'id':pkg.id }) %} 13 |
    14 | 19 | 20 |
    21 | {% endif %} 22 | 23 | {% if c.pkg_dict.groups %} 24 |
    25 | {% snippet 'group/snippets/group_list.html', groups=c.pkg_dict.groups %} 26 |
    27 | {% else %} 28 |

    {{ _('There are no groups associated with this dataset') }}

    29 | {% endif %} 30 | 31 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/home/snippets/featured_group.html: -------------------------------------------------------------------------------- 1 | {# Show featured datasets from group "dados-em-destaque" #} 2 | 3 | {% if h.dadosgovbr_group_id_or_name_exists('dados-em-destaque') %} 4 | 5 | {% set group = h.dadosgovbr_get_featured_group('dados-em-destaque') %} 6 |
    7 |
    8 |
    9 |

    {{h.link_to(group['display_name'], h.url_for(controller='group', action='read', id=group['name']), class_="mais")}}

    10 | {% if group['description'] %} 11 |

    {{group['description']}}

    12 | {% endif %} 13 |
    14 | 24 |
    25 |
    26 | 27 | {% else %} 28 | O grupo Dados em Destaque não existe!
    Crie um grupo com o "name"="dados-em-destaque". 29 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/helpers/scheming.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from ckan.lib.base import h, g 3 | 4 | def get_schema_name(dataset_name=None): 5 | ''' Return schema name ''' 6 | if(dataset_name == None): 7 | schema_name = str(h.full_current_url()).replace(g.site_url, '').split('/')[1].split('?')[0] 8 | if(schema_name[-1:]=='s'): 9 | schema_name=schema_name[:-1] 10 | # print(schema_name) 11 | return schema_name 12 | return 'dataset' 13 | 14 | def get_schema_title(schema_name=None, plural=False): 15 | ''' Return schema title ''' 16 | schema_titles = {} 17 | schema_titles['aplicativo'] = u"aplicativo" 18 | schema_titles['aplicativo_plural'] = u"aplicativos" 19 | schema_titles['concurso'] = u"concurso" 20 | schema_titles['concurso_plural'] = u"concursos" 21 | schema_titles['inventario'] = u"item de inventário" 22 | schema_titles['inventario_plural'] = u"itens de inventário" 23 | schema_titles['dataset'] = u"conjunto de dados" 24 | schema_titles['dataset_plural'] = u"conjuntos de dados" 25 | if(schema_name==None): 26 | schema_name=get_schema_name() 27 | if(schema_name in schema_titles): 28 | if(plural): 29 | return schema_titles[schema_name+'_plural'] 30 | else: 31 | return schema_titles[schema_name] 32 | return u'resultado(s)' 33 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_popovers.scss: -------------------------------------------------------------------------------- 1 | // POPOVERS 2 | // -------- 3 | 4 | .popover { 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | z-index: $zindexPopover; 9 | display: none; 10 | padding: 5px; 11 | &.top { margin-top: -5px; } 12 | &.right { margin-left: 5px; } 13 | &.bottom { margin-top: 5px; } 14 | &.left { margin-left: -5px; } 15 | &.top .arrow { @include popoverArrow-top(); } 16 | &.right .arrow { @include popoverArrow-right(); } 17 | &.bottom .arrow { @include popoverArrow-bottom(); } 18 | &.left .arrow { @include popoverArrow-left(); } 19 | .arrow { 20 | position: absolute; 21 | width: 0; 22 | height: 0; 23 | } 24 | } 25 | .popover-inner { 26 | padding: 3px; 27 | width: 280px; 28 | overflow: hidden; 29 | background: $black; // has to be full background declaration for IE fallback 30 | background: rgba(0,0,0,.8); 31 | @include border-radius(6px); 32 | @include box-shadow(0 3px 7px rgba(0,0,0,0.3)); 33 | } 34 | .popover-title { 35 | padding: 9px 15px; 36 | line-height: 1; 37 | background-color: #f5f5f5; 38 | border-bottom:1px solid #eee; 39 | @include border-radius(3px 3px 0 0); 40 | } 41 | .popover-content { 42 | padding: 14px; 43 | background-color: $white; 44 | @include border-radius(0 0 3px 3px); 45 | @include background-clip(padding-box); 46 | p, ul, ol { 47 | margin-bottom: 0; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/wordpress/post_single.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | 3 | {% block title %}{{c.wp_post.title.rendered}} - {{ _('Notícias') }} - {{ super() }}{% endblock %} 4 | 5 | {% block breadcrumb_content %} 6 |
  • Notícias
  • 7 |
  • {{h.dadosgovbr_trim_string(c.wp_post.title.rendered, 55)|safe}}
  • 8 | {% endblock %} 9 | 10 | 11 | {% block primary %} 12 |
    13 | {% block primary_content %} 14 |
    15 | {% block page_header %} 16 | 19 | {% endblock %} 20 |
    21 |
    22 |
    23 | Data de publicação 24 |
    {{h.dadosgovbr_format_timestamp(c.wp_post.date)}}
    25 |
    26 | 27 |
    {{c.wp_post.content.rendered|safe}}
    28 | 29 |
    30 |
    31 |
    32 | {% endblock %} 33 |
    34 | {% endblock %} 35 | 36 | 37 | {% block secondary %} 38 | {% endblock %} 39 | 40 | 41 | {% block sidebar %}{% endblock %} 42 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'package/base.html' %} 2 | 3 | {% set pkg = c.pkg_dict %} 4 | {% set pkg_dict = c.pkg_dict %} 5 | 6 | {% block breadcrumb_content_selected %}{% endblock %} 7 | 8 | {% block breadcrumb_content %} 9 | {% if pkg %} 10 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 11 |
  • {% link_for _('Edit'), controller='package', action='edit', id=pkg.name %}
  • 12 | {% endif %} 13 | {% endblock %} 14 | 15 | {% block content_action %} 16 | {% link_for _('Ver title'.replace('title',h.dadosgovbr_get_schema_title())), controller='package', action='read', id=pkg.name, class_='btn', icon='eye' %} 17 | {% endblock %} 18 | 19 | {% block content_primary_nav %} 20 | {{ h.build_nav_icon('dataset_edit', _('Edit metadata'), id=pkg.name) }} 21 | {{ h.build_nav_icon('dataset_resources', _('Resources'), id=pkg.name) }} 22 | {% endblock %} 23 | 24 | {% block secondary_content %} 25 | {% snippet 'package/snippets/info.html', pkg=pkg, hide_follow_button=true %} 26 | {% endblock %} 27 | 28 | {% block primary_content_inner %} 29 | {% block form %} 30 | {#- passing c to a snippet is bad but is required here 31 | for backwards compatibility with old templates and 32 | plugins using setup_template_variables() -#} 33 | {{- h.snippet(form_snippet, c=c, **form_vars) -}} 34 | {% endblock %} 35 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/inventario/edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'package/base.html' %} 2 | 3 | {% set pkg = c.pkg_dict %} 4 | {% set pkg_dict = c.pkg_dict %} 5 | 6 | {% block breadcrumb_content_selected %}{% endblock %} 7 | 8 | {% block breadcrumb_content %} 9 | {% if pkg %} 10 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 11 |
  • {% link_for _('Edit'), controller='package', action='edit', id=pkg.name %}
  • 12 | {% endif %} 13 | {% endblock %} 14 | 15 | {% block content_action %} 16 | {% link_for _('Ver title'.replace('title',h.dadosgovbr_get_schema_title())), controller='package', action='read', id=pkg.name, class_='btn', icon='eye' %} 17 | {% endblock %} 18 | 19 | {% block content_primary_nav %} 20 | {{ h.build_nav_icon('dataset_edit', _('Edit metadata'), id=pkg.name) }} 21 | {{ h.build_nav_icon('dataset_resources', _('Resources'), id=pkg.name) }} 22 | {% endblock %} 23 | 24 | {% block secondary_content %} 25 | {% snippet 'package/snippets/info.html', pkg=pkg, hide_follow_button=true %} 26 | {% endblock %} 27 | 28 | {% block primary_content_inner %} 29 | {% block form %} 30 | {#- passing c to a snippet is bad but is required here 31 | for backwards compatibility with old templates and 32 | plugins using setup_template_variables() -#} 33 | {{- h.snippet(form_snippet, c=c, **form_vars) -}} 34 | {% endblock %} 35 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_code.scss: -------------------------------------------------------------------------------- 1 | // Code.scss 2 | // Code typography styles for the and
     elements
     3 | // --------------------------------------------------------
     4 | 
     5 | // Inline and block code styles
     6 | code,
     7 | pre {
     8 |   padding: 0 3px 2px;
     9 |   @include font-family-monospace;
    10 |   font-size: $baseFontSize - 1;
    11 |   color: $grayDark;
    12 |   @include border-radius(3px);
    13 | }
    14 | 
    15 | // Inline code
    16 | code {
    17 |   padding: 3px 4px;
    18 |   color: #d14;
    19 |   background-color: #f7f7f9;
    20 |   border: 1px solid #e1e1e8;
    21 | }
    22 | 
    23 | // Blocks of code
    24 | pre {
    25 |   display: block;
    26 |   padding: ($baseLineHeight - 1) / 2;
    27 |   margin: 0 0 $baseLineHeight / 2;
    28 |   font-size: 12px;
    29 |   line-height: $baseLineHeight;
    30 |   background-color: #f5f5f5;
    31 |   border: 1px solid #ccc; // fallback for IE7-8
    32 |   border: 1px solid rgba(0,0,0,.15);
    33 |   @include border-radius(4px);
    34 |   white-space: pre;
    35 |   white-space: pre-wrap;
    36 |   word-break: break-all;
    37 |   word-wrap: break-word;
    38 | 
    39 |   // Make prettyprint styles more spaced out for readability
    40 |   &.prettyprint {
    41 |     margin-bottom: $baseLineHeight;
    42 |   }
    43 | 
    44 |   // Account for some code outputs that place code tags in pre tags
    45 |   code {
    46 |     padding: 0;
    47 |     color: inherit;
    48 |     background-color: transparent;
    49 |     border: 0;
    50 |   }
    51 | }
    52 | 
    53 | // Enable scrollable blocks of code
    54 | .pre-scrollable {
    55 |   max-height: 340px;
    56 |   overflow-y: scroll;
    57 | }
    58 | 
    
    
    --------------------------------------------------------------------------------
    /ckanext/dadosgovbr/templates/package/base_form_page.html:
    --------------------------------------------------------------------------------
     1 | {% extends "package/edit_base.html" %}
     2 | 
     3 | {% block primary_content %}
     4 |   
    5 | {% block page_header %}{% endblock %} 6 |
    7 | {% block primary_content_inner %} 8 | {% block form %} 9 | {#- passing c to a snippet is bad but is required here 10 | for backwards compatibility with old templates and 11 | plugins using setup_template_variables() -#} 12 | {{- h.snippet(form_snippet, c=c, **form_vars) -}} 13 | {% endblock %} 14 | {% endblock %} 15 |
    16 |
    17 | {% endblock %} 18 | 19 | {% block secondary_content %} 20 | {% block info_module %} 21 |
    22 |

    {{ _('What are datasets?') }}

    23 |
    24 |

    25 | {% trans %} 26 | A CKAN Dataset is a collection of data resources (such as files), 27 | together with a description and other information, at a fixed URL. 28 | Datasets are what users see when searching for data. 29 | {% endtrans %} 30 |

    31 |
    32 |
    33 | {% endblock %} 34 | 35 | {% block resources_module %} 36 | {# TODO: Pass in a list of previously created resources and the current package dict #} 37 | {% snippet "package/snippets/resources.html", pkg={}, action='new_resource' %} 38 | {% endblock %} 39 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_alerts.scss: -------------------------------------------------------------------------------- 1 | // ALERT STYLES 2 | // ------------ 3 | 4 | // Base alert styles 5 | .alert { 6 | padding: 8px 35px 8px 14px; 7 | margin-bottom: $baseLineHeight; 8 | text-shadow: 0 1px 0 rgba(255,255,255,.5); 9 | background-color: $warningBackground; 10 | border: 1px solid $warningBorder; 11 | @include border-radius(4px); 12 | } 13 | .alert, 14 | .alert-heading { 15 | color: $warningText; 16 | } 17 | 18 | // Adjust close link position 19 | .alert .close { 20 | position: relative; 21 | top: -2px; 22 | right: -21px; 23 | line-height: 18px; 24 | } 25 | 26 | // Alternate styles 27 | // ---------------- 28 | 29 | .alert-success { 30 | background-color: $successBackground; 31 | border-color: $successBorder; 32 | } 33 | .alert-success, 34 | .alert-success .alert-heading { 35 | color: $successText; 36 | } 37 | .alert-danger, 38 | .alert-error { 39 | background-color: $errorBackground; 40 | border-color: $errorBorder; 41 | } 42 | .alert-danger, 43 | .alert-error, 44 | .alert-danger .alert-heading, 45 | .alert-error .alert-heading { 46 | color: $errorText; 47 | } 48 | .alert-info { 49 | background-color: $infoBackground; 50 | border-color: $infoBorder; 51 | } 52 | .alert-info, 53 | .alert-info .alert-heading { 54 | color: $infoText; 55 | } 56 | 57 | 58 | // Block alerts 59 | // ------------------------ 60 | .alert-block { 61 | padding-top: 14px; 62 | padding-bottom: 14px; 63 | } 64 | .alert-block > p, 65 | .alert-block > ul { 66 | margin-bottom: 0; 67 | } 68 | .alert-block p + p { 69 | margin-top: 5px; 70 | } 71 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/home/snippets/latest_datasets.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    Publicações mais recentes

    5 |
    6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {% for dataset in h.dadosgovbr_most_recent_datasets(5) %} 17 | 18 | 19 | 20 | 21 | {# Organization #} 22 | {% if dataset.owner_org %} 23 | 28 | {# Autor #} 29 | {% else %} 30 | 35 | {% endif %} 36 | 37 | {% endfor %} 38 | 39 |
    Conjunto de dadosDataResponsável
    {{dataset.title}}{{dataset.time}} 24 | 25 | {{h.dadosgovbr_trim_letter(dataset.organization.title, 36)}} 26 | 27 | 31 |
    32 | {{h.dadosgovbr_trim_letter(dataset.author, 36)}} 33 |
    34 |
    40 |
    41 |
    42 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v2.0.1 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | * 10 | * Converted to Sass by @johnwlong / @m5o. 11 | * 12 | * Date: @DATE 13 | */ 14 | 15 | // Core variables and mixins 16 | @import "variables"; // Modify this for custom colors, font-sizes, etc 17 | @import "mixins"; 18 | 19 | // CSS Reset 20 | @import "reset"; 21 | 22 | // Grid system and page structure 23 | @import "scaffolding"; 24 | @import "grid"; 25 | @import "layouts"; 26 | 27 | // Base CSS 28 | @import "type"; 29 | @import "code"; 30 | @import "forms"; 31 | @import "tables"; 32 | 33 | // Components: common 34 | @import "sprites"; 35 | @import "dropdowns"; 36 | @import "wells"; 37 | @import "component-animations"; 38 | @import "close"; 39 | 40 | // Components: Buttons & Alerts 41 | @import "buttons"; 42 | @import "button-groups"; 43 | @import "alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons.scss 44 | 45 | // Components: Nav 46 | @import "navs"; 47 | @import "navbar"; 48 | @import "breadcrumbs"; 49 | @import "pagination"; 50 | @import "pager"; 51 | 52 | // Components: Popovers 53 | @import "modals"; 54 | @import "tooltip"; 55 | @import "popovers"; 56 | 57 | // Components: Misc 58 | @import "thumbnails"; 59 | @import "labels"; 60 | @import "progress-bars"; 61 | @import "accordion"; 62 | @import "carousel"; 63 | @import "hero-unit"; 64 | 65 | // Utility classes 66 | @import "utilities"; // Has to be last to override when necessary 67 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/snippets/organization_item.html: -------------------------------------------------------------------------------- 1 | {% set url=h.url_for(controller='organization', action='read', id=organization.name) %} 2 | {% set truncate=truncate or 0 %} 3 | {% block organization_item %} 4 |
    5 | {% block organization_item_header %} 6 |
    7 | {% block organization_item_header_image %} 8 | 11 | {% endblock %} 12 | {% block organization_item_header_title %} 13 |

    Dados em destaque

    14 | {% endblock %} 15 | {% block organization_item_header_description %} 16 | {% if organization.description %} 17 | {% if truncate == 0 %} 18 | 19 | {% else %} 20 | 21 | {% endif %} 22 | {% endif %} 23 | {% endblock %} 24 |
    25 | {% endblock %} 26 | {% block organization_item_content %} 27 | {% set list_class = "unstyled dataset-list" %} 28 | {% set item_class = "dataset-item module-content" %} 29 | {% snippet 'snippets/package_list.html', packages=organization.packages, list_class=list_class, item_class=item_class, truncate=120 %} 30 | {% endblock %} 31 |
    32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/snippets/stages.html: -------------------------------------------------------------------------------- 1 | {# 2 | Inserts a stepped progress indicator for the new package form. Each stage can 3 | have one of three states, "uncomplete", "complete" and "active". 4 | 5 | stages - A list of states for each of the three stages. Missing stages default 6 | to "uncomplete". 7 | 8 | Example: 9 | 10 | {% snippet 'package/snippets/stages.html', stages=['active'] %} 11 | {% snippet 'package/snippets/stages.html', stages=['complete', 'active'] %} 12 | {% snippet 'package/snippets/stages.html', stages=['active', 'complete'] %} 13 | 14 | #} 15 | {% set s1 = stages[0] or 'active' %} 16 | {% set s2 = stages[1] or 'uncomplete' %} 17 | {% if s1 != 'uncomplete' %}{% set class = 'stage-1' %}{% endif %} 18 | {% if s2 != 'uncomplete' %}{% set class = 'stage-2' %}{% endif %} 19 | 20 |
      21 |
    1. 22 | {% if s1 != 'complete' %} 23 | {{ _('Create') }} {{h.dadosgovbr_get_schema_title()}} 24 | {% else %} 25 | 26 | {% endif %} 27 |
    2. 28 |
    3. 29 | {% if s2 != 'complete' %} 30 | {{ _('Add resource') }} 31 | {% else %} 32 | {% if s1 == 'active' %} 33 | {# stage 1 #} 34 | 35 | {% else %} 36 | {% link_for _('Add resource'), controller='package', action='new', class_="highlight" %} 37 | {% endif %} 38 | {% endif %} 39 |
    4. 40 |
    -------------------------------------------------------------------------------- /y: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAwxMuGHfLJci2NN9KHliQLO3ABsb/2yK5ey4LRK/nnR4f2uay 3 | c1Xl03ZukydTWBIYu41qxrkKw0RFcjLotCDkkv+5PVV4CAqbBY/nVa1zFwl9fjaA 4 | LUWmkoFr64Z8QQJ7UeR+qp/XdEL0t/yQp07cAOFefrIt8Aan3msfFqF6KcktcYyx 5 | KEvAFcnrl9gDN2qp9ByG/ZVDSo+Zi0M9kGYZAXEShkrNNMgfqB3u+fSeoVlG6eBu 6 | FNJaynj+QgDr/QEcwr6iDuHEYWSVJlcnOg5hmAbpcnMG4jzrlqIVA95J+KLkBunB 7 | 8ixo2zafi9BxHixYBrBbQWYhUXW979GZQ2tr1QIDAQABAoIBABRs17C8Kkskft9+ 8 | WbZfs4jgw/BxuaxqMF2Tbp6chHXRB6jV6u1kmxHPHrjNr05TZr+MiReRnGzhoxvX 9 | 9MGXiBdUK0Mexdihs6Wbca9o39oTpk4myrjyyAQjBPe+NxhfeCYU9KZM4jRMJm91 10 | RHggK6zz6/78DQ9KwxzovnKSKcZiGTSLYM4/MwDSIUwEGBOeZ8gobH3OLHUqCcg5 11 | mqVxhmzt72uI1u3lQorktDsKPWtbOkN6f/oCTiqfIrGUj5GkzF5nfUZqiUmSMpZE 12 | zjDe+eh1O81dZ5qkfWwWxAfAHmjQodS6lhQ21l1MyxnXLFmK97nZABzaV7xlxF9t 13 | PLFSeGkCgYEA76ojCZc4Jp44OxW+bpq0Fe4p7ODhHHJt+gPJuoE5gjA08Js+kHH4 14 | mRzi31QudRAFU+BSxrKHJnYvxCbdwzsh5HdgWA6eOb921RAHWaKDRn0IryTwmXp6 15 | ombholyqjqaqT5zQIca6EYFuk1xyT41rCcaKKhtmKY7tSwMFwPn2ZqsCgYEA0F8B 16 | l7AdoC562m+LNsI52KWdEgIKsaaRu3/jDtizH2sTOyhLyn/zGZobYgffqcTvwdcp 17 | GEF0AvmU6TKrIydVQixVkjsRCf6LLfnU+LsXM5mR9BGfyf/RgTMtThK3C8st+qjC 18 | mId8ZHpFFdx2JlBjixrjyYPr8wgXdHKEzt1fd38CgYAaFM3TUV2O9lDwPSGIL9XB 19 | PTXazW4yBlHpj1f4r+9uN4jLVlmspnqDTx1xaFvV6XRq+FKJxQvoJ5xzIDep81lw 20 | 33zgmFanuipYbXIfUwwuM5UqWj7EtQt7eO69GJCHDaQjHdGYm2PMW+WIq9rUxXMM 21 | kUqf4nNvuloge6e4pHsoGQKBgHk+rviKm9J2+TldKk5EmdA8Hbc6xOo2GBpYAdDD 22 | uwaPEXOcsO01okjFaSWTm0t3smLCRcE9ZLnObB19RCOCYZPNpEUgZXvBR08LTicl 23 | Bg0aUNkJ4EZzun5JPxVswmH0ad6uj/yc6X61vrlHvN/yatmoXd8GCicyECPL9wc/ 24 | vKsVAoGBAKWqpwijLX4cnEaBIGdyuTbInOILAr8Bql2I5L81oUH/hOnXL19lCzuG 25 | w7e7UXDSiImBTkinT8rwdPTx5ZZhNg5AT2ordW0fcIJsTw9o334osAuXoxSurrwn 26 | M8tuAcZ9QmSK0uJ3egiyTvxNq5iAEdzOYXefP4Km+Vdxs9QlX95Q 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/controllers/wordpress.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import ckan.plugins as p 4 | from ckan.lib.base import c, render 5 | from pylons import request, response 6 | from pylons.controllers.util import redirect 7 | import requests 8 | 9 | # Wordpress integration 10 | import ckanext.dadosgovbr.helpers.wordpress as wp 11 | 12 | 13 | class NoticiasController(p.toolkit.BaseController): 14 | 15 | def redirect (ctrl, slug): 16 | return redirect(b'/noticia/'+slug) 17 | 18 | def show (ctrl, slug): 19 | c.wp_post = wp.post(slug) 20 | return render('wordpress/post_single.html') 21 | 22 | def list (ctrl): 23 | if ('page' in request.GET): 24 | c.wp_page_number = int(request.GET['page']) 25 | else: 26 | c.wp_page_number = int(1) 27 | 28 | c.title = "Notícias".decode('utf8') 29 | c.wp_posts = wp.posts(10, c.wp_page_number) 30 | return render('wordpress/posts.html') 31 | 32 | def feed (ctrl): 33 | # Get content from feed URL 34 | url = "http://wp.dados.gov.br/wp/feed" 35 | feed = requests.get(url) 36 | content = feed.content 37 | 38 | # Update URL to mask Wordpress path 39 | #content = content.replace("dados.gov.br/wp", "dados.gov.br/noticias") 40 | 41 | # Set header for XML content 42 | response.headers['Content-Type'] = ( 43 | b'text/xml; charset=utf-8') 44 | 45 | return content 46 | 47 | 48 | class PaginasController(p.toolkit.BaseController): 49 | def index (ctrl, slug): 50 | c.wp_page = wp.page(slug) 51 | return render('wordpress/page_single.html') 52 | 53 | def redirect (ctrl, slug): 54 | return redirect(b'/pagina/'+slug) 55 | 56 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/theme.py: -------------------------------------------------------------------------------- 1 | import os 2 | from ckan.plugins import implements, SingletonPlugin 3 | from ckan.plugins import IConfigurer 4 | import ckan.plugins.toolkit 5 | 6 | class DadosGovBrTheme(SingletonPlugin): 7 | '''The theme for the dados.gov.br site. 8 | 9 | Uses CKAN's IConfigurer plugin interface to override some of CKAN's 10 | default files and templates with files and templates from this extension 11 | package. 12 | 13 | ''' 14 | implements(IConfigurer, inherit=True) 15 | 16 | def update_config(self, config): 17 | '''This IConfigurer implementation causes CKAN to look in the 18 | ```public``` and ```templates``` directories present in this package 19 | for any customisations. 20 | 21 | It also shows how to set the site title here (rather than in the main 22 | site .ini file). 23 | 24 | ''' 25 | # Setup some variable that will be useful below. 26 | here = os.path.dirname(__file__) 27 | rootdir = os.path.dirname(os.path.dirname(here)) 28 | our_public_dir = os.path.join(rootdir, 'ckanext', 'dadosgovbr', 29 | 'public') 30 | template_dir = os.path.join(rootdir, 'ckanext', 'dadosgovbr', 31 | 'templates') 32 | 33 | # use new style plugin toolkit 34 | ckan.plugins.toolkit.add_public_directory(config, 'public') 35 | ckan.plugins.toolkit.add_resource('public/css', 'application.css') 36 | 37 | # Configure our public and templates overrides. 38 | config['extra_public_paths'] = ','.join([our_public_dir, 39 | config.get('extra_public_paths', '')]) 40 | config['extra_template_paths'] = ','.join([template_dir, 41 | config.get('extra_template_paths', '')]) 42 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/dataset_plugin.py: -------------------------------------------------------------------------------- 1 | import os 2 | from ckan.plugins import implements, SingletonPlugin 3 | from ckan.plugins import IRoutes 4 | from ckan.config.routing import SubMapper 5 | 6 | class DadosGovBrDatasetView(SingletonPlugin): 7 | '''The customized dataset view screen. 8 | ''' 9 | implements(IRoutes, inherit=True) 10 | 11 | def before_map(self, map): 12 | # Default mappings copied from ckan/config/routing.py that we want to preserve. 13 | with SubMapper(map, controller='package') as m: 14 | m.connect('/dataset/{action}', 15 | requirements=dict(action='|'.join([ 16 | 'list', 17 | 'new', 18 | 'autocomplete', 19 | 'search' 20 | ])) 21 | ) 22 | m.connect('/dataset/{action}/{id}/{revision}', action='read_ajax', 23 | requirements=dict(action='|'.join([ 24 | 'read', 25 | 'edit', 26 | 'authz', 27 | 'history', 28 | ])) 29 | ) 30 | m.connect('/dataset/{action}/{id}', 31 | requirements=dict(action='|'.join([ 32 | 'edit', 33 | 'editresources', 34 | 'authz', 35 | 'history', 36 | 'read_ajax', 37 | 'history_ajax', 38 | ])) 39 | ) 40 | m.connect('/dataset/{id}.{format}', action='read') 41 | m.connect('/dataset/{id}/resource/{resource_id}', action='resource_read') 42 | 43 | # Our new custom mapping. 44 | map.connect('/dataset/{id}', 45 | controller='ckanext.dadosgovbr.controllers.package:DadosGovBrDatasetController', 46 | action='read') 47 | return map 48 | 49 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/group/snippets/group_item.html: -------------------------------------------------------------------------------- 1 | {# 2 | Renders a media item for a group. This should be used in a list. 3 | 4 | group - A group dict. 5 | 6 | Example: 7 | 8 |
      9 | {% for group in groups %} 10 | {% snippet "group/snippets/group_item.html", group=group %} 11 | {% endfor %} 12 |
    13 | #} 14 | {% set type = group.type or 'group' %} 15 | {% set url = h.url_for(type ~ '_read', action='read', id=group.name) %} 16 | {% block item %} 17 |
  • 18 | {% block item_inner %} 19 | {% block image %} 20 | {{ group.name }} 21 | {% endblock %} 22 | {% block title %} 23 |

    {{ group.display_name }}

    24 | {% endblock %} 25 | {% block description %} 26 | {% if group.description %} 27 |

    {{ h.markdown_extract(group.description, extract_length=80) }}

    28 | {% endif %} 29 | {% endblock %} 30 | {% block datasets %} 31 | {% if group.packages %} 32 | {{ ungettext('{num} Dataset', '{num} Datasets', group.packages).format(num=group.packages) }} 33 | {% elif group.packages == 0 %} 34 | {{ _('0 Datasets') }} 35 | {% endif %} 36 | {% endblock %} 37 | {% block link %} 38 | 39 | {{ _('View {name}').format(name=group.display_name) }} 40 | 41 | {% endblock %} 42 | {% if group.user_member %} 43 | 44 | {% endif %} 45 | {% endblock %} 46 |
  • 47 | {% endblock %} 48 | {% if position is divisibleby 3 %} 49 |
  • 50 | {% endif %} 51 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/package/read.html: -------------------------------------------------------------------------------- 1 | {% extends "package/read_base.html" %} 2 | {% block primary_content_inner %} 3 | {{ super() }} 4 | {% block package_description %} 5 | {% if pkg.private %} 6 | 7 | 8 | {{ _('Private') }} 9 | 10 | {% endif %} 11 |

    12 | {% block page_heading %} 13 | {{ h.dataset_display_name(pkg) }} 14 | {% if pkg.state.startswith('draft') %} 15 | [{{ _('Draft') }}] 16 | {% endif %} 17 | {% if pkg.state == 'deleted' %} 18 | [{{ _('Deleted') }}] 19 | {% endif %} 20 | {% endblock %} 21 |

    22 | {% block package_notes %} 23 | {% if pkg.notes %} 24 |
    25 |
    26 | {{ h.render_markdown(pkg.notes) }} 27 |
    28 | {% endif %} 29 | {% endblock %} 30 | {# FIXME why is this here? seems wrong #} 31 | 32 | {% endblock %} 33 | 34 | {% block package_tags %} 35 |
    36 | {% snippet "package/snippets/tags.html", tags=pkg.tags %} 37 | {% if h.dadosgovbr_eouv_is_avaliable() %} 38 | {% if h.dadosgovbr_get_organization_extra(pkg.organization.name, 'siorg') %} 39 | 40 | 41 | {% snippet "package/snippets/eouv.html", pkg_id=pkg.id %} 42 | {% endif %} 43 | {% endif %} 44 |
    45 | {% endblock %} 46 | 47 | {% block package_resources %} 48 | {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} 49 |
    50 | {% endblock %} 51 | 52 | {% block package_additional_info %} 53 | {% snippet "scheming/snippets/additional_info.html", pkg_dict=pkg %} 54 | {% endblock %} 55 | 56 | {% endblock %} -------------------------------------------------------------------------------- /bin/travis-build.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | echo "This is travis-build.bash..." 5 | 6 | echo "Installing the packages that CKAN requires..." 7 | sudo apt-get update -qq 8 | sudo apt-get install solr-jetty libcommons-fileupload-java 9 | 10 | echo "Installing CKAN and its Python dependencies..." 11 | git clone https://github.com/ckan/ckan 12 | cd ckan 13 | if [ $CKANVERSION == 'master' ] 14 | then 15 | echo "CKAN version: master" 16 | else 17 | CKAN_TAG=$(git tag | grep ^ckan-$CKANVERSION | sort --version-sort | tail -n 1) 18 | git checkout $CKAN_TAG 19 | echo "CKAN version: ${CKAN_TAG#ckan-}" 20 | fi 21 | python setup.py develop 22 | pip install -r requirements.txt --allow-all-external 23 | pip install -r dev-requirements.txt --allow-all-external 24 | cd - 25 | 26 | echo "Setting up Solr..." 27 | # solr is multicore for tests on ckan master now, but it's easier to run tests 28 | # on Travis single-core still. 29 | # see https://github.com/ckan/ckan/issues/2972 30 | sed -i -e 's/solr_url.*/solr_url = http:\/\/127.0.0.1:8983\/solr/' ckan/test-core.ini 31 | printf "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty 32 | sudo cp ckan/ckan/config/solr/schema.xml /etc/solr/conf/schema.xml 33 | sudo service jetty restart 34 | 35 | echo "Creating the PostgreSQL user and database..." 36 | sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';" 37 | sudo -u postgres psql -c "CREATE USER datastore_default WITH PASSWORD 'pass';" 38 | sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' 39 | sudo -u postgres psql -c 'CREATE DATABASE datastore_test WITH OWNER ckan_default;' 40 | 41 | echo "Initialising the database..." 42 | cd ckan 43 | paster db init -c test-core.ini 44 | cd - 45 | 46 | echo "Installing Mocha for front-end tests..." 47 | npm install -g mocha-phantomjs@3.5.0 phantomjs@~1.9.1 48 | 49 | echo "Installing ckanext-dadosgovbr and its requirements..." 50 | pip install -r pip-requirements.txt 51 | pip install -r dev-requirements.txt 52 | 53 | python setup.py develop 54 | 55 | echo "Moving test.ini into a subdir..." 56 | mkdir subdir 57 | mv test.ini subdir 58 | 59 | echo "travis-build.bash is done." 60 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/_bugfix.scss: -------------------------------------------------------------------------------- 1 | // main: extra.scss 2 | 3 | // Correção de bugs de design da versão antiga dos Dados Abertos. 4 | 5 | // Correção de espaçamentos globais. Provavelmente vindo da importação 6 | // do módulos do Bootstrap 2.x 7 | body div[role='main'] section h1, body div[role='main'] section p, body div[role='main'] section h2, body div[role='main'] section span { 8 | margin-left: initial; 9 | margin-right: initial; 10 | } 11 | 12 | 13 | select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input, 14 | .input-append .add-on, .input-prepend .add-on { 15 | height: initial !important; 16 | } 17 | 18 | 19 | .module-content .pagination { 20 | margin: 20px 0; 21 | } 22 | 23 | // Controles form 24 | .radio, .checkbox { 25 | padding: initial; 26 | } 27 | .radio input[type="radio"], .checkbox input[type="checkbox"], .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { 28 | margin: auto; 29 | } 30 | .ui input[type="radio"], .ui input[type="checkbox"] { 31 | margin: 4px 0 0 !important; 32 | } 33 | 34 | 35 | // Correção após reset e semantic-ui 36 | header.module-heading { 37 | padding-top: 18px; 38 | padding-bottom: 18px; 39 | min-height: 61px; 40 | } 41 | h3 { 42 | font-size: 18px; 43 | line-height: 1.3; 44 | } 45 | .ui { 46 | //font-size: 1.2rem !important; 47 | } 48 | 49 | // semantic-ui modal 50 | .modal-backdrop { 51 | z-index: 999; 52 | } 53 | .ui.modal.in .actions { 54 | position: initial; 55 | } 56 | .ui.modal { 57 | top: 20%; 58 | } 59 | 60 | 61 | // Bootstrap 3 GRID 62 | @mixin container{ 63 | @include clearfix(); 64 | margin: 0 auto; 65 | } 66 | 67 | @mixin row(){ 68 | @include clearfix(); 69 | } 70 | @mixin column($column, $isLast: false){ 71 | @include gridSystem-gridColumn($gridGutterWidth); 72 | @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridColumnWidth, $column); 73 | @if $isLast { 74 | margin-right: 20px 75 | } 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_modals.scss: -------------------------------------------------------------------------------- 1 | // MODALS 2 | // ------ 3 | 4 | // Recalculate z-index where appropriate 5 | .modal-open { 6 | .dropdown-menu { z-index: $zindexDropdown + $zindexModal; } 7 | .dropdown.open { *z-index: $zindexDropdown + $zindexModal; } 8 | .popover { z-index: $zindexPopover + $zindexModal; } 9 | .tooltip { z-index: $zindexTooltip + $zindexModal; } 10 | } 11 | 12 | // Background 13 | .modal-backdrop { 14 | position: fixed; 15 | top: 0; 16 | right: 0; 17 | bottom: 0; 18 | left: 0; 19 | z-index: $zindexModalBackdrop; 20 | background-color: $black; 21 | // Fade for backdrop 22 | &.fade { opacity: 0; } 23 | } 24 | 25 | .modal-backdrop, 26 | .modal-backdrop.fade.in { 27 | @include opacity(80); 28 | } 29 | 30 | // Base modal 31 | .modal { 32 | position: fixed; 33 | top: 50%; 34 | left: 50%; 35 | z-index: $zindexModal; 36 | max-height: 500px; 37 | overflow: auto; 38 | width: 560px; 39 | margin: -250px 0 0 -280px; 40 | background-color: $white; 41 | border: 1px solid #999; 42 | border: 1px solid rgba(0,0,0,.3); 43 | *border: 1px solid #999; /* IE6-7 */ 44 | @include border-radius(6px); 45 | @include box-shadow(0 3px 7px rgba(0,0,0,0.3)); 46 | @include background-clip(padding-box); 47 | &.fade { 48 | @include transition(opacity .3s linear); 49 | // @include transition(top .3s ease-out); 50 | top: -25%; 51 | } 52 | &.fade.in { top: 50%; } 53 | } 54 | .modal-header { 55 | padding: 9px 15px; 56 | border-bottom: 1px solid #eee; 57 | // Close icon 58 | .close { margin-top: 2px; } 59 | } 60 | 61 | // Body (where all modal content resises) 62 | .modal-body { 63 | padding: 15px; 64 | } 65 | // Remove bottom margin if need be 66 | .modal-body .modal-form { 67 | margin-bottom: 0; 68 | } 69 | 70 | // Footer (for actions) 71 | .modal-footer { 72 | padding: 14px 15px 15px; 73 | margin-bottom: 0; 74 | background-color: #f5f5f5; 75 | border-top: 1px solid #ddd; 76 | @include border-radius(0 0 6px 6px); 77 | @include box-shadow(inset 0 1px 0 $white); 78 | @include clearfix(); 79 | .btn { 80 | float: right; 81 | margin-left: 5px; 82 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/_pag_wordpress.scss: -------------------------------------------------------------------------------- 1 | // main: extra.scss 2 | 3 | // Notícias (Wordpress API) 4 | // ========================================================================== 5 | 6 | // Lista com todas as notícias 7 | #noticia-list { 8 | h1 { 9 | margin: 0 0 14px; 10 | } 11 | 12 | div.noticia h4 { 13 | font-size: 18px; 14 | } 15 | } 16 | 17 | // Uma única notícia 18 | .noticia { 19 | & > .module { 20 | margin: 0; 21 | } 22 | 23 | &#noticia-content { 24 | div.module-content { 25 | position: relative; 26 | padding: 0; 27 | @media (max-width: 767px) { 28 | padding: 17px 25px 25px 25px; 29 | } 30 | .conteudo { 31 | padding-top: 10px; 32 | } 33 | } 34 | h1{ 35 | margin-bottom: 20px; 36 | font-size: 24px; 37 | } 38 | a, a:link, a:active { 39 | color: #769F29; 40 | text-decoration: none; 41 | } 42 | } 43 | 44 | &#noticia-sidebar { 45 | // Remove "Continuar lendo..." do Wordpress 46 | .module-content a { 47 | position: absolute !important; 48 | top: -9999px !important; 49 | left: -9999px !important; 50 | } 51 | } 52 | } 53 | 54 | 55 | // Páginas (Wordpress API) 56 | // ========================================================================== 57 | #pagina { 58 | #content { 59 | border: 1px solid #7d99aa; 60 | -moz-box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.3); 61 | -webkit-box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.3); 62 | margin-top: 20px; 63 | margin-bottom: 30px; 64 | font-size: 16px; 65 | line-height: 1.5em; 66 | // ------- 67 | -moz-border-radius: 5px; 68 | border-radius: 5px; 69 | margin-bottom: 30px; 70 | background: #ececec url('../img/bg/bg_boxes.png') 0 0 repeat; 71 | 72 | h1 { 73 | margin-top: 0; 74 | margin-bottom: 15px; 75 | } 76 | .wrapper { 77 | background: none; 78 | border: none; 79 | box-shadow: none; 80 | } 81 | .page-header { 82 | background: none; 83 | padding-top: 0; 84 | } 85 | 86 | a, a:link, a:active { 87 | color: #769F29; 88 | text-decoration: none; 89 | } 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/controllers/aplicativos.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import ckan.plugins as p 4 | from ckan.lib.base import c, g, render, model 5 | from pylons import request, response 6 | from pylons.controllers.util import redirect 7 | import requests 8 | 9 | # Wordpress integration 10 | import ckanext.dadosgovbr.helpers.wordpress as wp 11 | 12 | # ============================================================ 13 | # Aplicativos 14 | # ============================================================ 15 | class AplicativosController(p.toolkit.BaseController): 16 | def index (ctrl): 17 | # Query 18 | from ckan.logic import get_action 19 | context = {'model': model, 'session': model.Session, 20 | 'user': c.user or c.author} 21 | 22 | # Get "aplicativos" 23 | data_dict = {'fq': 'type:aplicativo'} 24 | c.aplicativos = get_action('package_search')(context, data_dict)['results'] 25 | 26 | # Get page content from Wordpress 27 | wp_page_slug = 'scheming_aplicativos' 28 | c.wp_page = type('Nothing', (object,), {}) 29 | c.wp_page.content = type('Nothing', (object,), {}) 30 | c.wp_page.content.rendered = "Conteudo da pagina nao encontrado..." 31 | try: 32 | c.wp_page = wp.page(wp_page_slug) 33 | except: 34 | pass 35 | 36 | # DEBUG 37 | # from pprint import pprint 38 | # pprint(c.aplicativos) 39 | 40 | 41 | # Get search params from URL 42 | if request.method == 'GET' and 's' in request.GET: 43 | c.s_result = request.GET['s'] 44 | else: 45 | c.s_result = "" 46 | 47 | 48 | return render('scheming/aplicativo/search_bkp.html') 49 | 50 | 51 | 52 | def single (ctrl, title): 53 | from ckan.logic import get_action 54 | context = {'model': model, 'session': model.Session, 55 | 'user': c.user or c.author} 56 | 57 | # Get app 58 | data_dict = {'id': title, 'include_extras': 'True'} 59 | app = get_action('package_show')(context, data_dict) 60 | c.app_dict = app 61 | 62 | # DEBUG 63 | from pprint import pprint 64 | pprint(app) 65 | 66 | c.app_title = title 67 | return render("scheming/aplicativo_modal.html") 68 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/concurso/read.html: -------------------------------------------------------------------------------- 1 | {% extends "scheming/concurso/read_base.html" %} 2 | 3 | {% block breadcrumb_content %} 4 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 5 |
  • {{pkg.title|safe}}
  • 6 | {% endblock %} 7 | 8 | {% block primary_content_inner %} 9 | {{ super() }} 10 | {% block package_description %} 11 | {% if pkg.private %} 12 | 13 | 14 | {{ _('Private') }} 15 | 16 | {% endif %} 17 |

    18 | {% block page_heading %} 19 | {{ h.dataset_display_name(pkg) }} 20 | {% if pkg.state.startswith('draft') %} 21 | [{{ _('Draft') }}] 22 | {% endif %} 23 | {% if pkg.state == 'deleted' %} 24 | [{{ _('Deleted') }}] 25 | {% endif %} 26 | {% endblock %} 27 |

    28 | {% block package_notes %} 29 | {% if pkg.notes %} 30 |
    31 |
    32 | {{ h.render_markdown(pkg.notes) }} 33 |
    34 | {% endif %} 35 | {% endblock %} 36 | {# FIXME why is this here? seems wrong #} 37 | 38 | {% endblock %} 39 | 40 | {% block package_tags %} 41 |
    42 | {% snippet "package/snippets/tags.html", tags=pkg.tags %} 43 |
    44 | 54 | {% endblock %} 55 | 56 | {% block package_resources %} 57 | {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} 58 |
    59 | {% endblock %} 60 | 61 | {% block package_additional_info %} 62 | {% snippet "scheming/snippets/additional_info.html", pkg_dict=pkg %} 63 | {% endblock %} 64 | 65 | {% endblock %} 66 | 67 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/inventario/read.html: -------------------------------------------------------------------------------- 1 | {% extends "scheming/inventario/read_base.html" %} 2 | 3 | {% block breadcrumb_content %} 4 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 5 |
  • {{pkg.title|safe}}
  • 6 | {% endblock %} 7 | 8 | {% block primary_content_inner %} 9 | {{ super() }} 10 | {% block package_description %} 11 | {% if pkg.private %} 12 | 13 | 14 | {{ _('Private') }} 15 | 16 | {% endif %} 17 |

    18 | {% block page_heading %} 19 | {{ h.dataset_display_name(pkg) }} 20 | {% if pkg.state.startswith('draft') %} 21 | [{{ _('Draft') }}] 22 | {% endif %} 23 | {% if pkg.state == 'deleted' %} 24 | [{{ _('Deleted') }}] 25 | {% endif %} 26 | {% endblock %} 27 |

    28 | {% block package_notes %} 29 | {% if pkg.notes %} 30 |
    31 |
    32 | {{ h.render_markdown(pkg.notes) }} 33 |
    34 | {% endif %} 35 | {% endblock %} 36 | {# FIXME why is this here? seems wrong #} 37 | 38 | {% endblock %} 39 | 40 | {% block package_tags %} 41 |
    42 | {% snippet "package/snippets/tags.html", tags=pkg.tags %} 43 |
    44 | 54 | {% endblock %} 55 | 56 | {% block package_resources %} 57 | {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} 58 |
    59 | {% endblock %} 60 | 61 | {% block package_additional_info %} 62 | {% snippet "scheming/snippets/additional_info.html", pkg_dict=pkg %} 63 | {% endblock %} 64 | 65 | {% endblock %} 66 | 67 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/read.html: -------------------------------------------------------------------------------- 1 | {% extends "scheming/aplicativo/read_base.html" %} 2 | 3 | {% block breadcrumb_content %} 4 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 5 |
  • {{pkg.title|safe}}
  • 6 | {% endblock %} 7 | 8 | {% block primary_content_inner %} 9 | {{ super() }} 10 | {% block package_description %} 11 | {% if pkg.private %} 12 | 13 | 14 | {{ _('Private') }} 15 | 16 | {% endif %} 17 |

    18 | {% block page_heading %} 19 | {{ h.dataset_display_name(pkg) }} 20 | {% if pkg.state.startswith('draft') %} 21 | [{{ _('Draft') }}] 22 | {% endif %} 23 | {% if pkg.state == 'deleted' %} 24 | [{{ _('Deleted') }}] 25 | {% endif %} 26 | {% endblock %} 27 |

    28 | {% block package_notes %} 29 | {% if pkg.notes %} 30 |
    31 |
    32 | {{ h.render_markdown(pkg.notes) }} 33 |
    34 | {% endif %} 35 | {% endblock %} 36 | {# FIXME why is this here? seems wrong #} 37 | 38 | {% endblock %} 39 | 40 | {% block package_tags %} 41 |
    42 | {% snippet "package/snippets/tags.html", tags=pkg.tags %} 43 |
    44 | 54 | {% endblock %} 55 | 56 | {% block package_resources %} 57 | {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} 58 |
    59 | {% endblock %} 60 | 61 | {% block package_additional_info %} 62 | {% snippet "scheming/snippets/additional_info.html", pkg_dict=pkg %} 63 | {% endblock %} 64 | 65 | {% endblock %} 66 | 67 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_progress-bars.scss: -------------------------------------------------------------------------------- 1 | // PROGRESS BARS 2 | // ------------- 3 | 4 | 5 | // ANIMATIONS 6 | // ---------- 7 | 8 | // Webkit 9 | @-webkit-keyframes progress-bar-stripes { 10 | from { background-position: 0 0; } 11 | to { background-position: 40px 0; } 12 | } 13 | 14 | // Firefox 15 | @-moz-keyframes progress-bar-stripes { 16 | from { background-position: 0 0; } 17 | to { background-position: 40px 0; } 18 | } 19 | 20 | // Spec 21 | @keyframes progress-bar-stripes { 22 | from { background-position: 0 0; } 23 | to { background-position: 40px 0; } 24 | } 25 | 26 | 27 | 28 | // THE BARS 29 | // -------- 30 | 31 | // Outer container 32 | .progress { 33 | overflow: hidden; 34 | height: 18px; 35 | margin-bottom: 18px; 36 | @include gradient-vertical(#f5f5f5, #f9f9f9); 37 | @include box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 38 | @include border-radius(4px); 39 | } 40 | 41 | // Bar of progress 42 | .progress .bar { 43 | width: 0%; 44 | height: 18px; 45 | color: $white; 46 | font-size: 12px; 47 | text-align: center; 48 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 49 | @include gradient-vertical(#149bdf, #0480be); 50 | @include box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 51 | @include box-sizing(border-box); 52 | @include transition(width .6s ease); 53 | } 54 | 55 | // Striped bars 56 | .progress-striped .bar { 57 | @include gradient-striped(#62c462); 58 | @include background-size(40px 40px); 59 | } 60 | 61 | // Call animation for the active one 62 | .progress.active .bar { 63 | -webkit-animation: progress-bar-stripes 2s linear infinite; 64 | -moz-animation: progress-bar-stripes 2s linear infinite; 65 | animation: progress-bar-stripes 2s linear infinite; 66 | } 67 | 68 | 69 | 70 | // COLORS 71 | // ------ 72 | 73 | // Danger (red) 74 | .progress-danger .bar { 75 | @include gradient-vertical(#ee5f5b, #c43c35); 76 | } 77 | .progress-danger.progress-striped .bar { 78 | @include gradient-striped(#ee5f5b); 79 | } 80 | 81 | // Success (green) 82 | .progress-success .bar { 83 | @include gradient-vertical(#62c462, #57a957); 84 | } 85 | .progress-success.progress-striped .bar { 86 | @include gradient-striped(#62c462); 87 | } 88 | 89 | // Info (teal) 90 | .progress.info .bar { 91 | @include gradient-vertical(#5bc0de, #339bb9); 92 | } 93 | .progress-info.progress-striped .bar { 94 | @include gradient-striped(#5bc0de); 95 | } 96 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/snippets/search_result_text.html: -------------------------------------------------------------------------------- 1 | {# 2 | 3 | Displays a test for results of a search. 4 | 5 | query - The text that was searched for 6 | count - The number of results for the search 7 | type - Search result type (dataset, group, organization) 8 | 9 | Example: 10 | 11 | {% snippet 'snippets/search_result_text.html', query=query, count=count, type='dataset' %} 12 | 13 | #} 14 | {% if type == 'dataset' %} 15 | {% set pkg_name=h.dadosgovbr_get_schema_title() %} 16 | {% set pkg_name_plural=h.dadosgovbr_get_schema_title(plural=True) %} 17 | {% set text_query = ungettext('{number} pkg_name encontrado para "{query}"'.replace('pkg_name',pkg_name), '{number} pkg_name_plural encontrados para "{query}"'.replace('pkg_name_plural',pkg_name_plural), count) %} 18 | {% set text_query_none = _('Nenhum pkg_name encontrado para "{query}"'.replace('pkg_name',pkg_name)) %} 19 | {% set text_no_query = ungettext('{number} pkg_name encontrado(s)'.replace('pkg_name',pkg_name), '{number} pkg_name_plural encontrado(s)', count).replace('pkg_name_plural',pkg_name_plural) %} 20 | {% set text_no_query_none = _('Nenhum pkg_name encontrado'.replace('pkg_name',pkg_name)) %} 21 | 22 | {% elif type == 'group' %} 23 | {% set text_query = ungettext('{number} group found for "{query}"', '{number} groups found for "{query}"', count) %} 24 | {% set text_query_none = _('No groups found for "{query}"') %} 25 | {% set text_no_query = ungettext('{number} group found', '{number} groups found', count) %} 26 | {% set text_no_query_none = _('No groups found') %} 27 | 28 | {% elif type == 'organization' %} 29 | {% set text_query = ungettext('{number} organization found for "{query}"', '{number} organizations found for "{query}"', count) %} 30 | {% set text_query_none = _('No organizations found for "{query}"') %} 31 | {% set text_no_query = ungettext('{number} organization found', '{number} organizations found', count) %} 32 | {% set text_no_query_none = _('No organizations found') %} 33 | {%- endif -%} 34 | 35 | {% if query %} 36 | {%- if count -%} 37 | {{ text_query.format(number=h.localised_number(count), query=query) }} 38 | {%- else -%} 39 | {{ text_query_none.format(query=query) }} 40 | {%- endif -%} 41 | {%- else -%} 42 | {%- if count -%} 43 | {{ text_no_query.format(number=h.localised_number(count)) }} 44 | {%- else -%} 45 | {{ text_no_query_none }} 46 | {%- endif -%} 47 | {%- endif -%} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_carousel.scss: -------------------------------------------------------------------------------- 1 | // CAROUSEL 2 | // -------- 3 | 4 | .carousel { 5 | position: relative; 6 | margin-bottom: $baseLineHeight; 7 | line-height: 1; 8 | } 9 | 10 | .carousel-inner { 11 | overflow: hidden; 12 | width: 100%; 13 | position: relative; 14 | } 15 | 16 | .carousel { 17 | 18 | .item { 19 | display: none; 20 | position: relative; 21 | @include transition(.6s ease-in-out left); 22 | } 23 | 24 | // Account for jankitude on images 25 | .item > img { 26 | display: block; 27 | line-height: 1; 28 | } 29 | 30 | .active, 31 | .next, 32 | .prev { display: block; } 33 | 34 | .active { 35 | left: 0; 36 | } 37 | 38 | .next, 39 | .prev { 40 | position: absolute; 41 | top: 0; 42 | width: 100%; 43 | } 44 | 45 | .next { 46 | left: 100%; 47 | } 48 | .prev { 49 | left: -100%; 50 | } 51 | .next.left, 52 | .prev.right { 53 | left: 0; 54 | } 55 | 56 | .active.left { 57 | left: -100%; 58 | } 59 | .active.right { 60 | left: 100%; 61 | } 62 | 63 | } 64 | 65 | // Left/right controls for nav 66 | // --------------------------- 67 | 68 | .carousel-control { 69 | position: absolute; 70 | top: 40%; 71 | left: 15px; 72 | width: 40px; 73 | height: 40px; 74 | margin-top: -20px; 75 | font-size: 60px; 76 | font-weight: 100; 77 | line-height: 30px; 78 | color: $white; 79 | text-align: center; 80 | background: $grayDarker; 81 | border: 3px solid $white; 82 | @include border-radius(23px); 83 | @include opacity(50); 84 | 85 | // we can't have this transition here 86 | // because webkit cancels the carousel 87 | // animation if you trip this while 88 | // in the middle of another animation 89 | // ;_; 90 | // .transition(opacity .2s linear); 91 | 92 | // Reposition the right one 93 | &.right { 94 | left: auto; 95 | right: 15px; 96 | } 97 | 98 | // Hover state 99 | &:hover { 100 | color: $white; 101 | text-decoration: none; 102 | @include opacity(90); 103 | } 104 | } 105 | 106 | // Caption for text below images 107 | // ----------------------------- 108 | 109 | .carousel-caption { 110 | position: absolute; 111 | left: 0; 112 | right: 0; 113 | bottom: 0; 114 | padding: 10px 15px 5px; 115 | background: $grayDark; 116 | background: rgba(0,0,0,.75); 117 | } 118 | .carousel-caption h4, 119 | .carousel-caption p { 120 | color: $white; 121 | } 122 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/read.html: -------------------------------------------------------------------------------- 1 | {% set pkg = c.pkg_dict %} 2 | 3 | {# Scheming pages #} 4 | {% set pkg_type = h.dadosgovbr_get_schema_name() %} 5 | {% set pkg_type = '' %} 6 | {% if pkg_type == 'aplicativo' %} 7 | {% snippet "scheming/aplicativo/read.html", pkg=pkg %} 8 | {% elif pkg_type == 'concurso' %} 9 | {% snippet "scheming/concurso/read.html", pkg=pkg %} 10 | {% elif pkg_type == 'inventario' %} 11 | {% snippet "scheming/inventario/read.html", pkg=pkg %} 12 | 13 | {% else %} 14 | {% extends "package/read_base.html" %} 15 | {% block primary_content_inner %} 16 | {{ super() }} 17 | {% block package_description %} 18 | {% if pkg.private %} 19 | 20 | 21 | {{ _('Private') }} 22 | 23 | {% endif %} 24 |

    25 | {% block page_heading %} 26 | {{ h.dataset_display_name(pkg) }} 27 | {% if pkg.state.startswith('draft') %} 28 | [{{ _('Draft') }}] 29 | {% endif %} 30 | {% if pkg.state == 'deleted' %} 31 | [{{ _('Deleted') }}] 32 | {% endif %} 33 | {% endblock %} 34 |

    35 | {% block package_notes %} 36 | {% if pkg.notes %} 37 |
    38 |
    39 | {{ h.render_markdown(pkg.notes) }} 40 |
    41 | {% endif %} 42 | {% endblock %} 43 | {# FIXME why is this here? seems wrong #} 44 | 45 | {% endblock %} 46 | 47 | {% block package_tags %} 48 |
    49 | {% snippet "package/snippets/tags.html", tags=pkg.tags %} 50 | 51 | {% if h.dadosgovbr_eouv_is_avaliable() %} 52 | {% if h.dadosgovbr_get_organization_extra(pkg.organization.name, 'siorg') %} 53 | 54 | 55 | 56 | {% snippet "package/snippets/eouv.html", pkg_name=pkg.name %} 57 | {% endif %} 58 | {% endif %} 59 |
    60 | {% endblock %} 61 | 62 | {% block package_resources %} 63 | {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} 64 |
    65 | {% endblock %} 66 | 67 | {% block package_additional_info %} 68 | {% snippet "package/snippets/additional_info.html", pkg_dict=pkg %} 69 | {% endblock %} 70 | 71 | {% endblock %} 72 | 73 | 74 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/read_base.html: -------------------------------------------------------------------------------- 1 | {% extends "package/base.html" %} 2 | 3 | {% block subtitle %}{{ h.dataset_display_name(pkg) }} - {{ super() }}{% endblock %} 4 | 5 | {% block head_extras -%} 6 | {{ super() }} 7 | {% set description = h.markdown_extract(pkg.notes, extract_length=200)|forceescape %} 8 | 9 | 10 | {% endblock -%} 11 | 12 | {% block content_action %} 13 | {% if h.check_access('package_update', {'id':pkg.id }) %} 14 | {% link_for _('Manage'), controller='package', action='edit', id=pkg.name, class_='btn', icon='wrench' %} 15 | {% endif %} 16 | {% endblock %} 17 | 18 | {% block content_primary_nav %} 19 |
  • 20 | {{h.dadosgovbr_get_schema_title().title()}} 21 |
  • 22 | {% if c.userobj.sysadmin %} 23 | {{ h.build_nav_icon('dataset_groups', _('Groups'), id=pkg.name) }} 24 | {{ h.build_nav_icon('dataset_activity', _('Activity Stream'), id=pkg.name) }} 25 | {% endif %} 26 | {% endblock %} 27 | 28 | {% block primary_content_inner %} 29 | {% block package_revision_info %} 30 | {% if c.revision_date %} 31 |
    32 |

    33 | {% set timestamp = h.render_datetime(c.revision_date, with_hours=True) %} 34 | {% set url = h.url_for(controller='package', action='read', id=pkg.name) %} 35 | 36 | {% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the current revision.{% endtrans %} 37 |

    38 |
    39 | {% endif %} 40 | {% endblock %} 41 | {% endblock %} 42 | 43 | {% block secondary_content %} 44 | 45 | {% block secondary_help_content %}{% endblock %} 46 | 47 | {% block package_info %} 48 | {% snippet 'package/snippets/info.html', pkg=pkg %} 49 | {% endblock %} 50 | 51 | {% block package_organization %} 52 | {% if pkg.organization %} 53 | {% set org = h.get_organization(pkg.organization.name) %} 54 | {% snippet "snippets/organization.html", organization=org, has_context_title=true %} 55 | {% endif %} 56 | {% endblock %} 57 | 58 | {% block package_social %} 59 | {% snippet "snippets/social.html" %} 60 | {% endblock %} 61 | 62 | {% block package_license %} 63 | {% snippet "snippets/license.html", pkg_dict=pkg %} 64 | {% endblock %} 65 | 66 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/concurso/read_base.html: -------------------------------------------------------------------------------- 1 | {% extends "package/base.html" %} 2 | 3 | {% block subtitle %}{{ h.dataset_display_name(pkg) }} - {{ super() }}{% endblock %} 4 | 5 | {% block head_extras -%} 6 | {{ super() }} 7 | {% set description = h.markdown_extract(pkg.notes, extract_length=200)|forceescape %} 8 | 9 | 10 | {% endblock -%} 11 | 12 | {% block content_action %} 13 | {% if h.check_access('package_update', {'id':pkg.id }) %} 14 | {% link_for _('Manage'), controller='package', action='edit', id=pkg.name, class_='btn', icon='wrench' %} 15 | {% endif %} 16 | {% endblock %} 17 | 18 | {% block content_primary_nav %} 19 |
  • 20 | {{h.dadosgovbr_get_schema_title().title()}} 21 |
  • 22 | {% if c.userobj.sysadmin %} 23 | {{ h.build_nav_icon('dataset_groups', _('Groups'), id=pkg.name) }} 24 | {{ h.build_nav_icon('dataset_activity', _('Activity Stream'), id=pkg.name) }} 25 | {% endif %} 26 | {% endblock %} 27 | 28 | {% block primary_content_inner %} 29 | {% block package_revision_info %} 30 | {% if c.revision_date %} 31 |
    32 |

    33 | {% set timestamp = h.render_datetime(c.revision_date, with_hours=True) %} 34 | {% set url = h.url_for(controller='package', action='read', id=pkg.name) %} 35 | 36 | {% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the current revision.{% endtrans %} 37 |

    38 |
    39 | {% endif %} 40 | {% endblock %} 41 | {% endblock %} 42 | 43 | {% block secondary_content %} 44 | 45 | {% block secondary_help_content %}{% endblock %} 46 | 47 | {% block package_info %} 48 | {% snippet 'package/snippets/info.html', pkg=pkg %} 49 | {% endblock %} 50 | 51 | {% block package_organization %} 52 | {% if pkg.organization %} 53 | {% set org = h.get_organization(pkg.organization.name) %} 54 | {% snippet "snippets/organization.html", organization=org, has_context_title=true %} 55 | {% endif %} 56 | {% endblock %} 57 | 58 | {% block package_social %} 59 | {% snippet "snippets/social.html" %} 60 | {% endblock %} 61 | 62 | {% block package_license %} 63 | {% snippet "snippets/license.html", pkg_dict=pkg %} 64 | {% endblock %} 65 | 66 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/inventario/read_base.html: -------------------------------------------------------------------------------- 1 | {% extends "package/base.html" %} 2 | 3 | {% block subtitle %}{{ h.dataset_display_name(pkg) }} - {{ super() }}{% endblock %} 4 | 5 | {% block head_extras -%} 6 | {{ super() }} 7 | {% set description = h.markdown_extract(pkg.notes, extract_length=200)|forceescape %} 8 | 9 | 10 | {% endblock -%} 11 | 12 | {% block content_action %} 13 | {% if h.check_access('package_update', {'id':pkg.id }) %} 14 | {% link_for _('Manage'), controller='package', action='edit', id=pkg.name, class_='btn', icon='wrench' %} 15 | {% endif %} 16 | {% endblock %} 17 | 18 | {% block content_primary_nav %} 19 |
  • 20 | {{h.dadosgovbr_get_schema_title().title()}} 21 |
  • 22 | {% if c.userobj.sysadmin %} 23 | {{ h.build_nav_icon('dataset_groups', _('Groups'), id=pkg.name) }} 24 | {{ h.build_nav_icon('dataset_activity', _('Activity Stream'), id=pkg.name) }} 25 | {% endif %} 26 | {% endblock %} 27 | 28 | {% block primary_content_inner %} 29 | {% block package_revision_info %} 30 | {% if c.revision_date %} 31 |
    32 |

    33 | {% set timestamp = h.render_datetime(c.revision_date, with_hours=True) %} 34 | {% set url = h.url_for(controller='package', action='read', id=pkg.name) %} 35 | 36 | {% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the current revision.{% endtrans %} 37 |

    38 |
    39 | {% endif %} 40 | {% endblock %} 41 | {% endblock %} 42 | 43 | {% block secondary_content %} 44 | 45 | {% block secondary_help_content %}{% endblock %} 46 | 47 | {% block package_info %} 48 | {% snippet 'package/snippets/info.html', pkg=pkg %} 49 | {% endblock %} 50 | 51 | {% block package_organization %} 52 | {% if pkg.organization %} 53 | {% set org = h.get_organization(pkg.organization.name) %} 54 | {% snippet "snippets/organization.html", organization=org, has_context_title=true %} 55 | {% endif %} 56 | {% endblock %} 57 | 58 | {% block package_social %} 59 | {% snippet "snippets/social.html" %} 60 | {% endblock %} 61 | 62 | {% block package_license %} 63 | {% snippet "snippets/license.html", pkg_dict=pkg %} 64 | {% endblock %} 65 | 66 | {% endblock %} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/dadosgovbr/ckanext-dadosgovbr.svg?branch=master)](https://travis-ci.org/dadosgovbr/ckanext-dadosgovbr) 2 | 3 | # ckanext-dadosgovbr 4 | Plugin / Tema do Portal de Dados Abertos do Governo Federal - Brasil 5 | 6 | ## Requisitos 7 | 8 | - CKAN 2.5.x / 2.6.x 9 | - Um grupo criado com o "name" igual a "dados-em-destaque" 10 | - Plugin: ckanext-scheming 11 | 12 | 13 | ## Instalação ckanext-dadosgovbr 14 | 15 | Ative o virtualenv: 16 | ``` 17 | # Entre no usuário onde o CKAN foi instalado 18 | su ckan 19 | 20 | # Ative o virtualenv 21 | . /usr/lib/ckan/default/bin/activate 22 | 23 | # Acesse o diretório de plugins 24 | cd /usr/lib/ckan/default/src 25 | ``` 26 | 27 | Instale o ckanext-dadosgovbr e as dependências: 28 | ``` 29 | # Instale o ckanext-dadosgovbr (última versão Beta) 30 | pip install -e git+https://github.com/dadosgovbr/ckanext-dadosgovbr.git@beta#egg=ckanext-dadosgovbr 31 | 32 | # Instale as dependências 33 | pip install -r /usr/lib/ckan/default/src/ckanext-dadosgovbr/pip-requirements.txt 34 | 35 | # Configure o plugin 36 | cd /usr/lib/ckan/default/src/ckanext-dadosgovbr && python setup.py develop 37 | ``` 38 | 39 | 40 | ## Configuração adicional 41 | 42 | ### Wordpress 43 | - O Wordpress precisa estar na versão 4.7 ou superior. 44 | - O plugin [WP-API/rest-filter](https://github.com/thenets/rest-filter) precisa estar instalado e ativado no Wordpress. 45 | - Adicione no arquivo `/etc/ckan/default/development.ini` as seguintes linhas, abaixo de `ckan.plugins = ...`: 46 | ``` 47 | # ckanext-dadosgovbr 48 | wordpress.domain = http://wordpress_url_aqui/ 49 | ``` 50 | 51 | ### Scheming 52 | Para ativar o suporte ao [ckanext-scheming](https://github.com/ckan/ckanext-scheming) e permitir novos tipos de pacotes criados pelo dados.gov.br, como "Inventário", "Concurso" e "Aplicativo", você deve instalar o ckanext-scheming e o ckanext-dadosgovbrschema: 53 | 54 | Ative o virtualenv: 55 | ``` 56 | # Entre no usuário onde o CKAN foi instalado 57 | su ckan 58 | 59 | # Ative o virtualenv 60 | . /usr/lib/ckan/default/bin/activate 61 | 62 | # Acesse o diretório de plugins 63 | cd /usr/lib/ckan/default/src 64 | ``` 65 | 66 | Instale o ckanext-scheming: 67 | 68 | ``` 69 | # Instale o ckanext-scheming 70 | pip install -e git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming 71 | 72 | # Instale as dependências 73 | pip install -r /usr/lib/ckan/default/src/ckanext-scheming/requirements.txt 74 | ``` 75 | 76 | Instale o ckanext-dadosgovbrschema: 77 | 78 | ``` 79 | # Instale o ckanext-dadosgovbrschema (última versão) 80 | pip install -e git+https://github.com/dadosgovbr/ckanext-dadosgovbrschema.git@beta#egg=ckanext-dadosgovbrschema 81 | 82 | # Instale as dependências 83 | pip install -r /usr/lib/ckan/default/src/ckanext-dadosgovbrschema/pip-requirements.txt 84 | 85 | # Configure o plugin 86 | cd /usr/lib/ckan/default/src/ckanext-dadosgovbrschema && python setup.py develop 87 | ``` 88 | 89 | Adicione no arquivo `/etc/ckan/default/development.ini` as seguintes linhas, abaixo da definição dos plugins: 90 | ``` 91 | scheming.dataset_schemas = ckanext.dadosgovbrschema:schema_aplicativo.json 92 | ckanext.dadosgovbrschema:schema_inventario.json 93 | ckanext.dadosgovbrschema:schema_concurso.json 94 | ``` 95 | 96 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/report/view.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | 3 | {% block title %}{{ report.title }} - {{ _('Reports') }} - {{ super() }}{% endblock %} 4 | 5 | {% block breadcrumb_content %} 6 | {{ h.build_nav('reports', _('Reports')) }} 7 | {{ h.build_nav('report-org' if '/organization' in request.environ.get('PATH_INFO', '') else 'report', report.title, report_name=report_name) }} 8 | {% endblock%} 9 | 10 | {% block secondary %} 11 | {% endblock%} 12 | {% block primary %} 13 |
    14 | {% block primary_content %} 15 | {{super()}} 16 | {% endblock %} 17 |
    18 | {% endblock %} 19 | 20 | {% block primary_content_inner %} 21 |

    {{ report.title }}

    22 |

    {{ report.description }}

    23 |

    24 | {{ _('Generated') }}: {{ h.report__render_datetime(report_date, '%d/%m/%Y %H:%M') }} 25 |

    26 | {% if c.userobj.sysadmin %} 27 |
    28 |
    {% trans %}Refresh report{% endtrans %}
    29 |
    30 |
    31 | 32 |
    33 |

    {{ _('As a system administrator you are able to refresh this report on demand by clicking the \'Refresh\' button.') }}

    34 |
    35 |
    36 | {% endif %} 37 | 38 | {% if options %} 39 |

    {{ _('Options') }}

    40 |
    41 | {% for key, value in options.items() %} 42 | {% if key in options_html %} 43 | {{ options_html[key]|safe }} 44 | {% else %} 45 | {{ key }}: {{ value }} 46 | 47 | {% endif %} 48 |
    49 | {% endfor %} 50 |
    51 | {% endif %} 52 | 53 | {% if are_some_results %} 54 |
    55 | {{ _('Download') }}: 56 | CSV 57 | JSON 58 |
    59 | {% endif %} 60 |

    {{ _('Results') }}

    61 | {% if not are_some_results %} 62 |

    {{ _('No results found.') }}

    63 | {% else %} 64 |
    65 | {% snippet report_template, table=data['table'], data=data, report_name=report_name, options=options %} 66 |
    67 | {% endif %} 68 |
    69 | {% endblock%} 70 | 71 | {% block scripts %} 72 | {{ super() }} 73 | 74 | 75 | 89 | {% endblock%} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/wordpress/posts.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | 3 | {% block title %}{{ _('Notícias') }} - {{ super() }}{% endblock %} 4 | 5 | {% block breadcrumb_content %} 6 |
  • Notícias
  • 7 | {% endblock %} 8 | 9 | {% macro wordpress_pagination(page_number) -%} 10 | 11 | 59 | {%- endmacro %} 60 | 61 | 62 | {% block primary %} 63 |
    64 | 65 | {% block primary_content %} 66 |
    67 | {% block page_header %} 68 | 71 | {% endblock %} 72 |
    73 | 74 | {% for post in c.wp_posts %} 75 |
    76 |

    {{h.dadosgovbr_format_timestamp(post.date,'%d/%m/%Y')}}

    77 |

    {{post.title.rendered|safe}}

    78 |

    {{post.excerpt.rendered|safe}}

    79 |

    leia mais

    80 |
    81 |
    82 | {% endfor %} 83 | 84 | {{ wordpress_pagination(c.wp_page_number) }} 85 |
    86 |
    87 | {% endblock %} 88 |
    89 | {% endblock %} 90 | 91 | 92 | {% block secondary %} 93 | {% endblock %} 94 | 95 | 96 | {% block sidebar %}{% endblock %} 97 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/package_item.html: -------------------------------------------------------------------------------- 1 | {# 2 | Displays a single of dataset. 3 | 4 | package - A package to display. 5 | item_class - The class name to use on the list item. 6 | hide_resources - If true hides the resources (default: false). 7 | banner - If true displays a popular banner (default: false). 8 | truncate - The length to trucate the description to (default: 180) 9 | truncate_title - The length to truncate the title to (default: 80). 10 | 11 | Example: 12 | 13 | {% snippet 'snippets/package_item.html', package=c.datasets[0] %} 14 | 15 | #} 16 | {% set truncate = truncate or 180 %} 17 | {% set truncate_title = truncate_title or 80 %} 18 | {% set title = package.title or package.name %} 19 | {% set notes = h.markdown_extract(package.notes, extract_length=truncate) %} 20 | 21 | {% block package_item %} 22 |
  • 23 | {% if package.image %} 24 | {{package.title}} 25 | {% endif %} 26 | 27 | {% block content %} 28 |
    29 | {% block heading %} 30 |

    31 | {% block heading_private %} 32 | {% if package.private %} 33 | 34 | 35 | {{ _('Private') }} 36 | 37 | {% endif %} 38 | {% endblock %} 39 | {% block heading_title %} 40 | {{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='package', action='read', id=package.name)) }} 41 | {% endblock %} 42 | {% block heading_meta %} 43 | {% if package.get('state', '').startswith('draft') %} 44 | {{ _('Draft') }} 45 | {% elif package.get('state', '').startswith('deleted') %} 46 | {{ _('Deleted') }} 47 | {% endif %} 48 | {{ h.popular('recent views', package.tracking_summary.recent, min=10) if package.tracking_summary }} 49 | {% endblock %} 50 |

    51 | {% endblock %} 52 | {% block banner %} 53 | {% if banner %} 54 | 55 | {% endif %} 56 | {% endblock %} 57 | {% block notes %} 58 | {% if notes %} 59 |
    {{ notes|urlize }}
    60 | {% else %} 61 |

    {{ _("This dataset has no description") }}

    62 | {% endif %} 63 | {% endblock %} 64 |
    65 | {% block resources %} 66 | {% if package.resources and not hide_resources %} 67 | {% block resources_outer %} 68 | 77 | {% endblock %} 78 | {% endif %} 79 | {% endblock %} 80 | {% endblock %} 81 |
  • 82 | {% endblock %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/concurso_search.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | {% import 'macros/form.html' as form %} 3 | 4 | {% block subtitle %}{{ _("Datasets") }}{% endblock %} 5 | 6 | {% block breadcrumb_content %} 7 |
  • Concursos
  • 8 | {% endblock %} 9 | 10 | {% block primary_content %} 11 |
    12 | 13 | 14 |
    15 | {% block page_primary_action %} 16 | {% if h.check_access('package_create') %} 17 |
    18 | 23 |
    24 | {% endif %} 25 | {% endblock %} 26 | 27 | 28 |
    29 | {{c.wp_page.content.rendered|safe}} 30 |
    31 | 32 | {% block form %} 33 | {% set facets = { 34 | 'fields': c.fields_grouped, 35 | 'search': c.search_facets, 36 | 'titles': c.facet_titles, 37 | 'translated_fields': c.translated_fields, 38 | 'remove_field': c.remove_field } 39 | %} 40 | {% set sorting = [ 41 | (_('Relevance'), 'score desc, metadata_modified desc'), 42 | (_('Name Ascending'), 'title_string asc'), 43 | (_('Name Descending'), 'title_string desc'), 44 | (_('Last Modified'), 'metadata_modified desc'), 45 | (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] 46 | %} 47 | {% snippet 'snippets/search_form.html', form_id='dataset-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %} 48 | {% endblock %} 49 | {% block package_search_results_list %} 50 | {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} 51 | {% endblock %} 52 |
    53 | 54 | {% block page_pagination %} 55 | {{ c.page.pager(q=c.q) }} 56 | {% endblock %} 57 |
    58 | 59 | {% block package_search_results_api %} 60 |
    61 |
    62 | {% block package_search_results_api_inner %} 63 | 64 | {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} 65 | {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version)) %} 66 | {% if g.dumps_url -%} 67 | {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} 68 | {% trans %} 69 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. 70 | {% endtrans %} 71 | {% else %} 72 | {% trans %} 73 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). 74 | {% endtrans %} 75 | {%- endif %} 76 | 77 | {% endblock %} 78 |
    79 |
    80 | {% endblock %} 81 | {% endblock %} 82 | 83 | 84 | {% block secondary_content %} 85 |
    86 |
    87 | {% for facet in c.facet_titles %} 88 | {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} 89 | {% endfor %} 90 |
    91 | close 92 |
    93 | {% endblock %} 94 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/inventario_search.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | {% import 'macros/form.html' as form %} 3 | 4 | {% block subtitle %}{{ _("Datasets") }}{% endblock %} 5 | 6 | {% block breadcrumb_content %} 7 |
  • Inventários
  • 8 | {% endblock %} 9 | 10 | {% block primary_content %} 11 |
    12 | 13 | 14 |
    15 | {% block page_primary_action %} 16 | {% if h.check_access('package_create') %} 17 | 24 | {% endif %} 25 | {% endblock %} 26 | 27 | 28 |
    29 | {{c.wp_page.content.rendered|safe}} 30 |
    31 | 32 | {% block form %} 33 | {% set facets = { 34 | 'fields': c.fields_grouped, 35 | 'search': c.search_facets, 36 | 'titles': c.facet_titles, 37 | 'translated_fields': c.translated_fields, 38 | 'remove_field': c.remove_field } 39 | %} 40 | {% set sorting = [ 41 | (_('Relevance'), 'score desc, metadata_modified desc'), 42 | (_('Name Ascending'), 'title_string asc'), 43 | (_('Name Descending'), 'title_string desc'), 44 | (_('Last Modified'), 'metadata_modified desc'), 45 | (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] 46 | %} 47 | {% snippet 'snippets/search_form.html', form_id='dataset-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %} 48 | {% endblock %} 49 | {% block package_search_results_list %} 50 | {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} 51 | {% endblock %} 52 |
    53 | 54 | {% block page_pagination %} 55 | {{ c.page.pager(q=c.q) }} 56 | {% endblock %} 57 |
    58 | 59 | {% block package_search_results_api %} 60 |
    61 |
    62 | {% block package_search_results_api_inner %} 63 | 64 | {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} 65 | {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version)) %} 66 | {% if g.dumps_url -%} 67 | {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} 68 | {% trans %} 69 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. 70 | {% endtrans %} 71 | {% else %} 72 | {% trans %} 73 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). 74 | {% endtrans %} 75 | {%- endif %} 76 | 77 | {% endblock %} 78 |
    79 |
    80 | {% endblock %} 81 | {% endblock %} 82 | 83 | 84 | {% block secondary_content %} 85 |
    86 |
    87 | {% for facet in c.facet_titles %} 88 | {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} 89 | {% endfor %} 90 |
    91 | close 92 |
    93 | {% endblock %} 94 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/concurso/search.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | {% import 'macros/form.html' as form %} 3 | 4 | {% block subtitle %}Concursos{% endblock %} 5 | 6 | {% block breadcrumb_content %} 7 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 8 | {% endblock %} 9 | 10 | {% block primary_content %} 11 |
    12 | 13 | 14 |
    15 | {% block page_primary_action %} 16 | {% if h.check_access('package_create') %} 17 | 24 | {% endif %} 25 | {% endblock %} 26 | 27 | 28 |
    29 | {{c.wp_page.content.rendered|safe}} 30 |
    31 | 32 | {% block form %} 33 | {% set facets = { 34 | 'fields': c.fields_grouped, 35 | 'search': c.search_facets, 36 | 'titles': c.facet_titles, 37 | 'translated_fields': c.translated_fields, 38 | 'remove_field': c.remove_field } 39 | %} 40 | {% set sorting = [ 41 | (_('Relevance'), 'score desc, metadata_modified desc'), 42 | (_('Name Ascending'), 'title_string asc'), 43 | (_('Name Descending'), 'title_string desc'), 44 | (_('Last Modified'), 'metadata_modified desc'), 45 | (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] 46 | %} 47 | {% snippet 'snippets/search_form.html', form_id='dataset-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %} 48 | {% endblock %} 49 | {% block package_search_results_list %} 50 | {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} 51 | {% endblock %} 52 |
    53 | 54 | {% block page_pagination %} 55 | {{ c.page.pager(q=c.q) }} 56 | {% endblock %} 57 |
    58 | 59 | {% block package_search_results_api %} 60 |
    61 |
    62 | {% block package_search_results_api_inner %} 63 | 64 | {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} 65 | {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version)) %} 66 | {% if g.dumps_url -%} 67 | {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} 68 | {% trans %} 69 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. 70 | {% endtrans %} 71 | {% else %} 72 | {% trans %} 73 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). 74 | {% endtrans %} 75 | {%- endif %} 76 | 77 | {% endblock %} 78 |
    79 |
    80 | {% endblock %} 81 | {% endblock %} 82 | 83 | 84 | {% block secondary_content %} 85 |
    86 |
    87 | {% for facet in c.facet_titles %} 88 | {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} 89 | {% endfor %} 90 |
    91 | close 92 |
    93 | {% endblock %} 94 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_dropdowns.scss: -------------------------------------------------------------------------------- 1 | // DROPDOWN MENUS 2 | // -------------- 3 | 4 | // Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns 5 | .dropdown { 6 | position: relative; 7 | } 8 | .dropdown-toggle { 9 | // The caret makes the toggle a bit too tall in IE7 10 | *margin-bottom: -3px; 11 | } 12 | .dropdown-toggle:active, 13 | .open .dropdown-toggle { 14 | outline: 0; 15 | } 16 | // Dropdown arrow/caret 17 | .caret { 18 | display: inline-block; 19 | width: 0; 20 | height: 0; 21 | text-indent: -99999px; 22 | // IE7 won't do the border trick if there's a text indent, but it doesn't 23 | // do the content that text-indent is hiding, either, so we're ok. 24 | *text-indent: 0; 25 | vertical-align: top; 26 | border-left: 4px solid transparent; 27 | border-right: 4px solid transparent; 28 | border-top: 4px solid $black; 29 | @include opacity(30); 30 | content: "\2193"; 31 | } 32 | .dropdown .caret { 33 | margin-top: 8px; 34 | margin-left: 2px; 35 | } 36 | .dropdown:hover .caret, 37 | .open.dropdown .caret { 38 | @include opacity(100); 39 | } 40 | // The dropdown menu (ul) 41 | .dropdown-menu { 42 | position: absolute; 43 | top: 100%; 44 | left: 0; 45 | z-index: $zindexDropdown; 46 | float: left; 47 | display: none; // none by default, but block on "open" of the menu 48 | //min-width: 160px; 49 | _width: 160px; 50 | padding: 4px 0; 51 | margin: 0; // override default ul 52 | list-style: none; 53 | background-color: $white; 54 | border-color: #ccc; 55 | border-color: rgba(0,0,0,.2); 56 | border-style: solid; 57 | border-width: 1px; 58 | @include border-radius(0 0 5px 5px); 59 | @include box-shadow(0 5px 10px rgba(0,0,0,.2)); 60 | -webkit-background-clip: padding-box; 61 | -moz-background-clip: padding; 62 | background-clip: padding-box; 63 | *border-right-width: 2px; 64 | *border-bottom-width: 2px; 65 | 66 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 67 | &.bottom-up { 68 | top: auto; 69 | bottom: 100%; 70 | margin-bottom: 2px; 71 | } 72 | 73 | // Dividers (basically an hr) within the dropdown 74 | .divider { 75 | height: 1px; 76 | margin: 5px 1px; 77 | overflow: hidden; 78 | background-color: #e5e5e5; 79 | border-bottom: 1px solid $white; 80 | 81 | // IE7 needs a set width since we gave a height. Restricting just 82 | // to IE7 to keep the 1px left/right space in other browsers. 83 | // It is unclear where IE is getting the extra space that we need 84 | // to negative-margin away, but so it goes. 85 | *width: 100%; 86 | *margin: -5px 0 5px; 87 | } 88 | 89 | // Links within the dropdown menu 90 | a { 91 | display: block; 92 | padding: 3px 15px; 93 | clear: both; 94 | font-weight: normal; 95 | line-height: $baseLineHeight; 96 | color: $gray; 97 | white-space: nowrap; 98 | } 99 | } 100 | 101 | // Hover state 102 | .dropdown-menu li > a:hover, 103 | .dropdown-menu .active > a, 104 | .dropdown-menu .active > a:hover { 105 | color: $white; 106 | text-decoration: none; 107 | background-color: $linkColor; 108 | } 109 | 110 | // Open state for the dropdown 111 | .dropdown.open { 112 | // IE7's z-index only goes to the nearest positioned ancestor, which would 113 | // make the menu appear below buttons that appeared later on the page 114 | *z-index: $zindexDropdown; 115 | 116 | .dropdown-toggle { 117 | color: $white; 118 | background: #ccc; 119 | background: rgba(0,0,0,.3); 120 | } 121 | .dropdown-menu { 122 | display: block; 123 | } 124 | } 125 | 126 | // Typeahead 127 | .typeahead { 128 | margin-top: 2px; // give it some space to breathe 129 | @include border-radius(4px); 130 | } 131 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/aplicativo/search.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | {% import 'macros/form.html' as form %} 3 | 4 | {% block subtitle %}Aplicativos{% endblock %} 5 | 6 | {% block breadcrumb_content %} 7 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 8 | {% endblock %} 9 | 10 | {% block primary_content %} 11 |
    12 | 13 | 14 |
    15 | {% block page_primary_action %} 16 | {% if h.check_access('package_create') %} 17 | 24 | {% endif %} 25 | {% endblock %} 26 | 27 | 28 |
    29 | {{c.wp_page.content.rendered|safe}} 30 |
    31 | 32 | {% block form %} 33 | {% set facets = { 34 | 'fields': c.fields_grouped, 35 | 'search': c.search_facets, 36 | 'titles': c.facet_titles, 37 | 'translated_fields': c.translated_fields, 38 | 'remove_field': c.remove_field } 39 | %} 40 | {% set sorting = [ 41 | (_('Relevance'), 'score desc, metadata_modified desc'), 42 | (_('Name Ascending'), 'title_string asc'), 43 | (_('Name Descending'), 'title_string desc'), 44 | (_('Last Modified'), 'metadata_modified desc'), 45 | (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] 46 | %} 47 | {% snippet 'snippets/search_form.html', form_id='dataset-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %} 48 | {% endblock %} 49 | {% block package_search_results_list %} 50 | {{ h.snippet('scheming/aplicativo/package_list.html', packages=c.page.items) }} 51 | {% endblock %} 52 |
    53 | 54 | {% block page_pagination %} 55 | {{ c.page.pager(q=c.q) }} 56 | {% endblock %} 57 |
    58 | 59 | {% block package_search_results_api %} 60 |
    61 |
    62 | {% block package_search_results_api_inner %} 63 | 64 | {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} 65 | {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version)) %} 66 | {% if g.dumps_url -%} 67 | {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} 68 | {% trans %} 69 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. 70 | {% endtrans %} 71 | {% else %} 72 | {% trans %} 73 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). 74 | {% endtrans %} 75 | {%- endif %} 76 | 77 | {% endblock %} 78 |
    79 |
    80 | {% endblock %} 81 | {% endblock %} 82 | 83 | 84 | {% block secondary_content %} 85 |
    86 |
    87 | {% for facet in c.facet_titles %} 88 | {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} 89 | {% endfor %} 90 |
    91 | close 92 |
    93 | {% endblock %} 94 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/scheming/inventario/search.html: -------------------------------------------------------------------------------- 1 | {% extends "page.html" %} 2 | {% import 'macros/form.html' as form %} 3 | 4 | {% block subtitle %}Inventários de bases de dados{% endblock %} 5 | 6 | {% block breadcrumb_content %} 7 |
  • {{h.dadosgovbr_get_schema_title(plural=True).title()}}
  • 8 | {% endblock %} 9 | 10 | {% block primary_content %} 11 |
    12 | 13 | 14 |
    15 | {% block page_primary_action %} 16 | {% if h.check_access('package_create') %} 17 | 24 | {% endif %} 25 | {% endblock %} 26 | 27 | 28 |
    29 | {{c.wp_page.content.rendered|safe}} 30 |
    31 | 32 | {% block form %} 33 | {% set facets = { 34 | 'fields': c.fields_grouped, 35 | 'search': c.search_facets, 36 | 'titles': c.facet_titles, 37 | 'translated_fields': c.translated_fields, 38 | 'remove_field': c.remove_field } 39 | %} 40 | {% set sorting = [ 41 | (_('Relevance'), 'score desc, metadata_modified desc'), 42 | (_('Name Ascending'), 'title_string asc'), 43 | (_('Name Descending'), 'title_string desc'), 44 | (_('Last Modified'), 'metadata_modified desc'), 45 | (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] 46 | %} 47 | {% snippet 'snippets/search_form.html', form_id='dataset-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %} 48 | {% endblock %} 49 | {% block package_search_results_list %} 50 | {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} 51 | {% endblock %} 52 |
    53 | 54 | {% block page_pagination %} 55 | {{ c.page.pager(q=c.q) }} 56 | {% endblock %} 57 |
    58 | 59 | {% block package_search_results_api %} 60 |
    61 |
    62 | {% block package_search_results_api_inner %} 63 | 64 | {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} 65 | {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version)) %} 66 | {% if g.dumps_url -%} 67 | {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} 68 | {% trans %} 69 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. 70 | {% endtrans %} 71 | {% else %} 72 | {% trans %} 73 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). 74 | {% endtrans %} 75 | {%- endif %} 76 | 77 | {% endblock %} 78 |
    79 |
    80 | {% endblock %} 81 | {% endblock %} 82 | 83 | 84 | {% block secondary_content %} 85 |
    86 |
    87 | {% for facet in c.facet_titles %} 88 | {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} 89 | {% endfor %} 90 |
    91 | close 92 |
    93 | {% endblock %} 94 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from setuptools import setup, find_packages # Always prefer setuptools over distutils 3 | from codecs import open # To use a consistent encoding 4 | from os import path 5 | 6 | here = path.abspath(path.dirname(__file__)) 7 | 8 | # Get the long description from the relevant file 9 | with open(path.join(here, 'README.rst'), encoding='utf-8') as f: 10 | long_description = f.read() 11 | 12 | setup( 13 | name='''ckanext-dadosgovbr''', 14 | 15 | # Versions should comply with PEP440. For a discussion on single-sourcing 16 | # the version across setup.py and the project code, see 17 | # http://packaging.python.org/en/latest/tutorial.html#version 18 | version='0.0.1', 19 | 20 | description='''''', 21 | long_description=long_description, 22 | 23 | # The project's main homepage. 24 | url='https://github.com/dadosgovbr/ckanext-dadosgovbr', 25 | 26 | # Author details 27 | author='''''', 28 | author_email='''''', 29 | 30 | # Choose your license 31 | license='AGPL', 32 | 33 | # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 34 | classifiers=[ 35 | # How mature is this project? Common values are 36 | # 3 - Alpha 37 | # 4 - Beta 38 | # 5 - Production/Stable 39 | 'Development Status :: 4 - Beta', 40 | 41 | # Pick your license as you wish (should match "license" above) 42 | 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 43 | 44 | # Specify the Python versions you support here. In particular, ensure 45 | # that you indicate whether you support Python 2, Python 3 or both. 46 | 'Programming Language :: Python :: 2.6', 47 | 'Programming Language :: Python :: 2.7', 48 | ], 49 | 50 | 51 | # What does your project relate to? 52 | keywords='''CKAN''', 53 | 54 | # You can just specify the packages manually here if your project is 55 | # simple. Or you can use find_packages(). 56 | packages=find_packages(exclude=['contrib', 'docs', 'tests*']), 57 | 58 | # List run-time dependencies here. These will be installed by pip when your 59 | # project is installed. For an analysis of "install_requires" vs pip's 60 | # requirements files see: 61 | # https://packaging.python.org/en/latest/technical.html#install-requires-vs-requirements-files 62 | install_requires=[], 63 | 64 | # If there are data files included in your packages that need to be 65 | # installed, specify them here. If using Python 2.6 or less, then these 66 | # have to be included in MANIFEST.in as well. 67 | include_package_data=True, 68 | package_data={ 69 | }, 70 | 71 | # Although 'package_data' is the preferred approach, in some case you may 72 | # need to place data files outside of your packages. 73 | # see http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files 74 | # In this case, 'data_file' will be installed into '/my_data' 75 | data_files=[], 76 | 77 | # To provide executable scripts, use entry points in preference to the 78 | # "scripts" keyword. Entry points provide cross-platform support and allow 79 | # pip to create the appropriate form of executable for the target platform. 80 | entry_points=''' 81 | [ckan.plugins] 82 | dadosgovbr=ckanext.dadosgovbr.plugin:DadosgovbrPlugin 83 | [babel.extractors] 84 | ckan = ckan.lib.extract:extract_ckan 85 | ''', 86 | 87 | # If you are changing from the default layout of your extension, you may 88 | # have to change the message extractors, you can read more about babel 89 | # message extraction at 90 | # http://babel.pocoo.org/docs/messages/#extraction-method-mapping-and-configuration 91 | message_extractors={ 92 | 'ckanext': [ 93 | ('**.py', 'python', None), 94 | ('**.js', 'javascript', None), 95 | ('**/templates/**.html', 'ckan', None), 96 | ], 97 | } 98 | ) 99 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_variables.scss: -------------------------------------------------------------------------------- 1 | // Variables.scss 2 | // Variables to customize the look and feel of Bootstrap 3 | // ----------------------------------------------------- 4 | 5 | 6 | 7 | // GLOBAL VALUES 8 | // -------------------------------------------------- 9 | 10 | // Links 11 | $linkColor: #08c !default; 12 | $linkColorHover: darken($linkColor, 15) !default; 13 | 14 | // Grays 15 | $black: #000 !default; 16 | $grayDarker: #222 !default; 17 | $grayDark: #333 !default; 18 | $gray: #555 !default; 19 | $grayLight: #999 !default; 20 | $grayLighter: #eee !default; 21 | $white: #fff !default; 22 | 23 | // Accent colors 24 | $blue: #049cdb !default; 25 | $blueDark: #0064cd !default; 26 | $green: #46a546 !default; 27 | $red: #9d261d !default; 28 | $yellow: #ffc40d !default; 29 | $orange: #f89406 !default; 30 | $pink: #c3325f !default; 31 | $purple: #7a43b6 !default; 32 | 33 | // Typography 34 | $baseFontSize: 13px !default; 35 | $baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif !default; 36 | $baseLineHeight: 18px !default; 37 | $textColor: $grayDark !default; 38 | 39 | // Buttons 40 | $primaryButtonBackground: $linkColor !default; 41 | 42 | 43 | 44 | // COMPONENT VARIABLES 45 | // -------------------------------------------------- 46 | 47 | // Z-index master list 48 | // Used for a bird's eye view of components dependent on the z-axis 49 | // Try to avoid customizing these :) 50 | $zindexDropdown: 1000 !default; 51 | $zindexPopover: 1010 !default; 52 | $zindexTooltip: 1020 !default; 53 | $zindexFixedNavbar: 1030 !default; 54 | $zindexModalBackdrop: 1040 !default; 55 | $zindexModal: 1050 !default; 56 | 57 | // Sprite icons path 58 | $iconSpritePath: "../img/glyphicons-halflings.png"; 59 | $iconWhiteSpritePath: "../img/glyphicons-halflings-white.png"; 60 | 61 | // Input placeholder text color 62 | $placeholderText: $grayLight !default; 63 | 64 | // Hr border color 65 | $hrBorder: $grayLighter !default; 66 | 67 | // Navbar 68 | $navbarHeight: 40px !default; 69 | $navbarBackground: $grayDarker !default; 70 | $navbarBackgroundHighlight: $grayDark !default; 71 | $navbarLinkBackgroundHover: transparent !default; 72 | 73 | $navbarText: $grayLight !default; 74 | $navbarLinkColor: $grayLight !default; 75 | $navbarLinkColorHover: $white !default; 76 | 77 | // Form states and alerts 78 | $warningText: #c09853 !default; 79 | $warningBackground: #fcf8e3 !default; 80 | $warningBorder: darken(adjust-hue($warningBackground, -10), 3%) !default; 81 | 82 | $errorText: #b94a48 !default; 83 | $errorBackground: #f2dede !default; 84 | $errorBorder: darken(adjust-hue($errorBackground, -10), 3%) !default; 85 | 86 | $successText: #468847 !default; 87 | $successBackground: #dff0d8 !default; 88 | $successBorder: darken(adjust-hue($successBackground, -10), 5%) !default; 89 | 90 | $infoText: #3a87ad !default; 91 | $infoBackground: #d9edf7 !default; 92 | $infoBorder: darken(adjust-hue($infoBackground, -10), 7%) !default; 93 | 94 | 95 | 96 | // GRID 97 | // -------------------------------------------------- 98 | 99 | // Default 940px grid 100 | $gridColumns: 12 !default; 101 | $gridColumnWidth: 60px !default; 102 | $gridGutterWidth: 20px !default; 103 | $gridRowWidth: ($gridColumns * $gridColumnWidth) + ($gridGutterWidth * ($gridColumns - 1)); 104 | 105 | // Fluid grid 106 | $fluidGridColumnWidth: 6.382978723% !default; 107 | $fluidGridGutterWidth: 2.127659574% !default; 108 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_tables.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Tables.scss 3 | // Tables for, you guessed it, tabular data 4 | // ---------------------------------------- 5 | 6 | 7 | // BASE TABLES 8 | // ----------------- 9 | 10 | table { 11 | max-width: 100%; 12 | border-collapse: collapse; 13 | border-spacing: 0; 14 | } 15 | 16 | // BASELINE STYLES 17 | // --------------- 18 | 19 | .table { 20 | width: 100%; 21 | margin-bottom: $baseLineHeight; 22 | // Cells 23 | th, 24 | td { 25 | padding: 8px; 26 | line-height: $baseLineHeight; 27 | text-align: left; 28 | vertical-align: top; 29 | border-top: 1px solid #ddd; 30 | } 31 | th { 32 | font-weight: bold; 33 | } 34 | // Bottom align for column headings 35 | thead th { 36 | vertical-align: bottom; 37 | } 38 | // Remove top border from thead by default 39 | thead:first-child tr th, 40 | thead:first-child tr td { 41 | border-top: 0; 42 | } 43 | // Account for multiple tbody instances 44 | tbody + tbody { 45 | border-top: 2px solid #ddd; 46 | } 47 | } 48 | 49 | 50 | 51 | // CONDENSED TABLE W/ HALF PADDING 52 | // ------------------------------- 53 | 54 | .table-condensed { 55 | th, 56 | td { 57 | padding: 4px 5px; 58 | } 59 | } 60 | 61 | 62 | // BORDERED VERSION 63 | // ---------------- 64 | 65 | .table-bordered { 66 | border: 1px solid #ddd; 67 | border-collapse: separate; // Done so we can round those corners! 68 | *border-collapse: collapsed; // IE7 can't round corners anyway 69 | @include border-radius(4px); 70 | th + th, 71 | td + td, 72 | th + td, 73 | td + th { 74 | border-left: 1px solid #ddd; 75 | } 76 | // Prevent a double border 77 | thead:first-child tr:first-child th, 78 | tbody:first-child tr:first-child th, 79 | tbody:first-child tr:first-child td { 80 | border-top: 0; 81 | } 82 | // For first th or td in the first row in the first thead or tbody 83 | thead:first-child tr:first-child th:first-child, 84 | tbody:first-child tr:first-child td:first-child { 85 | @include border-radius(4px 0 0 0); 86 | } 87 | thead:first-child tr:first-child th:last-child, 88 | tbody:first-child tr:first-child td:last-child { 89 | @include border-radius(0 4px 0 0); 90 | } 91 | // For first th or td in the first row in the first thead or tbody 92 | thead:last-child tr:last-child th:first-child, 93 | tbody:last-child tr:last-child td:first-child { 94 | @include border-radius(0 0 0 4px); 95 | } 96 | thead:last-child tr:last-child th:last-child, 97 | tbody:last-child tr:last-child td:last-child { 98 | @include border-radius(0 0 4px 0); 99 | } 100 | } 101 | 102 | 103 | // ZEBRA-STRIPING 104 | // -------------- 105 | 106 | // Default zebra-stripe styles (alternating gray and transparent backgrounds) 107 | .table-striped { 108 | tbody { 109 | tr:nth-child(odd) td, 110 | tr:nth-child(odd) th { 111 | background-color: #f9f9f9; 112 | } 113 | } 114 | } 115 | 116 | 117 | // HOVER EFFECT 118 | // ------------ 119 | // Placed here since it has to come after the potential zebra striping 120 | .table { 121 | tbody tr:hover td, 122 | tbody tr:hover th { 123 | background-color: #f5f5f5; 124 | } 125 | } 126 | 127 | 128 | // TABLE CELL SIZING 129 | // ----------------- 130 | 131 | // Change the columns 132 | @mixin tableColumns($columnSpan: 1) { 133 | float: none; 134 | width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16; 135 | margin-left: 0; 136 | } 137 | table { 138 | .span1 { @include tableColumns(1); } 139 | .span2 { @include tableColumns(2); } 140 | .span3 { @include tableColumns(3); } 141 | .span4 { @include tableColumns(4); } 142 | .span5 { @include tableColumns(5); } 143 | .span6 { @include tableColumns(6); } 144 | .span7 { @include tableColumns(7); } 145 | .span8 { @include tableColumns(8); } 146 | .span9 { @include tableColumns(9); } 147 | .span10 { @include tableColumns(10); } 148 | .span11 { @include tableColumns(11); } 149 | .span12 { @include tableColumns(12); } 150 | } 151 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/search.html: -------------------------------------------------------------------------------- 1 | {# Scheming pages #} 2 | {% set pkg = c.pkg_dict %} 3 | {% if pkg_type == 'aplicativo' %} 4 | {% snippet "scheming/aplicativo/search.html", package_type=pkg_type, c=c, sorting=sorting%} 5 | {% elif pkg_type == 'concurso' %} 6 | {% snippet "scheming/concurso/search.html", c=c, sorting=sorting%} 7 | {% elif pkg_type == 'inventario' %} 8 | {% snippet "scheming/inventario/search.html", c=c, sorting=sorting%} 9 | 10 | 11 | {# Default CKAN package #} 12 | {% else %} 13 | {% extends "page.html" %} 14 | {% import 'macros/form.html' as form %} 15 | 16 | {% block subtitle %}{{ _("Datasets") }}{% endblock %} 17 | 18 | {% block breadcrumb_content %} 19 |
  • {{ h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index') }}
  • 20 | {% endblock %} 21 | 22 | {% block primary_content %} 23 |
    24 |
    25 | {% block page_primary_action %} 26 | {% if h.check_access('package_create') %} 27 | 34 | {% endif %} 35 | {% endblock %} 36 | {% block form %} 37 | {% set facets = { 38 | 'fields': c.fields_grouped, 39 | 'search': c.search_facets, 40 | 'titles': c.facet_titles, 41 | 'translated_fields': c.translated_fields, 42 | 'remove_field': c.remove_field } 43 | %} 44 | {% set sorting = [ 45 | (_('Relevance'), 'score desc, metadata_modified desc'), 46 | (_('Name Ascending'), 'title_string asc'), 47 | (_('Name Descending'), 'title_string desc'), 48 | (_('Last Modified'), 'metadata_modified desc'), 49 | (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] 50 | %} 51 | {% snippet 'snippets/search_form.html', form_id='dataset-search-form', type='dataset', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %} 52 | {% endblock %} 53 | {% block package_search_results_list %} 54 | {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} 55 | {% endblock %} 56 |
    57 | 58 | {% block page_pagination %} 59 | {{ c.page.pager(q=c.q) }} 60 | {% endblock %} 61 |
    62 | 63 | {% block package_search_results_api %} 64 |
    65 |
    66 | {% block package_search_results_api_inner %} 67 | 68 | {% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %} 69 | {% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version)) %} 70 | {% if g.dumps_url -%} 71 | {% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %} 72 | {% trans %} 73 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}. 74 | {% endtrans %} 75 | {% else %} 76 | {% trans %} 77 | You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}). 78 | {% endtrans %} 79 | {%- endif %} 80 | 81 | {% endblock %} 82 |
    83 |
    84 | {% endblock %} 85 | {% endblock %} 86 | 87 | 88 | {% block secondary_content %} 89 |
    90 |
    91 | {% for facet in c.facet_titles %} 92 | {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} 93 | {% endfor %} 94 |
    95 | close 96 |
    97 | 98 | {% endblock %} 99 | {% endif %} -------------------------------------------------------------------------------- /ckanext/dadosgovbr/templates/package/snippets/package_form.html: -------------------------------------------------------------------------------- 1 | {% import 'macros/form.html' as form %} 2 | {% set action = c.form_action or '' %} 3 | 4 | {# This provides a full page that renders a form for adding a dataset. It can 5 | then itself be extended to add/remove blocks of functionality. #} 6 |
    7 | {% block stages %} 8 | {{ h.snippet('package/snippets/stages.html', stages=stage) }} 9 | {% endblock %} 10 | 11 | 12 | {# pkg_name used in 3 stage edit #} 13 | 14 | {% block errors %}{{ form.errors(error_summary) }}{% endblock %} 15 | 16 | {% block basic_fields %} 17 | {% snippet 'package/snippets/package_basic_fields.html', data=data, errors=errors, licenses=c.licenses, groups_available=c.groups_available %} 18 | {% endblock %} 19 | 20 | {% block metadata_fields %} 21 | {% snippet 'package/snippets/package_metadata_fields.html', data=data, errors=errors %} 22 | {% endblock %} 23 | 24 | {% block form_actions %} 25 |
    26 | {% block disclaimer %} 27 | {% if c.pkg_dict.type == 'dataset' %} 28 |

    29 | {%- trans -%} 30 | The data license you select above only applies to the contents 31 | of any resource files that you add to this dataset. By submitting 32 | this form, you agree to release the metadata values that you 33 | enter into the form under the 34 | Open Database License. 35 | {%- endtrans -%} 36 |

    37 | {% endif %} 38 | {% endblock %} 39 | {% block delete_button %} 40 | {% if h.check_access('package_delete', {'id': data.id}) and not data.state == 'deleted' %} 41 | {% block delete_button_text %}{{ _('Delete') }}{% endblock %} 42 | {% endif %} 43 | {% endblock %} 44 | {% block save_button %} 45 | {% if c.pkg_dict.type != 'dataset' and c.action=='edit' %} 46 | 47 | {% elif c.pkg_dict.type != 'dataset' and c.action=='new' %} 48 | 49 | {% else %} 50 | 51 | {% endif %} 52 | {% endblock %} 53 | {{ form.required_message() }} 54 |
    55 | {% endblock %} 56 |
    57 | 58 | 59 | -------------------------------------------------------------------------------- /ckanext/dadosgovbr/public/sass/old/twitter_bootstrap/_button-groups.scss: -------------------------------------------------------------------------------- 1 | // BUTTON GROUPS 2 | // ------------- 3 | 4 | 5 | // Make the div behave like a button 6 | .btn-group { 7 | position: relative; 8 | @include clearfix(); // clears the floated buttons 9 | @include ie7-restore-left-whitespace(); 10 | } 11 | 12 | // Space out series of button groups 13 | .btn-group + .btn-group { 14 | margin-left: 5px; 15 | } 16 | 17 | // Optional: Group multiple button groups together for a toolbar 18 | .btn-toolbar { 19 | margin-top: $baseLineHeight / 2; 20 | margin-bottom: $baseLineHeight / 2; 21 | .btn-group { 22 | display: inline-block; 23 | @include ie7-inline-block(); 24 | } 25 | } 26 | 27 | // Float them, remove border radius, then re-add to first and last elements 28 | .btn-group .btn { 29 | position: relative; 30 | float: left; 31 | margin-left: -1px; 32 | @include border-radius(0); 33 | } 34 | // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match 35 | .btn-group .btn:first-child { 36 | margin-left: 0; 37 | -webkit-border-top-left-radius: 4px; 38 | -moz-border-radius-topleft: 4px; 39 | border-top-left-radius: 4px; 40 | -webkit-border-bottom-left-radius: 4px; 41 | -moz-border-radius-bottomleft: 4px; 42 | border-bottom-left-radius: 4px; 43 | } 44 | .btn-group .btn:last-child, 45 | .btn-group .dropdown-toggle { 46 | -webkit-border-top-right-radius: 4px; 47 | -moz-border-radius-topright: 4px; 48 | border-top-right-radius: 4px; 49 | -webkit-border-bottom-right-radius: 4px; 50 | -moz-border-radius-bottomright: 4px; 51 | border-bottom-right-radius: 4px; 52 | } 53 | // Reset corners for large buttons 54 | .btn-group .btn.large:first-child { 55 | margin-left: 0; 56 | -webkit-border-top-left-radius: 6px; 57 | -moz-border-radius-topleft: 6px; 58 | border-top-left-radius: 6px; 59 | -webkit-border-bottom-left-radius: 6px; 60 | -moz-border-radius-bottomleft: 6px; 61 | border-bottom-left-radius: 6px; 62 | } 63 | .btn-group .btn.large:last-child, 64 | .btn-group .large.dropdown-toggle { 65 | -webkit-border-top-right-radius: 6px; 66 | -moz-border-radius-topright: 6px; 67 | border-top-right-radius: 6px; 68 | -webkit-border-bottom-right-radius: 6px; 69 | -moz-border-radius-bottomright: 6px; 70 | border-bottom-right-radius: 6px; 71 | } 72 | 73 | // On hover/focus/active, bring the proper btn to front 74 | .btn-group .btn:hover, 75 | .btn-group .btn:focus, 76 | .btn-group .btn:active, 77 | .btn-group .btn.active { 78 | z-index: 2; 79 | } 80 | 81 | // On active and open, don't show outline 82 | .btn-group .dropdown-toggle:active, 83 | .btn-group.open .dropdown-toggle { 84 | outline: 0; 85 | } 86 | 87 | 88 | 89 | // Split button dropdowns 90 | // ---------------------- 91 | 92 | // Give the line between buttons some depth 93 | .btn-group .dropdown-toggle { 94 | padding-left: 8px; 95 | padding-right: 8px; 96 | $shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); 97 | @include box-shadow($shadow); 98 | *padding-top: 5px; 99 | *padding-bottom: 5px; 100 | } 101 | 102 | .btn-group.open { 103 | // IE7's z-index only goes to the nearest positioned ancestor, which would 104 | // make the menu appear below buttons that appeared later on the page 105 | *z-index: $zindexDropdown; 106 | 107 | // Reposition menu on open and round all corners 108 | .dropdown-menu { 109 | display: block; 110 | margin-top: 1px; 111 | @include border-radius(5px); 112 | } 113 | 114 | .dropdown-toggle { 115 | background-image: none; 116 | $shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); 117 | @include box-shadow($shadow); 118 | } 119 | } 120 | 121 | // Reposition the caret 122 | .btn .caret { 123 | margin-top: 7px; 124 | margin-left: 0; 125 | } 126 | .btn:hover .caret, 127 | .open.btn-group .caret { 128 | @include opacity(100); 129 | } 130 | 131 | 132 | // Account for other colors 133 | .btn-primary, 134 | .btn-danger, 135 | .btn-info, 136 | .btn-success, 137 | .btn-inverse { 138 | .caret { 139 | border-top-color: $white; 140 | @include opacity(75); 141 | } 142 | } 143 | 144 | // Small button dropdowns 145 | .btn-small .caret { 146 | margin-top: 4px; 147 | } 148 | --------------------------------------------------------------------------------