Skip to content

Commit

Permalink
mostrar calendario (al fiiin) #7
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjcsr committed May 28, 2014
1 parent 07e79af commit fe6650a
Show file tree
Hide file tree
Showing 8 changed files with 276 additions and 41 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/eventos.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var myOptions = {

}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

marker = new google.maps.Marker({
position: myLatlng,
map: map,
Expand Down Expand Up @@ -44,5 +44,5 @@ google.maps.event.addListener(marker,'dragend',function(event) {
$(document).ready(function(){
initialize()


})
4 changes: 4 additions & 0 deletions app/assets/javascripts/forma.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


$('#formaforma').datepick({
rangeSelect: true, monthsToShow: 2, showTrigger: '#calImg'});
43 changes: 22 additions & 21 deletions app/views/eventos/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
<%= f.text_field :nombre, class: "text_formulario" ,placeholder:"Yoga CDMX" %>
</div>
<div class="field">


<%= f.label :lugar, "Lugar donde sera el Evento *" , class: "label_formulario"%><br>
<%= f.text_field :lugar , class: "text_formulario" ,placeholder:"Angel de la Independencia" %>
</div>

<div class="field">





<%= f.label :direccion ,"Direccion *", class: "label_formulario"%><br>
<%= f.text_field :direccion , class: "text_formulario" ,placeholder:"Av Viaducto Rio de la Piedad y Rio Churubusco S/N, Granjas México, Iztacalco, 08400 Ciudad de México" %>
Expand All @@ -41,7 +41,7 @@
<div class="field">

<label for="from">From</label>
<input type="text" id="from" name="from">
<input type="text" id="formaforma" name="from">
<label for="to">to</label>
<input type="text" id="to" name="to">

Expand All @@ -59,7 +59,7 @@
</div>

<div class="col-xs-12">

<div class="col-xs-6">


Expand All @@ -68,20 +68,20 @@
<%= f.label :hora_inicio , class: "label_formulario"%><br>
<%= f.time_select :hora_inicio, :default=> {:hour=>"0",:minute=>"0"} %>
</div>

</div>

<div class="col-xs-6">
<div class="field">
<%= f.label :hora_fin , class: "label_formulario"%><br>
<%= f.time_select :hora_fin %>
</div>

</div>

</div>



<div class="field">
<%= f.label :imagen, "Imagen" , class: "label_formulario"%><br>
Expand All @@ -96,14 +96,14 @@
<div class="col-xs-4">
<div class="field">
<%= f.label :categoria, class: "label_formulario" %><br>

<%= f.select :categoria, options_for_select([ "Deportivo", "Cine", "Exposiciones", "Infantile","Música","Cultura","Teatro","Aprendizaje" ], "Deportivo") %>
</div>
</div>
<div class="col-xs-4">
<div class="field">
<%= f.label :Entrada_Libre, class: "label_formulario" %><br>

<%= f.select :categoria, options_for_select([ "Si", "No"], "Si") %>
<%= f.label :precio , class: "label_formulario"%><br>
<%= f.text_field :precio, class: "text_formulario" ,placeholder:"Entrada Libre" %>
Expand All @@ -117,7 +117,7 @@
</div>
</div>



<div class="col-xs-12">
<div class="col-xs-6">
Expand All @@ -144,7 +144,7 @@
</div>
<div class="col-xs-6">
<div class="field">

<%= f.hidden_field :longitud , :id=>'lng' %>
</div>
</div>
Expand All @@ -158,22 +158,23 @@
</div>
<!-- <div class="col-md-3 box1">
<div class="row">
<pre>
<IMG align="middle" SRC="/codigo.png" WIDTH=98% HEIGHT=210 >
</pre>
<pre>
<IMG align="middle" SRC="/eventario.png" WIDTH=98% HEIGHT=210 >
</pre>
</pre>
<pre>
<IMG align="middle" SRC="/labplc.jpg" WIDTH=98% HEIGHT=210 >
</pre>
</pre>
</div>
</div>-->

</div>
<% end %>
<%= javascript_include_tag "jquery"%>
<%= javascript_include_tag "jquery.ui.all"%>
<%= javascript_include_tag "datepick.plugin" %>
<%= javascript_include_tag "datepick"%>
<%= javascript_include_tag "forma" %>


27 changes: 14 additions & 13 deletions app/views/eventos/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="col-xs-1">
</div>
<div class="col-xs-10 box1">

<div class="col-xs-0.5">
</div>

Expand All @@ -20,7 +20,7 @@
</p>

<p>

<img src="/donde.png" width="20" height="23" />
<span class='eventos_textos'> <%= @evento.lugar %></span>
</p>
Expand All @@ -33,12 +33,12 @@
<span class='eventos_textos'> <%= @evento.fecha_inicio %> - <%= @evento.fecha_fin %></span>
</p>



<p>

<img src="/hora.png" width="20" height="23" />
<span class='eventos_textos'> <%= @evento.hora_inicio %> a
<span class='eventos_textos'> <%= @evento.hora_inicio %> a
<%= @evento.hora_fin %></span>
</p>

Expand All @@ -50,7 +50,7 @@
<strong>Fecha fin:</strong>
<%= @evento.fecha_fin %>
</p>-->


<p>
<strong>Descripcion:</strong>
Expand All @@ -65,21 +65,21 @@
</div>
<div class="col-xs-6">
<p>

<p class="text-center">
<img src="<%= @evento.imagen %>" class="img-responsive center-block ">
</p>

</p>
</div>


<p>
<strong>Fuente:</strong>
<%= @evento.fuente %>
</p>


<p>
<strong>Categoria:</strong>
<%= @evento.categoria %>
Expand Down Expand Up @@ -107,15 +107,16 @@
</p>
<p class="text-center">
<div id="map_canvas" style="width:100%;height:400px;"></div>

</p>

</div>
</div>

</div>
</div>
</div>
<pre class='space'></pre>
<!--<%= link_to 'Edit', edit_evento_path(@evento) %> |
<%= link_to 'Back', eventos_path %>-->
<%= javascript_include_tag "showEventos" %>
11 changes: 6 additions & 5 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=geometry"> </script>
<%= javascript_include_tag "jquery","jquery_ujs"%>
<%= stylesheet_link_tag "application" %>
<%= stylesheet_link_tag "datepick" %>
<%= csrf_meta_tags %>

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
Expand Down Expand Up @@ -41,11 +42,11 @@
<ul class="nav navbar-nav navbar-left">
<li ><%= link_to "Inicio", root_path %></li>
<li class="<%= 'active' if current_page?(mapa_path) %>"><%= link_to "Buscar Eventos", mapa_path %></li>



<li>&nbsp;</li> <li>&nbsp;</li> <li>&nbsp;</li> <li>&nbsp;</li>

</ul>
<% if user_signed_in? %>
Logged in as <strong><%= current_user.email %></strong>.
Expand All @@ -72,7 +73,7 @@
<li><%= link_to "Términos de uso", privacy_path %></li>
<li><a href="http://codigo.labplc.mx/">Código CDMX</a></li>
<li><a href="http://labplc.mx/">LabPLC</a></li>

</ul>
</div>
<div class="col-xs-6 col-md-3 column">
Expand All @@ -81,7 +82,7 @@

<li><a href="https://twitter.com/EventarioCDMX">Twitter</a></li>
<li><a href="https://www.facebook.com/EventarioCDMX">Facebook</a></li>

</ul>
</div>
<!-- <div class="col-xs-6 col-md-3 column">
Expand Down
6 changes: 6 additions & 0 deletions vendor/assets/javascripts/datepick.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions vendor/assets/javascripts/datepick.plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fe6650a

Please sign in to comment.