_create_article.html.erb
1.99 KB
<div class='profile-activity-image'>
<%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
</div>
<div class='profile-activity-description profile-activity-article-<%= activity.target.class.icon_name %>'>
<p class='profile-activity-text'>
<%= link_to activity.user.short_name(20), activity.user.url %>
<%= _("has published on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url) if activity.target.profile.is_a?(Community) %>
</p>
<div class='profile-activity-lead'>
<div class='article-name'><%= link_to(activity.params['name'], activity.params['url']) %></div>
<span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span>
<%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') unless activity.params['lead'].blank? %> <small><%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %></small>
</div>
<%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>
<p class='profile-activity-time'><%= time_ago_in_words(activity.created_at) %></p>
<div class='profile-wall-actions'>
<%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
<%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :only_hide => true, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %>
</div>
</div>
<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>