Skip to content
Browse files

Added hashtag field to sessions

  • Loading branch information...
1 parent f99efec commit 6c8db9a426735ad5d3cbdcdcbeeef77ef48dd783 @simonech simonech committed Jan 14, 2012
Showing with 15 additions and 4 deletions.
  1. +1 −0 app/models/speech.rb
  2. +3 −0 app/views/speeches/_form.html.haml
  3. +9 −4 public/mobile/index.html
  4. +2 −0 public/mobile/jqm/agendaviewmodel.js
View
1 app/models/speech.rb
@@ -6,6 +6,7 @@ class Speech
field :to, :type => Time
field :room
field :title
+ field :hashtag
field :abstract
field :proposal_id
end
View
3 app/views/speeches/_form.html.haml
@@ -19,6 +19,9 @@
= f.label :title
= f.text_field :title
.field
+ = f.label :hashtag
+ = f.text_field :hashtag
+ .field
= f.label :abstract
= f.text_area :abstract, :rows => 5
View
13 public/mobile/index.html
@@ -20,7 +20,7 @@
<script type='text/javascript' src='../underscore/underscore-min.js'></script>
<script type="text/javascript" src="/mobile/jqm/agendaviewmodel.js"></script>
-
+
<script>
$(document).ready(function() {
ko.applyBindings(new AgendaViewModel());
@@ -107,12 +107,17 @@ <h1 data-bind="text: title"></h1>
<div data-role="content">
<h2 class="title" data-bind="text: title"></h2>
- <h3 data-bind="visible: speaker.name!='-', text: speaker.name"></h3>
- <p data-bind="text: abstract"></p>
-
+ <!-- ko if: nolink!=true -->
<ul data-role="listview" data-inset="true" data-bind="with: speaker" >
<li><a data-bind="text: name, click: $root.goToSpeaker"></a></li>
</ul>
+ <!-- /ko -->
+ <p data-bind="text: abstract"></p>
+
+ <a data-role="button" target="_blank" data-bind="attr: { href: 'https://twitter.com/intent/tweet?text=Sto%20ascoltando%20%40'+speaker.twitter+'%20%23'+hashtag+'%20%23uan12' }">Twitta la sessione che segui</a>
+
+
+
</div><!-- /content -->
</div><!-- /page -->
View
2 public/mobile/jqm/agendaviewmodel.js
@@ -92,6 +92,8 @@
value.timeSlot=value.from +" - "+value.to;
if(value.speaker.name=="-")
value.nolink=true;
+ else
+ value.nolink=false;
});
}

0 comments on commit 6c8db9a

Please sign in to comment.
Something went wrong with that request. Please try again.