Permalink
Browse files

Merge branch 'master' of github.com:regedor/GMS-Prototype

  • Loading branch information...
zamith committed Apr 6, 2012
2 parents 287b4a8 + 2805ee5 commit 974011e7eb7c1b84e3d237319b3ff6965f73c9dc
@@ -112,9 +112,8 @@ def weather_condition_image(condition)
# Show tags as a 2 level menu of limit elements (can be acompanied by the tag_header)
def tag_menu_widget(tags, limit=10, just_items=false)
- tags_for_cloud = Rails.cache.fetch("tags_for_cloud") do
- Tag.tags_for_menu(tags, limit)
- end
+ tags_for_cloud = YAML::load(Rails.cache.fetch("tags_for_cloud"){Tag.tags_for_menu(tags, limit).to_yaml})
+
render :partial => 'widgets/tag_menu',
:locals => {
:tags_for_cloud => tags_for_cloud,
@@ -2,15 +2,19 @@
<% @comments.each do |comment| %>
<div id="comment-<%= comment.id %>" class="comment">
<% commentator = comment.user %>
+
<div class="avatar"><%= image_tag avatar_url(commentator, :size => :small) %></div>
+
<span class="author"><%= (commentator) ? commentator.name : t('admin.messages.comments.ghost') %></span>
+
<span class="date"><%= l(message.created_at, :format => :default) %></span>
- <div class="entrybody">
- <%= raw comment.body_html %>
- </div>
+
+ <%= raw comment.body_html %>
</div>
+
<hr>
<% end %>
+
<% semantic_form_for :record, @record,
:url => admin_project_message_messages_comments_path(params[:project_id], message.id),
:html => { :method => 'post' } do |form| -%>
@@ -8,8 +8,7 @@
<hr>
<div id="message">
<div class="avatar"><%= image_tag avatar_url(@creator, :size => :medium) %></div>
- <div class="entrybody">
- <div class="textile-body"><%=raw message.body_html %></div>
- </div>
+
+ <div class="textile-body"><%=raw message.body_html %></div>
</div>
<hr>
@@ -1,26 +1,24 @@
-<div class="entrybody">
- <ol id="comment-list">
- <% commentable.approved_comments.each do |_comment| -%>
- <li<%=raw cycle(' class="alt"', '') %> id="comment-<%= _comment.id %>">
- <%= render :partial => 'comments/comment', :locals => {:comment => _comment} %>
- </li>
- <% end -%>
- </ol>
-</div>
+<ol id="comment-list">
+ <% commentable.approved_comments.each do |_comment| -%>
+ <li<%=raw cycle(' class="alt"', '') %> id="comment-<%= _comment.id %>">
+ <%= render :partial => 'comments/comment', :locals => {:comment => _comment} %>
+ </li>
+ <% end -%>
+</ol>
+
+<div id="new-comment">
+ <% unless current_user -%>
+ <h2 class="title"><%= link_to I18n::t('comments.log_in_to'), new_user_session_path %></h2>
+ <% else -%>
+ <h2 class="title"><%= I18n::t('comments.title') %></h2>
-<% unless current_user -%>
- <h2 class="title"><%= link_to I18n::t('comments.log_in_to'), new_user_session_path %></h2>
-<% else -%>
- <h2 class="title"><%= I18n::t('comments.title') %></h2>
- <div class="entrybody">
<% form_for([commentable, comment]) do |form| %>
- <div class="new-comment">
- <%= form.hidden_field 'type', :value => commentable.class %>
- <%= form.text_area 'body' %>
- <ul class="buttons">
- <li><%= submit_tag I18n::t('comments.submit'), :class => 'button positive' %></li>
- </ul>
- </div>
+ <%= form.hidden_field 'type', :value => commentable.class %>
+ <%= form.text_area 'body' %>
+
+ <ul class="buttons">
+ <li><%= submit_tag I18n::t('comments.submit'), :class => 'button positive' %></li>
+ </ul>
<% end -%>
- </div>
-<% end -%>
+ <% end -%>
+</div>
@@ -1,7 +1,7 @@
<div id="footer">
<p><%= t 'footer.default_message', :year => Time.now.year, :site_name => configatron.site_name, :site_url => configatron.site_url %></p>
- <!--[if lt IE 8]>
+ <!--[if lt IE 9]>
<p><%= t 'footer.browser_warning' %></p>
<![endif]-->

0 comments on commit 974011e

Please sign in to comment.