diff --git a/app/views/blocks/members.html.erb b/app/views/blocks/members.html.erb new file mode 100644 index 0000000..4bd47e1 --- /dev/null +++ b/app/views/blocks/members.html.erb @@ -0,0 +1,5 @@ +<%= link_to _('View all'), :profile => profile.identifier, :controller => 'profile', :action => 'members' %> + +<% if show_join_leave_button %> + <%= render :partial => 'blocks/profile_info_actions/join_leave_community' %> +<% end %> diff --git a/app/views/blocks/members.rhtml b/app/views/blocks/members.rhtml deleted file mode 100644 index 4bd47e1..0000000 --- a/app/views/blocks/members.rhtml +++ /dev/null @@ -1,5 +0,0 @@ -<%= link_to _('View all'), :profile => profile.identifier, :controller => 'profile', :action => 'members' %> - -<% if show_join_leave_button %> - <%= render :partial => 'blocks/profile_info_actions/join_leave_community' %> -<% end %> diff --git a/app/views/blocks/profile_info_actions/_join_leave_community.html.erb b/app/views/blocks/profile_info_actions/_join_leave_community.html.erb new file mode 100644 index 0000000..8200b8f --- /dev/null +++ b/app/views/blocks/profile_info_actions/_join_leave_community.html.erb @@ -0,0 +1,29 @@ +
+ <% if logged_in? %> + <% if profile.members.include?(user) %> + <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url, + :class => 'leave-community', + :title => _("Leave community"), + :style => 'position: relative;') %> + <%= button(:add, content_tag('span', _('Join')), profile.join_url, + :class => 'join-community', + :title => _("Join community"), + :style => 'position: relative; display: none;') %> + <% else %> + <% unless profile.already_request_membership?(user) %> + <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url, + :class => 'leave-community', + :title => _("Leave community"), + :style => 'position: relative; display: none;') %> + <%= button(:add, content_tag('span', _('Join')), profile.join_url, + :class => 'join-community', + :title => _("Join community"), + :style => 'position: relative;') %> + <% end %> + <% end %> + <% else %> + <%= link_to content_tag('span', _('Join')), profile.join_not_logged_url, + :class => 'button with-text icon-add', + :title => _('Join this community') %> + <% end %> +
diff --git a/app/views/blocks/profile_info_actions/_join_leave_community.rhtml b/app/views/blocks/profile_info_actions/_join_leave_community.rhtml deleted file mode 100644 index 8200b8f..0000000 --- a/app/views/blocks/profile_info_actions/_join_leave_community.rhtml +++ /dev/null @@ -1,29 +0,0 @@ -
- <% if logged_in? %> - <% if profile.members.include?(user) %> - <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url, - :class => 'leave-community', - :title => _("Leave community"), - :style => 'position: relative;') %> - <%= button(:add, content_tag('span', _('Join')), profile.join_url, - :class => 'join-community', - :title => _("Join community"), - :style => 'position: relative; display: none;') %> - <% else %> - <% unless profile.already_request_membership?(user) %> - <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url, - :class => 'leave-community', - :title => _("Leave community"), - :style => 'position: relative; display: none;') %> - <%= button(:add, content_tag('span', _('Join')), profile.join_url, - :class => 'join-community', - :title => _("Join community"), - :style => 'position: relative;') %> - <% end %> - <% end %> - <% else %> - <%= link_to content_tag('span', _('Join')), profile.join_not_logged_url, - :class => 'button with-text icon-add', - :title => _('Join this community') %> - <% end %> -
diff --git a/app/views/content_viewer/article_versions.html.erb b/app/views/content_viewer/article_versions.html.erb new file mode 100644 index 0000000..3613994 --- /dev/null +++ b/app/views/content_viewer/article_versions.html.erb @@ -0,0 +1,16 @@ +<%= article_title(@page, :no_link => true) %> + +

<%= _('This is the list of all versions of this content. Select a version to see it and then revert to it.') %>.

+ + + +<%= pagination_links @versions, :param_name => 'npage' %> diff --git a/app/views/content_viewer/article_versions.rhtml b/app/views/content_viewer/article_versions.rhtml deleted file mode 100644 index 3613994..0000000 --- a/app/views/content_viewer/article_versions.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<%= article_title(@page, :no_link => true) %> - -

<%= _('This is the list of all versions of this content. Select a version to see it and then revert to it.') %>.

- - - -<%= pagination_links @versions, :param_name => 'npage' %> diff --git a/app/views/content_viewer/versioned_article.html.erb b/app/views/content_viewer/versioned_article.html.erb new file mode 100644 index 0000000..6bb666d --- /dev/null +++ b/app/views/content_viewer/versioned_article.html.erb @@ -0,0 +1,43 @@ +
+ +
+ <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> + + <% if @page.allow_edit?(user) && !remove_content_button(:edit) %> + <% content = content_tag('span', _('Revert to this version')) %> + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id, :version => @version }) %> + <%= expirable_button @page, :edit, content, url, :id => 'article-revert-version-link' %> + <% end %> +
+ +
+

<%= @versioned_article.name %>

+ <%= _("Version %{version} - %{author} on %{date}") % {:version => @version, :author => @page.author_name(@version), :date => show_time(@versioned_article.updated_at) } %> +
+ + <% version_license = @page.version_license(@version) %> + <%# This seemingly doubled verification exists because the article-sub-header + div must appear only if at least one content inside it will appeart. + Although we have only one content now, we might have others in the future. + So we're keeping it like that to avoid mistakes. %> + <% if version_license.present? %> +
+ <% if version_license.present? %> +
+ <%= _('Licensed under %s') % (version_license.url.present? ? link_to(version_license.name, version_license.url, :target => '_blank') : version_license.name) %> +
+ <% end %> +
+ <% end %> + + <% cache(@page.cache_key(params, user, language)) do %> +
"> + <%= @versioned_article.body %> +
+
+ <% end %> + + <%= display_source_info(@page) %> + +
+<%= add_zoom_to_article_images %> diff --git a/app/views/content_viewer/versioned_article.rhtml b/app/views/content_viewer/versioned_article.rhtml deleted file mode 100644 index 6bb666d..0000000 --- a/app/views/content_viewer/versioned_article.rhtml +++ /dev/null @@ -1,43 +0,0 @@ -
- -
- <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> - - <% if @page.allow_edit?(user) && !remove_content_button(:edit) %> - <% content = content_tag('span', _('Revert to this version')) %> - <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id, :version => @version }) %> - <%= expirable_button @page, :edit, content, url, :id => 'article-revert-version-link' %> - <% end %> -
- -
-

<%= @versioned_article.name %>

- <%= _("Version %{version} - %{author} on %{date}") % {:version => @version, :author => @page.author_name(@version), :date => show_time(@versioned_article.updated_at) } %> -
- - <% version_license = @page.version_license(@version) %> - <%# This seemingly doubled verification exists because the article-sub-header - div must appear only if at least one content inside it will appeart. - Although we have only one content now, we might have others in the future. - So we're keeping it like that to avoid mistakes. %> - <% if version_license.present? %> -
- <% if version_license.present? %> -
- <%= _('Licensed under %s') % (version_license.url.present? ? link_to(version_license.name, version_license.url, :target => '_blank') : version_license.name) %> -
- <% end %> -
- <% end %> - - <% cache(@page.cache_key(params, user, language)) do %> -
"> - <%= @versioned_article.body %> -
-
- <% end %> - - <%= display_source_info(@page) %> - -
-<%= add_zoom_to_article_images %> diff --git a/app/views/profile/_reply_scrap_on_self.html.erb b/app/views/profile/_reply_scrap_on_self.html.erb new file mode 120000 index 0000000..6f9bf42 --- /dev/null +++ b/app/views/profile/_reply_scrap_on_self.html.erb @@ -0,0 +1 @@ +_leave_scrap.html.erb \ No newline at end of file diff --git a/app/views/profile/_reply_scrap_on_self.rhtml b/app/views/profile/_reply_scrap_on_self.rhtml deleted file mode 120000 index 6f9bf42..0000000 --- a/app/views/profile/_reply_scrap_on_self.rhtml +++ /dev/null @@ -1 +0,0 @@ -_leave_scrap.html.erb \ No newline at end of file -- libgit2 0.21.2