diff --git a/_contents.html.erb b/_contents.html.erb new file mode 100644 index 0000000..3975b70 --- /dev/null +++ b/_contents.html.erb @@ -0,0 +1,147 @@ + + + +<% if @status.present? %> +
+

Current Status...

+<%= link_to t("All My Statuses"), user_statuses_path(@status.user) %>
+<%= image_tag @status.icon if @status.icon.attached? %> | <%= time_ago_in_words(@status.created_at) %> | <% if current_user == @status.user %> + <%= link_to 'Edit', edit_user_status_path(@status.user, @status) %> | + <%= link_to t("Delete"), user_status_path(@status.user, @status), + data: { confirm: t("Are you sure? All information in this status will be lost.") }, + method: :delete %> + <% end %> +
+

<%= raw sanitize_field(@status, :text) %>

+<% if @status.mood.present? %> +

Mood: <%= @status.mood %> +<% end %> +<% if @status.music.present? %> +

Music: <%= @status.music %>

+<% end %> +
+<% end %> +

+ <% unless @fandoms.empty? %> +

+

<%= ts("Fandoms") %>

+
    + <% @fandoms.each_with_index do |fandom, i| %> + <% if i>= ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD && !params[:expand_fandoms] %> +
  1. + <% end %> + <% if fandom.merger %> + <%= link_to fandom.name, {:controller => :works, :user_id => @user, :pseud_id => @pseud, :fandom_id => fandom.merger.id} %> (<%= fandom.work_count %>) + <% else %> + <%= link_to fandom.name, {:controller => :works, :user_id => @user, :pseud_id => @pseud, :fandom_id => fandom.id} %> (<%= fandom.work_count %>) + <% end %> +
  2. + <% end %> +
+ <% if @fandoms.length > ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD %> +

+ + + +

+ <% end %> +
+ <% end %> + + <% unless @works.blank? %> +
+

<%= ts("Recent works") %>

+ + <% if @pseud %> + <% if @pseud.works.count > ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD %> +
+ <% end %> + + <% unless @series.blank? %> +
+

<%= ts("Recent series") %>

+
    + <%= render partial: 'series/series_blurb', collection: @series, as: :series %> +
+ <% if @pseud %> + <% if @pseud.series.count > ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD %> + + <% end %> + <% else %> + <% if @user.series.size > ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD %> + + <% end %> + <% end %> +
+ <% end %> + + <% unless @bookmarks.blank? %> +
+

<%= ts("Recent bookmarks") %>

+
    + <%= render partial: 'bookmarks/bookmark_blurb', collection: @bookmarks, as: :bookmark %> +
+ <% unless @user == User.orphan_account %> + <% if @pseud %> + <% if @pseud.bookmarks.visible.size > ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD %> + + <% end %> + <% else %> + <% if @user.bookmarks.visible.size > ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD %> + + <% end %> + <% end %> + <% end %> +
+ <% end %> + +<% if @works.blank? && @series.blank? && @bookmarks.blank? %> + <% if current_user == @user %> +

+ <%= ts("You don't have anything posted under this name yet. ") %> + <%= ts("Would you like to ")%> + <%= link_to ts("post a new work"), new_work_path %> + <%= ts("or maybe")%> + <%= link_to ts("a new bookmark"), new_external_work_path %>? +

+ <% else %> +

<%= ts("There are no works or bookmarks under this name yet.") %>

+ <% end %> +<% end %> + + +<%= content_for :footer_js do %> + <%= javascript_tag do %> + $j(document).ready(function() { + $j("#expand-fandoms").removeClass("hidden").click(function(e) { + e.preventDefault(); + $j(".more").toggleClass("hidden"); + $j("#collapse-fandoms").toggleClass("hidden"); + $j(this).toggleClass("hidden"); + }); + $j("#collapse-fandoms").click(function(e) { + e.preventDefault(); + $j(".more").toggleClass("hidden"); + $j("#expand-fandoms").toggleClass("hidden"); + $j(this).toggleClass("hidden"); + }); + }); + <% end %> +<% end %> diff --git a/_greeting.html.erb b/_greeting.html.erb new file mode 100644 index 0000000..b5130fe --- /dev/null +++ b/_greeting.html.erb @@ -0,0 +1,59 @@ + diff --git a/_menu_browse.html.erb b/_menu_browse.html.erb new file mode 100644 index 0000000..e2f077e --- /dev/null +++ b/_menu_browse.html.erb @@ -0,0 +1,6 @@ + diff --git a/browse.html.erb b/browse.html.erb new file mode 100644 index 0000000..b656c57 --- /dev/null +++ b/browse.html.erb @@ -0,0 +1,4 @@ +

<%= ts('Browse', key: 'header') %>

+
+ <%= render 'menu/menu_browse' %> +