diff --git a/app/views/comment/_comment.html.erb b/app/views/comment/_comment.html.erb new file mode 100644 index 0000000..5061040 --- /dev/null +++ b/app/views/comment/_comment.html.erb @@ -0,0 +1,85 @@ +
  • +
    + +
    + + <% if comment.author %> + <%= link_to image_tag(profile_icon(comment.author, :minor)) + + content_tag('span', comment.author_name, :class => 'comment-info'), + comment.author.url, + :class => 'comment-picture', + :title => comment.author_name + %> + <% else %> + <% url_image, status_class = comment.author_id ? + [comment.removed_user_image, 'icon-user-removed'] : + [gravatar_profile_image_url( comment.email, :size => 50, :d=>404 ), 'icon-user-unknown'] %> + + <%= link_to( + image_tag(url_image, :onerror=>'gravatarCommentFailback(this)', + 'data-gravatar'=>gravatar_profile_image_url(comment.email, :size=>50)) + + content_tag('span', comment.author_name, :class => 'comment-info') + + content_tag('span', comment.message, + :class => 'comment-user-status ' + status_class), + gravatar_profile_url(comment.email), + :target => '_blank', + :class => 'comment-picture', + :title => '%s %s' % [comment.author_name, comment.message] + )%> + <% end %> + + <% comment_balloon do %> + +
    +
    +
      +
      + <%= comment_actions(comment) %> +
      +
    + <% unless comment.spam? %> + <%= link_to_function '', + "var f = add_comment_reply_form(this, %s); f.find('comment_title, textarea').val(''); return false" % comment.id, + :class => 'comment-footer comment-footer-link comment-footer-hide comment-actions-reply button', + :id => 'comment-reply-to-' + comment.id.to_s, + :title => _('Reply') + %> + <% end %> +
    + +
    + <%= show_time(comment.created_at) %> +
    +

    <%= comment.title.blank? && ' ' || comment.title %>

    +
    +

    + <%= txt2html comment.body %> +

    +
    + +
    + <% if @comment && @comment.errors.any? && @comment.reply_of_id.to_i == comment.id %> + <%= error_messages_for :comment %> + + <% end %> +
    + + <% end %> + +
    + + <% unless comment.replies.blank? || comment.spam? %> + + <% end %> + +
    +
  • diff --git a/app/views/comment/_comment.rhtml b/app/views/comment/_comment.rhtml deleted file mode 100644 index 5061040..0000000 --- a/app/views/comment/_comment.rhtml +++ /dev/null @@ -1,85 +0,0 @@ -
  • -
    - -
    - - <% if comment.author %> - <%= link_to image_tag(profile_icon(comment.author, :minor)) + - content_tag('span', comment.author_name, :class => 'comment-info'), - comment.author.url, - :class => 'comment-picture', - :title => comment.author_name - %> - <% else %> - <% url_image, status_class = comment.author_id ? - [comment.removed_user_image, 'icon-user-removed'] : - [gravatar_profile_image_url( comment.email, :size => 50, :d=>404 ), 'icon-user-unknown'] %> - - <%= link_to( - image_tag(url_image, :onerror=>'gravatarCommentFailback(this)', - 'data-gravatar'=>gravatar_profile_image_url(comment.email, :size=>50)) + - content_tag('span', comment.author_name, :class => 'comment-info') + - content_tag('span', comment.message, - :class => 'comment-user-status ' + status_class), - gravatar_profile_url(comment.email), - :target => '_blank', - :class => 'comment-picture', - :title => '%s %s' % [comment.author_name, comment.message] - )%> - <% end %> - - <% comment_balloon do %> - -
    -
    -
      -
      - <%= comment_actions(comment) %> -
      -
    - <% unless comment.spam? %> - <%= link_to_function '', - "var f = add_comment_reply_form(this, %s); f.find('comment_title, textarea').val(''); return false" % comment.id, - :class => 'comment-footer comment-footer-link comment-footer-hide comment-actions-reply button', - :id => 'comment-reply-to-' + comment.id.to_s, - :title => _('Reply') - %> - <% end %> -
    - -
    - <%= show_time(comment.created_at) %> -
    -

    <%= comment.title.blank? && ' ' || comment.title %>

    -
    -

    - <%= txt2html comment.body %> -

    -
    - -
    - <% if @comment && @comment.errors.any? && @comment.reply_of_id.to_i == comment.id %> - <%= error_messages_for :comment %> - - <% end %> -
    - - <% end %> - -
    - - <% unless comment.replies.blank? || comment.spam? %> - - <% end %> - -
    -
  • diff --git a/app/views/comment/_comment_form.html.erb b/app/views/comment/_comment_form.html.erb new file mode 100644 index 0000000..e67f713 --- /dev/null +++ b/app/views/comment/_comment_form.html.erb @@ -0,0 +1,98 @@ +<% edition_mode = (defined? edition_mode) ? edition_mode : false %> +
    + +<% focus_on = logged_in? ? 'title' : 'name' %> + + +<% if !edition_mode && !pass_without_comment_captcha? %> + + + +<% end %> + + + +<% if @comment && @comment.errors.any? %> + <%= error_messages_for :comment %> +<% end %> + +
    + + <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form') if display_link && @comment.reply_of_id.blank? %> +<% remote_form_for(:comment, comment, :url => {:profile => profile.identifier, :controller => 'comment', :action => (edition_mode ? 'update' : 'create'), :id => (edition_mode ? comment.id : @page.id)}, :html => { :class => 'comment_form' } ) do |f| %> + + <%= required_fields_message %> + + <% unless logged_in? %> + + <%= required labelled_form_field(_('Name'), f.text_field(:name)) %> + <%= required labelled_form_field(_('e-mail'), f.text_field(:email)) %> +

    + <%= _('If you are a registered user, you can login and be automatically recognized.') %> +

    + + <% end %> + + <% if !edition_mode && !pass_without_comment_captcha? %> + <%= hidden_field_tag(:recaptcha_response_field, nil, :id => nil) %> + <%= hidden_field_tag(:recaptcha_challenge_field, nil, :id => nil) %> + <% end %> + + <%= labelled_form_field(_('Title'), f.text_field(:title)) %> + <%= required labelled_form_field(_('Enter your comment'), f.text_area(:body, :rows => 5)) %> + + <%= hidden_field_tag(:confirm, 'false') %> + <%= hidden_field_tag(:view, params[:view])%> + <%= f.hidden_field(:reply_of_id) %> + + <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns).collect { |content| instance_eval(&content) }.join("") %> + + <% button_bar do %> + <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %> + <% if !edition_mode %> + <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> + <% else %> + <%= button :cancel, _('Cancel'), '#', :onclick => "jQuery.colorbox.close();" %> + <% end %> + <% end %> +<% end %> + + +
    +
    + +<%= javascript_include_tag 'comment_form'%> diff --git a/app/views/comment/_comment_form.rhtml b/app/views/comment/_comment_form.rhtml deleted file mode 100644 index e67f713..0000000 --- a/app/views/comment/_comment_form.rhtml +++ /dev/null @@ -1,98 +0,0 @@ -<% edition_mode = (defined? edition_mode) ? edition_mode : false %> -
    - -<% focus_on = logged_in? ? 'title' : 'name' %> - - -<% if !edition_mode && !pass_without_comment_captcha? %> - - - -<% end %> - - - -<% if @comment && @comment.errors.any? %> - <%= error_messages_for :comment %> -<% end %> - -
    - - <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form') if display_link && @comment.reply_of_id.blank? %> -<% remote_form_for(:comment, comment, :url => {:profile => profile.identifier, :controller => 'comment', :action => (edition_mode ? 'update' : 'create'), :id => (edition_mode ? comment.id : @page.id)}, :html => { :class => 'comment_form' } ) do |f| %> - - <%= required_fields_message %> - - <% unless logged_in? %> - - <%= required labelled_form_field(_('Name'), f.text_field(:name)) %> - <%= required labelled_form_field(_('e-mail'), f.text_field(:email)) %> -

    - <%= _('If you are a registered user, you can login and be automatically recognized.') %> -

    - - <% end %> - - <% if !edition_mode && !pass_without_comment_captcha? %> - <%= hidden_field_tag(:recaptcha_response_field, nil, :id => nil) %> - <%= hidden_field_tag(:recaptcha_challenge_field, nil, :id => nil) %> - <% end %> - - <%= labelled_form_field(_('Title'), f.text_field(:title)) %> - <%= required labelled_form_field(_('Enter your comment'), f.text_area(:body, :rows => 5)) %> - - <%= hidden_field_tag(:confirm, 'false') %> - <%= hidden_field_tag(:view, params[:view])%> - <%= f.hidden_field(:reply_of_id) %> - - <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns).collect { |content| instance_eval(&content) }.join("") %> - - <% button_bar do %> - <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %> - <% if !edition_mode %> - <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> - <% else %> - <%= button :cancel, _('Cancel'), '#', :onclick => "jQuery.colorbox.close();" %> - <% end %> - <% end %> -<% end %> - - -
    -
    - -<%= javascript_include_tag 'comment_form'%> diff --git a/app/views/comment/edit.html.erb b/app/views/comment/edit.html.erb new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/views/comment/edit.html.erb diff --git a/app/views/comment/edit.rhtml b/app/views/comment/edit.rhtml deleted file mode 100644 index e69de29..0000000 --- a/app/views/comment/edit.rhtml +++ /dev/null diff --git a/app/views/events/_events.html.erb b/app/views/events/_events.html.erb new file mode 100644 index 0000000..d29736e --- /dev/null +++ b/app/views/events/_events.html.erb @@ -0,0 +1 @@ +<%= list_events(@date, @events) %> \ No newline at end of file diff --git a/app/views/events/_events.rhtml b/app/views/events/_events.rhtml deleted file mode 100644 index d29736e..0000000 --- a/app/views/events/_events.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= list_events(@date, @events) %> \ No newline at end of file diff --git a/app/views/profile/_more_comments.html.erb b/app/views/profile/_more_comments.html.erb new file mode 100644 index 0000000..b24637a --- /dev/null +++ b/app/views/profile/_more_comments.html.erb @@ -0,0 +1,3 @@ +
    + <%= link_to(_('More'), :profile => @profile.identifier, :controller => 'profile', :action => 'more_comments', :activity => activity, :comment_page => (comment_page + 1)) %> +
    diff --git a/app/views/profile/_more_comments.rhtml b/app/views/profile/_more_comments.rhtml deleted file mode 100644 index b24637a..0000000 --- a/app/views/profile/_more_comments.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -
    - <%= link_to(_('More'), :profile => @profile.identifier, :controller => 'profile', :action => 'more_comments', :activity => activity, :comment_page => (comment_page + 1)) %> -
    diff --git a/app/views/profile/_more_replies.html.erb b/app/views/profile/_more_replies.html.erb new file mode 100644 index 0000000..1043046 --- /dev/null +++ b/app/views/profile/_more_replies.html.erb @@ -0,0 +1,3 @@ +
    + <%= link_to(_('More'), :profile => @profile.identifier, :controller => 'profile', :action => 'more_replies', :activity => activity, :comment_page => (comment_page + 1)) %> +
    diff --git a/app/views/profile/_more_replies.rhtml b/app/views/profile/_more_replies.rhtml deleted file mode 100644 index 1043046..0000000 --- a/app/views/profile/_more_replies.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -
    - <%= link_to(_('More'), :profile => @profile.identifier, :controller => 'profile', :action => 'more_replies', :activity => activity, :comment_page => (comment_page + 1)) %> -
    diff --git a/app/views/search/_full_product.html.erb b/app/views/search/_full_product.html.erb new file mode 100644 index 0000000..dcbe8f1 --- /dev/null +++ b/app/views/search/_full_product.html.erb @@ -0,0 +1,85 @@ +<% extra_content = @plugins.dispatch(:asset_product_extras, product).collect { |content| instance_eval(&content) } %> +<% extra_properties = @plugins.dispatch(:asset_product_properties, product)%> + +
  • + +
    + <%= render :partial => 'search/image', :object => product %> + + <% if product.available %> + <% if product.price && product.price > 0 %> + <% has_discount = product.discount && product.discount > 0 %> + <% if product.price %> + <%=_("from") if has_discount %><%= price_span(product.price, :class => "search-product-price " + (has_discount ? 'with-discount' : '')) %> + <% if has_discount %> + <%=_("by")%><%= price_span(product.price_with_discount, :class => "search-product-price") %> + <% end %> + <% if product.unit %> +  <%= _('/') %> <%= product.unit.name %> + <% end %> + <% end %> +
    + <% if p = product.percentage_from_solidarity_economy %> +
    + <%= p[1] %> +
    + <% end %> + + <% if product.price_described? %> + <% title = (product.inputs.relevant_to_price + product.price_details).map{ |i| + '
    ' + + '
    ' + i.name + '
    ' + + price_span(i.price, :class => 'search-product-input-price') + + '
    ' }.join('') %> + <%= link_to_function _("Open Price"), '', :title => title, :class => "search-product-price-details" %> + <% end %> +
    + <% end %> + <% else %> + <%= _('Not available') %>
    + <% end %> + + +
    + <%= link_to_product product, :class => 'search-result-title' %> +
    + <%= _('Supplier') %> <%= link_to_homepage(product.enterprise.name, product.enterprise.identifier) %> +
    +
    + <% if product.description %> + <% desc_stripped = strip_tags(product.description) %> + <%= _('Description') %> <%= excerpt(desc_stripped, desc_stripped.first(3), 300) %> + <% end %> +
    +
    +
    +
    + <% if product.enterprise.region %> + <%= _('City') %> +
    <%= city_with_state(product.enterprise.region) %> + <% end %> +
    +
    + <% if product.product_qualifiers.count > 0 %> + <%= _('Qualifiers') %> + <% product.product_qualifiers.each do |pq| %> + <% if pq.qualifier %> + <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %> + <% end %> + <% if pq.certifier %> +  <%= _('cert. ') + pq.certifier.name + _(";") %> + <% end %> + <% end %> + <% end %> +
    +
    + +
    + + <%= extra_content.join('\n') %> + <% extra_properties.each do |property| %> +
    <%= property[:name] + ': ' + instance_eval(&property[:content]) %>
    + <% end %> + +
  • diff --git a/app/views/search/_full_product.rhtml b/app/views/search/_full_product.rhtml deleted file mode 100644 index dcbe8f1..0000000 --- a/app/views/search/_full_product.rhtml +++ /dev/null @@ -1,85 +0,0 @@ -<% extra_content = @plugins.dispatch(:asset_product_extras, product).collect { |content| instance_eval(&content) } %> -<% extra_properties = @plugins.dispatch(:asset_product_properties, product)%> - -
  • - -
    - <%= render :partial => 'search/image', :object => product %> - - <% if product.available %> - <% if product.price && product.price > 0 %> - <% has_discount = product.discount && product.discount > 0 %> - <% if product.price %> - <%=_("from") if has_discount %><%= price_span(product.price, :class => "search-product-price " + (has_discount ? 'with-discount' : '')) %> - <% if has_discount %> - <%=_("by")%><%= price_span(product.price_with_discount, :class => "search-product-price") %> - <% end %> - <% if product.unit %> -  <%= _('/') %> <%= product.unit.name %> - <% end %> - <% end %> -
    - <% if p = product.percentage_from_solidarity_economy %> -
    - <%= p[1] %> -
    - <% end %> - - <% if product.price_described? %> - <% title = (product.inputs.relevant_to_price + product.price_details).map{ |i| - '
    ' + - '
    ' + i.name + '
    ' + - price_span(i.price, :class => 'search-product-input-price') + - '
    ' }.join('') %> - <%= link_to_function _("Open Price"), '', :title => title, :class => "search-product-price-details" %> - <% end %> -
    - <% end %> - <% else %> - <%= _('Not available') %>
    - <% end %> - - -
    - <%= link_to_product product, :class => 'search-result-title' %> -
    - <%= _('Supplier') %> <%= link_to_homepage(product.enterprise.name, product.enterprise.identifier) %> -
    -
    - <% if product.description %> - <% desc_stripped = strip_tags(product.description) %> - <%= _('Description') %> <%= excerpt(desc_stripped, desc_stripped.first(3), 300) %> - <% end %> -
    -
    -
    -
    - <% if product.enterprise.region %> - <%= _('City') %> -
    <%= city_with_state(product.enterprise.region) %> - <% end %> -
    -
    - <% if product.product_qualifiers.count > 0 %> - <%= _('Qualifiers') %> - <% product.product_qualifiers.each do |pq| %> - <% if pq.qualifier %> - <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %> - <% end %> - <% if pq.certifier %> -  <%= _('cert. ') + pq.certifier.name + _(";") %> - <% end %> - <% end %> - <% end %> -
    -
    - -
    - - <%= extra_content.join('\n') %> - <% extra_properties.each do |property| %> -
    <%= property[:name] + ': ' + instance_eval(&property[:content]) %>
    - <% end %> - -
  • diff --git a/app/views/spam/_comment_spam.html.erb b/app/views/spam/_comment_spam.html.erb new file mode 100644 index 0000000..99d33d4 --- /dev/null +++ b/app/views/spam/_comment_spam.html.erb @@ -0,0 +1,11 @@ +<%# FIXME should not need to replicate the article structure like this to be able to use the same formatting as the comments listing %> +
    +
    + +
    +
    + +<%= pagination_links @comment_spam, :param_name => :comments_page %> + diff --git a/app/views/spam/_comment_spam.rhtml b/app/views/spam/_comment_spam.rhtml deleted file mode 100644 index 99d33d4..0000000 --- a/app/views/spam/_comment_spam.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%# FIXME should not need to replicate the article structure like this to be able to use the same formatting as the comments listing %> -
    -
    - -
    -
    - -<%= pagination_links @comment_spam, :param_name => :comments_page %> - diff --git a/app/views/spam/_task.html.erb b/app/views/spam/_task.html.erb new file mode 100644 index 0000000..e1ca894 --- /dev/null +++ b/app/views/spam/_task.html.erb @@ -0,0 +1,18 @@ +
    + <%= render :partial => 'tasks/task_icon', :locals => {:task => task} %> + <%= render :partial => 'tasks/task_title', :locals => {:task => task} %> +
    + <%= task_information(task) %> +
    + + <%= yield %> <% # ??? %> + + <% button_bar do %> + <%= button_to_function('new', _('Mark as NOT SPAM'), 'removeTaskBox(this, %s, "%s", "")' % [url_for(:mark_task_as_ham => task.id).to_json, "task-#{task.id}"]) %> + <%= yield :extra_buttons %> + <%= button_to_function('delete', _('Remove'), 'removeTaskBox(this, %s, "%s", %s)' % [url_for(:profile => params[:profile], :remove_task => task.id).to_json, "task-#{task.id}", _('Are you sure you want to remove this article suggestion?').to_json]) %> + + <% end %> + + <%= yield :extra_content %> +
    diff --git a/app/views/spam/_task.rhtml b/app/views/spam/_task.rhtml deleted file mode 100644 index e1ca894..0000000 --- a/app/views/spam/_task.rhtml +++ /dev/null @@ -1,18 +0,0 @@ -
    - <%= render :partial => 'tasks/task_icon', :locals => {:task => task} %> - <%= render :partial => 'tasks/task_title', :locals => {:task => task} %> -
    - <%= task_information(task) %> -
    - - <%= yield %> <% # ??? %> - - <% button_bar do %> - <%= button_to_function('new', _('Mark as NOT SPAM'), 'removeTaskBox(this, %s, "%s", "")' % [url_for(:mark_task_as_ham => task.id).to_json, "task-#{task.id}"]) %> - <%= yield :extra_buttons %> - <%= button_to_function('delete', _('Remove'), 'removeTaskBox(this, %s, "%s", %s)' % [url_for(:profile => params[:profile], :remove_task => task.id).to_json, "task-#{task.id}", _('Are you sure you want to remove this article suggestion?').to_json]) %> - - <% end %> - - <%= yield :extra_content %> -
    diff --git a/app/views/spam/_task_spam.html.erb b/app/views/spam/_task_spam.html.erb new file mode 100644 index 0000000..c019218 --- /dev/null +++ b/app/views/spam/_task_spam.html.erb @@ -0,0 +1,4 @@ +<% @task_spam.each do |t| %> + <%= render :partial => partial_for_class(t.class), :locals => { :task => t } %> +<% end %> +<%= pagination_links @task_spam, :param_name => :tasks_page %> diff --git a/app/views/spam/_task_spam.rhtml b/app/views/spam/_task_spam.rhtml deleted file mode 100644 index c019218..0000000 --- a/app/views/spam/_task_spam.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -<% @task_spam.each do |t| %> - <%= render :partial => partial_for_class(t.class), :locals => { :task => t } %> -<% end %> -<%= pagination_links @task_spam, :param_name => :tasks_page %> diff --git a/app/views/tasks/_approve_comment_accept_details.html.erb b/app/views/tasks/_approve_comment_accept_details.html.erb new file mode 100644 index 0000000..e2003e6 --- /dev/null +++ b/app/views/tasks/_approve_comment_accept_details.html.erb @@ -0,0 +1,7 @@ +

    + <%= _('Title: ') %> + <%= task.comment.title %> +

    +

    + <%= task.comment.body %> +

    diff --git a/app/views/tasks/_approve_comment_accept_details.rhtml b/app/views/tasks/_approve_comment_accept_details.rhtml deleted file mode 100644 index e2003e6..0000000 --- a/app/views/tasks/_approve_comment_accept_details.rhtml +++ /dev/null @@ -1,7 +0,0 @@ -

    - <%= _('Title: ') %> - <%= task.comment.title %> -

    -

    - <%= task.comment.body %> -

    diff --git a/app/views/tasks/_task_icon.html.erb b/app/views/tasks/_task_icon.html.erb new file mode 100644 index 0000000..be67daf --- /dev/null +++ b/app/views/tasks/_task_icon.html.erb @@ -0,0 +1,16 @@ +<% + icon_info = task.icon + if icon_info[:type] == :profile_image + icon = profile_image(icon_info[:profile], :minor) + elsif icon_info[:type] == :defined_image + icon = "#{icon_info[:name]}" + end + + if icon_info[:url] + icon = link_to(icon, icon_info[:url]) + end +%> + +
    + <%= icon %> +
    diff --git a/app/views/tasks/_task_icon.rhtml b/app/views/tasks/_task_icon.rhtml deleted file mode 100644 index be67daf..0000000 --- a/app/views/tasks/_task_icon.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% - icon_info = task.icon - if icon_info[:type] == :profile_image - icon = profile_image(icon_info[:profile], :minor) - elsif icon_info[:type] == :defined_image - icon = "#{icon_info[:name]}" - end - - if icon_info[:url] - icon = link_to(icon, icon_info[:url]) - end -%> - -
    - <%= icon %> -
    diff --git a/app/views/tasks/_task_title.html.erb b/app/views/tasks/_task_title.html.erb new file mode 100644 index 0000000..3ec1f41 --- /dev/null +++ b/app/views/tasks/_task_title.html.erb @@ -0,0 +1,3 @@ + + <%= task.title %> + diff --git a/app/views/tasks/_task_title.rhtml b/app/views/tasks/_task_title.rhtml deleted file mode 100644 index 3ec1f41..0000000 --- a/app/views/tasks/_task_title.rhtml +++ /dev/null @@ -1,3 +0,0 @@ - - <%= task.title %> - diff --git a/app/views/trusted_sites/edit.html.erb b/app/views/trusted_sites/edit.html.erb new file mode 100644 index 0000000..5834a2b --- /dev/null +++ b/app/views/trusted_sites/edit.html.erb @@ -0,0 +1,15 @@ +

    <%= _("Editing trusted site") %>

    + +<% form_tag :action => :update do %> + + <%= text_field_tag :site, @site %> + <%= hidden_field_tag :orig_site, @site %> + + <% button_bar do %> + <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'} ) %> + <% end %> +<% end %> + + diff --git a/app/views/trusted_sites/edit.rhtml b/app/views/trusted_sites/edit.rhtml deleted file mode 100644 index 5834a2b..0000000 --- a/app/views/trusted_sites/edit.rhtml +++ /dev/null @@ -1,15 +0,0 @@ -

    <%= _("Editing trusted site") %>

    - -<% form_tag :action => :update do %> - - <%= text_field_tag :site, @site %> - <%= hidden_field_tag :orig_site, @site %> - - <% button_bar do %> - <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'} ) %> - <% end %> -<% end %> - - diff --git a/app/views/trusted_sites/index.html.erb b/app/views/trusted_sites/index.html.erb new file mode 100644 index 0000000..353daeb --- /dev/null +++ b/app/views/trusted_sites/index.html.erb @@ -0,0 +1,28 @@ +

    <%= _('Manage trusted sites') %>

    + +

    +<%= _('Here you can manage the list of trusted sites of your environment. A trusted site is a site that you consider safe enough to incorporate their content through iframes.') %> +

    + + + + + + + <% @sites.each do |site| %> + + + + + <% end %> +
    <%= _('Site') %><%= _('Actions') %>
    + <%= link_to site, :action => 'show', :site => site %> + + <%= button_without_text :edit, _('Edit'), :action => 'edit', :site => site %> + <%= button_without_text :remove, _('Remove'), {:action => :destroy, :site => site}, :method => :delete, :confirm => _('Are you sure you want to remove this site from the list of trusted sites?') %> +
    + +<% button_bar do %> + <%= button :add, _('Add a trusted site'), :action => 'new' %> + <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> +<% end %> diff --git a/app/views/trusted_sites/index.rhtml b/app/views/trusted_sites/index.rhtml deleted file mode 100644 index 353daeb..0000000 --- a/app/views/trusted_sites/index.rhtml +++ /dev/null @@ -1,28 +0,0 @@ -

    <%= _('Manage trusted sites') %>

    - -

    -<%= _('Here you can manage the list of trusted sites of your environment. A trusted site is a site that you consider safe enough to incorporate their content through iframes.') %> -

    - - - - - - - <% @sites.each do |site| %> - - - - - <% end %> -
    <%= _('Site') %><%= _('Actions') %>
    - <%= link_to site, :action => 'show', :site => site %> - - <%= button_without_text :edit, _('Edit'), :action => 'edit', :site => site %> - <%= button_without_text :remove, _('Remove'), {:action => :destroy, :site => site}, :method => :delete, :confirm => _('Are you sure you want to remove this site from the list of trusted sites?') %> -
    - -<% button_bar do %> - <%= button :add, _('Add a trusted site'), :action => 'new' %> - <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> -<% end %> diff --git a/app/views/trusted_sites/new.html.erb b/app/views/trusted_sites/new.html.erb new file mode 100644 index 0000000..d64c8ab --- /dev/null +++ b/app/views/trusted_sites/new.html.erb @@ -0,0 +1,14 @@ +

    <%= _("Add a new trusted site") %>

    + +<% form_tag :action => :create do %> + + <%= text_field_tag :site, @site %> + + <% button_bar do %> + <%= submit_button('save', _('Add trusted site'), :cancel => {:action => 'index'} ) %> + <% end %> +<% end %> + + diff --git a/app/views/trusted_sites/new.rhtml b/app/views/trusted_sites/new.rhtml deleted file mode 100644 index d64c8ab..0000000 --- a/app/views/trusted_sites/new.rhtml +++ /dev/null @@ -1,14 +0,0 @@ -

    <%= _("Add a new trusted site") %>

    - -<% form_tag :action => :create do %> - - <%= text_field_tag :site, @site %> - - <% button_bar do %> - <%= submit_button('save', _('Add trusted site'), :cancel => {:action => 'index'} ) %> - <% end %> -<% end %> - - diff --git a/app/views/users/_index_buttons.html.erb b/app/views/users/_index_buttons.html.erb new file mode 100644 index 0000000..63add14 --- /dev/null +++ b/app/views/users/_index_buttons.html.erb @@ -0,0 +1,6 @@ +<% button_bar do %> + <%= button :'text-plain', _('User list as [CSV]'), :action => :download, :format => 'csv' %> + <%= button :'text-html', _('User list as [XML]'), :action => :download, :format => 'xml' %> + <%= button :send, _('Send e-mail to all users'), :action => 'send_mail' %> + <%= button :back, _('Back'), :controller => 'admin_panel' %> +<% end %> diff --git a/app/views/users/_index_buttons.rhtml b/app/views/users/_index_buttons.rhtml deleted file mode 100644 index 63add14..0000000 --- a/app/views/users/_index_buttons.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -<% button_bar do %> - <%= button :'text-plain', _('User list as [CSV]'), :action => :download, :format => 'csv' %> - <%= button :'text-html', _('User list as [XML]'), :action => :download, :format => 'xml' %> - <%= button :send, _('Send e-mail to all users'), :action => 'send_mail' %> - <%= button :back, _('Back'), :controller => 'admin_panel' %> -<% end %> diff --git a/app/views/users/_users_list.html.erb b/app/views/users/_users_list.html.erb new file mode 100644 index 0000000..dce24e4 --- /dev/null +++ b/app/views/users/_users_list.html.erb @@ -0,0 +1,37 @@ +
    +
    <%= filter_title(@filter) %>
    + <%= filter_selector(@filter) %> +
    +
    + + + + + + + + + + + <% @collection.each do |p| %> + + + + + <% end %> +
    <%= _('Member') %><%= _('Actions') %>
    <%= link_to_profile p.short_name, p.identifier, :title => p.name %> +
    + <% if p.is_admin? %> + <%= button_without_text :'reset-admin-role', _('Reset admin role'), :action => 'reset_admin_role', :id => p, :q => @q, :filter => @filter %> + <% else %> + <%= button_without_text :'set-admin-role', _('Set admin role'), :action => 'set_admin_role', :id => p, :q => @q, :filter => @filter %> + <% end %> + <% if !p.user.activated? %> + <%= button_without_text :'activate-user', _('Activate user'), :action => 'activate', :id => p, :q => @q, :filter => @filter %> + <% else %> + <%= button_without_text :'deactivate-user', _('Deactivate user'), :action => 'deactivate', :id => p, :q => @q, :filter => @filter %> + <% end %> +
    +
    + +<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %> diff --git a/app/views/users/_users_list.rhtml b/app/views/users/_users_list.rhtml deleted file mode 100644 index dce24e4..0000000 --- a/app/views/users/_users_list.rhtml +++ /dev/null @@ -1,37 +0,0 @@ -
    -
    <%= filter_title(@filter) %>
    - <%= filter_selector(@filter) %> -
    -
    - - - - - - - - - - - <% @collection.each do |p| %> - - - - - <% end %> -
    <%= _('Member') %><%= _('Actions') %>
    <%= link_to_profile p.short_name, p.identifier, :title => p.name %> -
    - <% if p.is_admin? %> - <%= button_without_text :'reset-admin-role', _('Reset admin role'), :action => 'reset_admin_role', :id => p, :q => @q, :filter => @filter %> - <% else %> - <%= button_without_text :'set-admin-role', _('Set admin role'), :action => 'set_admin_role', :id => p, :q => @q, :filter => @filter %> - <% end %> - <% if !p.user.activated? %> - <%= button_without_text :'activate-user', _('Activate user'), :action => 'activate', :id => p, :q => @q, :filter => @filter %> - <% else %> - <%= button_without_text :'deactivate-user', _('Deactivate user'), :action => 'deactivate', :id => p, :q => @q, :filter => @filter %> - <% end %> -
    -
    - -<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %> diff --git a/app/views/users/_users_search_form.html.erb b/app/views/users/_users_search_form.html.erb new file mode 100644 index 0000000..b4f6281 --- /dev/null +++ b/app/views/users/_users_search_form.html.erb @@ -0,0 +1,6 @@ +
    + + <%= text_field_tag 'q', @q, :title => _("Find users") %> + + <%= submit_button(:search, _('Search')) %> +
    \ No newline at end of file diff --git a/app/views/users/_users_search_form.rhtml b/app/views/users/_users_search_form.rhtml deleted file mode 100644 index b4f6281..0000000 --- a/app/views/users/_users_search_form.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -
    - - <%= text_field_tag 'q', @q, :title => _("Find users") %> - - <%= submit_button(:search, _('Search')) %> -
    \ No newline at end of file -- libgit2 0.21.2