diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f43a5c5..c0be6f3 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -30,6 +30,10 @@ # GET /projects/1.json # ----------------------------------------------------------- def show + +puts "True: #{I18n.t('helpers.yes')}" +puts "False: #{I18n.t('helpers.no')}" + @project = Project.find(params[:id]) authorize @project @show_form = false diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 526577f..360d87f 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -18,6 +18,12 @@ <%= f.text_area :note, :class => 'text_area', :rows => 10 %> +
+ <%= f.label t('helpers.is_test'), class: 'left-label' %> +
+ <%= f.check_box :is_test, class: 'check_box has-tooltip', 'data-toggle': 'tooltip' title: t('helpers.project.is_test_help_text') %> +
+
<%= f.submit t("helpers.submit.save"), :class => 'btn btn-primary' %> <%= link_to t("helpers.links.cancel"), diff --git a/app/views/projects/_project_details.html.erb b/app/views/projects/_project_details.html.erb index dc62033..fe64a4f 100644 --- a/app/views/projects/_project_details.html.erb +++ b/app/views/projects/_project_details.html.erb @@ -75,6 +75,14 @@ <%end%> + + <%= t('helpers.project.project_is_test') %> + <%= (@project.is_test? ? t('helpers.yes') : t('helpers.no')) %> + + + <%= t('helpers.project.project_is_public') %> + <%= (@project.is_public? ? t('helpers.yes') : t('helpers.no')) %> +
@@ -138,6 +146,14 @@ <%= f.text_area :description, { :rows => 7, :class => 'text_area has-tooltip', 'data-toggle' => "tooltip", 'data-html' => "true", 'title'=> t('helpers.project.project_desc_help_text_html')} %> + + <%= t('helpers.project.project_is_test') %> + <%= f.check_box :is_test, {class: 'check_box', title: t('helpers.project.project_is_test_help_text'), autocomplete: 'off'} %> + + + <%= t('helpers.project.project_is_public') %> + <%= f.check_box :is_public, {class: 'check_box', title: t('helpers.project.project_is_public_help_text'), autocomplete: 'off'} %> + <% end %> diff --git a/config/locales/de.yml b/config/locales/de.yml index f71e45e..7edee86 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -338,8 +338,8 @@ error: "Fehler!" comment: "Kommentar" send: "Senden" - yes: "Ja" - no: "Nein" + 'yes': "Ja" + 'no': "Nein" none: "Keines" title: "Titel" note: "Anmerkung" @@ -511,6 +511,10 @@ project_identifier_help_text: "Eine Identifikationskürzel, wie es von Förderern oder Institutionen vergeben wird." project_static_info: "Dieser Plan basiert auf:" projects_title: "Meine Pläne" + project_is_test: "Test oder praxisplan?" + project_is_test_help_text: "Dieser Plan ist für die Prüfung oder Praxis puposes. Es wird von anderen Benutzern nicht angezeigt werden, es sei denn, Sie explizit freigeben sie mit ihnen (es wird jedoch in Website-Statistiken berücksichtigt werden)." + project_is_public: "Öffentlich im Internet verfügbar?" + project_is_public_help_text: "Ihr Plan erscheint auf der Seite Public DMPs dieser Website." project_settings_text: "Die hier ausgewählten Einträge werden in der Tabelle unten angezeigt. Sie können die Daten durch jeden ihrer Tabellenköpfe sortieren oder filtern, indem Sie eine Zeichenkette in der Suchbox eingeben." project_text_when_no_project: "

Willkommen.
Sie können nun ihren ersten DMP erstellen.
Wählen Sie 'Plan erstellen' weiter unten aus, um zu beginnen.

" project_text_when_project: "

Die folgende Tabelle listet alle von Ihnen erstellten und von anderen mit Ihnen geteilten Pläne.
Diese können jederzeit bearbeitet, geteilt, exportiert und gelöscht werden.

" diff --git a/config/locales/en-UK.yml b/config/locales/en-UK.yml index 42f438a..e10af00 100644 --- a/config/locales/en-UK.yml +++ b/config/locales/en-UK.yml @@ -343,6 +343,9 @@ format: "format" change_language: "Change language" + 'yes': 'Yes' + 'no': 'No' + sign_in: "Sign in" sign_out: "Sign out" sign_up: "Sign up" @@ -574,6 +577,10 @@ project_identifier_help_text: "A pertinent ID as determined by the funder and/or institution." project_static_info: "This plan is based on:" projects_title: "My plans" + project_is_test: "Test or practice plan?" + project_is_test_help_text: "This plan is for testing or practice puposes. It will not be viewable by other users unless you explicitly share it with them (it will however be factored into site statistics)." + project_is_public: "Publicly available on the web?" + project_is_public_help_text: "Your plan will appear on the Public DMPs page of this site." project_settings_text: "The items you select here will be displayed in the table below. You can sort the data by each of these headings or filter by entering a text string in the search box." project_text_when_no_project: "

Welcome.
You are now ready to create your first DMP.
Click the 'Create plan' button below to begin.

" project_text_when_project: "

The table below lists the plans that you have created, and any that have been shared with you by others.
These can be edited, shared, exported or deleted at anytime.

" diff --git a/config/locales/en-US.yml b/config/locales/en-US.yml index 590a4e8..7627f6f 100644 --- a/config/locales/en-US.yml +++ b/config/locales/en-US.yml @@ -330,6 +330,9 @@ jisc: "The %{organisation_abbreviation} is funded by" format: "format" + 'yes': 'Yes' + 'no': 'No' + sign_in: "Sign in" sign_out: "Sign out" sign_up: "Sign up" @@ -560,6 +563,10 @@ project_identifier_help_text: "A pertinent ID as determined by the funder and/or institution." project_static_info: "This plan is based on:" projects_title: "My plans" + project_is_test: "Test or practice plan?" + project_is_test_help_text: "This plan is for testing or practice puposes. It will not be viewable by other users unless you explicitly share it with them (it will however be factored into site statistics)." + project_is_public: "Publicly available on the web?" + project_is_public_help_text: "Your plan will appear on the Public DMPs page of this site." project_settings_text: "The items you select here will be displayed in the table below. You can sort the data by each of these headings or filter by entering a text string in the search box." project_text_when_no_project: "

Welcome.
You are now ready to create your first DMP.
Click the 'Create plan' button below to begin.

" project_text_when_project: "

The table below lists the plans that you have created, and any that have been shared with you by others.
These can be edited, shared, exported or deleted at anytime.

" diff --git a/config/locales/es.yml b/config/locales/es.yml index 2e45f85..7fec13f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -322,8 +322,8 @@ error: "¡Error!" comment: "Comentario" send: "Enviar" - yes: "Si" - no: "No" + 'yes': "Si" + 'no': "No" none: "Ninguno/a" false_lowercase: "falso" title: "Título" @@ -453,6 +453,10 @@ project_identifier_help_text: "El ID tal como lo determinó la institución u organismo financiador." project_static_info: "Este plan está basado en:" projects_title: "Mis planes" + project_is_test: "¿Plan de prueba o práctica?" + project_is_test_help_text: "Este plan es para probar o hacer puposes. No será visible por otros usuarios a menos que explícitamente lo comparta con ellos (sin embargo, se tendrá en cuenta en las estadísticas del sitio)." + project_is_public: "¿Publicamente disponible en la web?" + project_is_public_help_text: "Su plan aparecerá en la página Public DMPs de este sitio." project_settings_text: "Los items que seleccione se mostarán en la siguiente tabla. Puede ordenar los datos según sus encabezados o filtrar tecleando textos en la caja de búsqueda." project_text_when_no_project: "

Bienvenido.
Ya está listo para crear su primer PGD.
Haga clic en el botón 'Crear un plan' para comenzar.

" project_text_when_project: "

La siguiente tabla lista los planes que usted ha creado, así como los que otros investigadores hayan compartido con usted.
Se pueden editar, compartir, exportar o borrar en cualquier momento.

" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 46f43da..fdd447d 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -324,8 +324,8 @@ error: "Erreur!" comment: "Commentaire" send: "Envoi" - yes: "Oui" - no: "Non" + 'yes': "Oui" + 'no': "Non" none: "Aucun" false_lowercase: "faux" title: "Titre" @@ -458,6 +458,10 @@ project_identifier_help_text: "Un identifiant approprié conforme aux prescriptions de l'organisme financeur ou de l'établissement." project_static_info: "Ce plan s'inspire de :" projects_title: "Mes plans" + project_is_test: "Test ou un plan de pratique?" + project_is_test_help_text: "Ce plan est destiné aux essais ou à la pratique. Il ne sera pas visible par d'autres utilisateurs à moins que vous ne le partagiez explicitement avec eux (il sera cependant pris en compte dans les statistiques du site)." + project_is_public: "Publiquement disponible sur le web?" + project_is_public_help_text: "Votre plan apparaîtra sur la page Public DMPs de ce site." project_settings_text: "Les éléments que vous sélectionnez ici s'afficherontt dans le tableaiu ci-après. Vous pouvez trier les données à partir de chacune de ces en-tête ou les filtrer en tapant une chaîne de caractères dans la zone de recherche." project_text_when_no_project: "

Bienvenue.
Vous voilà prêt à créer votre premier DMP.
Cliquez sur le bouton 'Créer un plan' ci-dessous pour commencer.

" project_text_when_project: "

Dans le tableau ci-dessous figurent les plans que vous avez créés, ainsi que ceux que vous partagez avec d'autres.
Vous pouvez à tout moment les modifier, les partager, les exporter, les effacer...

"