diff --git a/.gitignore b/.gitignore index 33c0294..2b59cc6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ # Ignore the test DB db/test.sqlite3 +# Ignore the SimpleCov output +coverage + # Ignore database configuration and token secrets config/database.yml config/secrets.yml diff --git a/app/views/static_pages/public_export.pdf.erb b/app/views/static_pages/public_export.pdf.erb new file mode 100644 index 0000000..77d68cb --- /dev/null +++ b/app/views/static_pages/public_export.pdf.erb @@ -0,0 +1,72 @@ + + +
+ +<%= t("helpers.plan.export.#{field}") -%> <%= value -%>
+ <% end %> + <% end %> + + <% @exported_plan.sections.each do |section| %> +<%= t('helpers.plan.export.pdf.question_not_answered') -%>
+ <% else %> + <% q_format = question.question_format%> + + <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || + q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") then%> ++ <%= raw t("public_plans_page.body_text_html", {app_name: Rails.configuration.branding[:application][:name]}) %> +
+ +| + |
|---|
| + <%= link_to t("helpers.project.tab_export"), "#{public_export_path(project)}", :class => "dmp_table_link" %> + | +
+ <%= raw t("public_plans_page.no_plans_body_text_html")%> +
+<% end %> diff --git a/db/migrate/20170124235829_add_visibility_to_projects.rb b/db/migrate/20170124235829_add_visibility_to_projects.rb new file mode 100644 index 0000000..18466c8 --- /dev/null +++ b/db/migrate/20170124235829_add_visibility_to_projects.rb @@ -0,0 +1,5 @@ +class AddVisibilityToProjects < ActiveRecord::Migration + def change + add_column :projects, :visibility, :integer, null: false, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index cec4bb6..f8de840 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170124231538) do +ActiveRecord::Schema.define(version: 20170124235829) do create_table "answers", force: :cascade do |t| t.text "text", limit: 65535