Skip to content

Commit

Permalink
class projects front v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ebarra committed Jul 31, 2015
1 parent dc7fe58 commit fe108af
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 6 deletions.
5 changes: 5 additions & 0 deletions app/controllers/static_controller.rb
Expand Up @@ -7,6 +7,11 @@ def download_user_manual
send_file "#{Rails.root}/public/vish_user_manual.pdf", :type => 'application/pdf'
end

def download_perm_request
#TODO XXX, send different form depending on lang
send_file "#{Rails.root}/public/vish_solicitud_crear_grupos_privados.pdf", :type => 'application/pdf'
end

def legal_notice
end

Expand Down
Expand Up @@ -10,10 +10,11 @@
<p><%= t('private_student.request_modal.text1')%></p>
<h6><i class="fa fa-check"></i><%= t('private_student.request_modal.body_duplicated')%></h6>

<p></p>
<p><%= t('private_student.request_modal.contact')%> <%=Vish::Application.config.APP_CONFIG["main_mail"]%>

</p>
</div><!-- CIERRA BODY-->

<div class="modal-footer">
<!-- incluir aquí el botón contacto-->
botón contacto
<button type="button" class="btn btn-primary" data-dismiss="modal"><%=t("close")%></button>
</div>
16 changes: 13 additions & 3 deletions app/views/service_request/private_student_groups/_new.html.erb
Expand Up @@ -12,17 +12,27 @@
<%= form_for ServiceRequest::PrivateStudentGroup.new do |f| %>
<%= f.hidden_field :owner_id, :value => current_subject.actor_id %>

<div class="step_label"><span class="primary"><%= t('private_student.request_modal.step1T')%></span><%= t('private_student.request_modal.step1')%></div>
<div class="step_label"><span class="primary"><%= t('private_student.request_modal.step1T')%></span><%= t('private_student.request_modal.step1')%>
<a class="btn btn-default" href="/download_perm_request"><i class="fa fa-download"></i> <%= t('private_student.request_modal.download')%> </a>
</div>
<div class="step_label"><span class="primary"><%= t('private_student.request_modal.step2T')%></span><%= t('private_student.request_modal.step2')%></div>
<%= f.text_area :description, :class => "form-control" %>
<div class="step_label"><span class="primary"><%= t('private_student.request_modal.step3T')%></span><%= t('private_student.request_modal.step3')%></div>

<%= f.file_field :attachment %>
<%= f.submit :id=>"request_perm_create_groups",:class => "btn btn-primary form-sender", "data-loading-text" => t('button.sending') %>
<%= f.submit :id=>"request_perm_create_groups",:class => "hidden" %>
<% end %>
<p></p>
</div><!-- CIERRA BODY-->

<div class="modal-footer">

<input type="button" id="fake_button" class="btn btn-primary form-sender" value="<%= t('private_student.request_modal.button')%>" data-loading-text="<%=t('button.sending')%>">
</div>

<script>
var submitButton = $("#new_service_request_private_student_group input[type='submit']");
var fakeButton = $("#fake_button");
$(fakeButton).click(function(event) {
$(submitButton).click();
});
</script>
3 changes: 3 additions & 0 deletions config/locales/en.yml
Expand Up @@ -715,6 +715,9 @@ en:
request_help: "Request permission to be able to create groups of learners"
request_modal:
body_duplicated: "You have already sent the request. We will answer you as soon as possible."
button: "Send"
contact: "If you have any question about the process, please contact us at: "
download: "Download"
text1: "This permission will let you create and manage groups of students (who have their own access crenciales). Will also be able to manage the creation of excursions and resources from your students."
title: "Request permission to create Classrooms"
title_duplicated: "Request already sent"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/es.yml
Expand Up @@ -705,6 +705,9 @@ es:
request_help: "Solicitar permiso para crear Aulas"
request_modal:
body_duplicated: "Ya has hecho esta solicitud. Te responderemos en la mayor brevedad."
button: "Enviar"
contact: "Si tiene alguna duda sobre el estado del proceso, por favor contactenos en: "
download: "Descargar"
text1: "La funcionalidad asociada a la solicitud de este permiso te permitirá crear y gestionar grupos de alumnos (que tendrán sus propias crenciales de acceso). Además, podrás gestionar la creación de excursiones y recursos por parte de tus alumnos."
title: "Solicitar permiso para crear Aulas"
title_duplicated: "Petición ya enviada"
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Expand Up @@ -37,6 +37,7 @@

#Download the user manual and count the number of downloads
match 'user_manual' => 'static#download_user_manual'
match 'download_perm_request' => 'static#download_perm_request'

#APIs
match '/apis/search' => 'federated_search#search'
Expand Down
Binary file added public/vish_solicitud_crear_grupos_privados.pdf
Binary file not shown.

0 comments on commit fe108af

Please sign in to comment.