aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorRhenium <rhenium@rhe.jp>2014-02-22 11:43:50 +0900
committerRhenium <rhenium@rhe.jp>2014-02-22 11:43:50 +0900
commitc241ae47a6bed0c0ebe9f8e3afa732570fbe7009 (patch)
tree12c257a4a8b33811df90179b2d3069c17cf19d57 /app
parent30f7f710081cb82ff680e3bdf072668fd20de29a (diff)
downloadaclog-c241ae47a6bed0c0ebe9f8e3afa732570fbe7009.tar.gz
fix page title / captions
Diffstat (limited to 'app')
-rw-r--r--app/views/apidocs/endpoint.html.haml2
-rw-r--r--app/views/apidocs/index.html.haml2
-rw-r--r--app/views/errors/render_error.html.haml2
-rw-r--r--app/views/layouts/apidocs.html.haml1
-rw-r--r--app/views/shared/__sidebar_thresholds.html.haml2
-rw-r--r--app/views/shared/_sidebar_all.html.haml21
-rw-r--r--app/views/shared/_sidebar_user.html.haml40
-rw-r--r--app/views/tweets/all_best.html.haml4
-rw-r--r--app/views/tweets/all_recent.html.haml4
-rw-r--r--app/views/tweets/all_timeline.atom.builder2
-rw-r--r--app/views/tweets/all_timeline.html.haml7
-rw-r--r--app/views/tweets/show.html.haml4
-rw-r--r--app/views/tweets/user_best.html.haml4
-rw-r--r--app/views/tweets/user_discovered_by.atom.builder2
-rw-r--r--app/views/tweets/user_discovered_by.html.haml10
-rw-r--r--app/views/tweets/user_discoveries.atom.builder2
-rw-r--r--app/views/tweets/user_discoveries.html.haml6
-rw-r--r--app/views/tweets/user_recent.html.haml4
-rw-r--r--app/views/tweets/user_timeline.atom.builder2
-rw-r--r--app/views/tweets/user_timeline.html.haml8
-rw-r--r--app/views/users/discovered_by.html.haml4
-rw-r--r--app/views/users/discovered_users.html.haml2
-rw-r--r--app/views/users/stats.html.haml2
23 files changed, 78 insertions, 59 deletions
diff --git a/app/views/apidocs/endpoint.html.haml b/app/views/apidocs/endpoint.html.haml
index 675722a..63af8b6 100644
--- a/app/views/apidocs/endpoint.html.haml
+++ b/app/views/apidocs/endpoint.html.haml
@@ -1,4 +1,4 @@
-- title "API Documentation: "
+- title "aclog API: #{format_endpoint_name(@endpoint)}"
%h1= format_endpoint_name(@endpoint)
%p= @endpoint.route_description
%h2 Resource URL
diff --git a/app/views/apidocs/index.html.haml b/app/views/apidocs/index.html.haml
index 9aa5a8c..a440c55 100644
--- a/app/views/apidocs/index.html.haml
+++ b/app/views/apidocs/index.html.haml
@@ -1,4 +1,4 @@
-- title "API documentation"
+- title "aclog API"
%h2 OAuth
%p ツイートを非公開にしているアカウントの情報にアクセスするには本人であるか、対象のアカウントをフォローしている必要があります。Aclog API では、その認証に OAuth Echo を使用します。
%p OAuth Echo を使用するには以下のリクエストヘッダを使用します。
diff --git a/app/views/errors/render_error.html.haml b/app/views/errors/render_error.html.haml
index c7a4811..3bd94c8 100644
--- a/app/views/errors/render_error.html.haml
+++ b/app/views/errors/render_error.html.haml
@@ -1,4 +1,4 @@
-- title "Error"
+- title "#{response.status}: @message"
- if @user
.col-sm-3.col-md-offset-1
= render "shared/sidebar_user", user: @user
diff --git a/app/views/layouts/apidocs.html.haml b/app/views/layouts/apidocs.html.haml
index e94be66..7cff911 100644
--- a/app/views/layouts/apidocs.html.haml
+++ b/app/views/layouts/apidocs.html.haml
@@ -5,7 +5,6 @@
%h1 aclog API
.sidebar-list
.list-group.list-group-scroll
- = link_to_with_active "Index", about_api_path, class: "list-group-item"
- @routes.values.inject(:merge).each do |namespace, endpoints|
%span.list-group-head= namespace.titleize
- endpoints.select {|_, e| !e.route_nodoc }.each do |path, endpoint|
diff --git a/app/views/shared/__sidebar_thresholds.html.haml b/app/views/shared/__sidebar_thresholds.html.haml
index 3a27f6d..aeeb7ab 100644
--- a/app/views/shared/__sidebar_thresholds.html.haml
+++ b/app/views/shared/__sidebar_thresholds.html.haml
@@ -1,7 +1,7 @@
- counts.each_slice(2).to_a.transpose.each do |ns|
.list-group-col
- ns.each do |n|
- - if [params[:reactions].to_i, 1].max == n
+ - if n == (params[:reactions] || 1).to_i
= link_to "#{n}~", params, class: "list-group-item active"
- else
= link_to "#{n}~", params.merge(reactions: (n == 1 ? nil : n)), class: "list-group-item"
diff --git a/app/views/shared/_sidebar_all.html.haml b/app/views/shared/_sidebar_all.html.haml
index 3efe2e7..d0a102c 100644
--- a/app/views/shared/_sidebar_all.html.haml
+++ b/app/views/shared/_sidebar_all.html.haml
@@ -1,11 +1,16 @@
.sidebar
%h1 All
- - _show_thresholds = ["all_timeline"].include?(params[:action])
- .sidebar-list{class: _show_thresholds ? "row" : ""}
- .list-group{class: _show_thresholds ? "col-xs-6 col-sm-12" : ""}
- = link_to_with_active "Best", best_path, class: "list-group-item"
- = link_to_with_active "Recent", recent_path, class: "list-group-item"
- = link_to_with_active "Timeline", timeline_path, class: "list-group-item"
- - if _show_thresholds
+ - if defined?(thresholds)
+ .sidebar-list.row
.list-group.col-xs-6.col-sm-12
- = render "shared/_sidebar_thresholds", counts: [1, 10, 50, 100, 500, 1000]
+ = link_to_with_active "Best", best_path, class: "list-group-item"
+ = link_to_with_active "Recent", recent_path, class: "list-group-item"
+ = link_to_with_active "Timeline", timeline_path, class: "list-group-item"
+ .list-group.col-xs-6.col-sm-12
+ = render "shared/_sidebar_thresholds", counts: thresholds
+ - else
+ .sidebar-list
+ .list-group
+ = link_to_with_active "Best", best_path, class: "list-group-item"
+ = link_to_with_active "Recent", recent_path, class: "list-group-item"
+ = link_to_with_active "Timeline", timeline_path, class: "list-group-item"
diff --git a/app/views/shared/_sidebar_user.html.haml b/app/views/shared/_sidebar_user.html.haml
index a5be9e1..3f3776d 100644
--- a/app/views/shared/_sidebar_user.html.haml
+++ b/app/views/shared/_sidebar_user.html.haml
@@ -19,18 +19,30 @@
%span> d ago
- else
.alert.alert-aclog @#{user.screen_name} は aclog に登録していません
- - _show_thresholds = ["user_timeline", "user_discoveries", "user_discovored_by"].include?(params[:action])
- .sidebar-list{class: _show_thresholds ? "row" : ""}
- .list-group{class: _show_thresholds ? "col-xs-6 col-sm-12" : ""}
- - if authorized_to_show_user_best?(user)
- = link_to_with_active "Best", user_path(user.screen_name), class: "list-group-item"
- = link_to_with_active "Timeline", user_timeline_path(user.screen_name), class: "list-group-item"
- - else
- = link_to_with_active "Timeline", user_path(user.screen_name), class: "list-group-item"
- = link_to_with_active "Discoveries", user_discoveries_path(user.screen_name), class: "list-group-item"
- - if authorized_to_show_user_best?(user)
- = link_to_with_active "Discovered by", user_discovered_by_path(user.screen_name), class: "list-group-item"
- = link_to_with_active "Discovered users", user_discovered_users_path(user.screen_name), class: "list-group-item"
- - if _show_thresholds
+
+ - if defined?(thresholds)
+ .sidebar-list.row
.list-group.col-xs-6.col-sm-12
- = render "shared/_sidebar_thresholds", counts: [1, 3, 10, 30, 50, 100]
+ - if authorized_to_show_user_best?(user)
+ = link_to_with_active "Best", user_path(user.screen_name), class: "list-group-item"
+ = link_to_with_active "Timeline", user_timeline_path(user.screen_name), class: "list-group-item"
+ - else
+ = link_to_with_active "Timeline", user_path(user.screen_name), class: "list-group-item"
+ = link_to_with_active "Discoveries", user_discoveries_path(user.screen_name), class: "list-group-item"
+ - if authorized_to_show_user_best?(user)
+ = link_to_with_active "Discovered by", user_discovered_by_path(user.screen_name), class: "list-group-item"
+ = link_to_with_active "Discovered users", user_discovered_users_path(user.screen_name), class: "list-group-item"
+ .list-group.col-xs-6.col-sm-12
+ = render "shared/_sidebar_thresholds", counts: thresholds
+ - else
+ .sidebar-list
+ .list-group
+ - if authorized_to_show_user_best?(user)
+ = link_to_with_active "Best", user_path(user.screen_name), class: "list-group-item"
+ = link_to_with_active "Timeline", user_timeline_path(user.screen_name), class: "list-group-item"
+ - else
+ = link_to_with_active "Timeline", user_path(user.screen_name), class: "list-group-item"
+ = link_to_with_active "Discoveries", user_discoveries_path(user.screen_name), class: "list-group-item"
+ - if authorized_to_show_user_best?(user)
+ = link_to_with_active "Discovered by", user_discovered_by_path(user.screen_name), class: "list-group-item"
+ = link_to_with_active "Discovered users", user_discovered_users_path(user.screen_name), class: "list-group-item"
diff --git a/app/views/tweets/all_best.html.haml b/app/views/tweets/all_best.html.haml
index 6f22069..629677d 100644
--- a/app/views/tweets/all_best.html.haml
+++ b/app/views/tweets/all_best.html.haml
@@ -3,7 +3,7 @@
= render "shared/sidebar_all"
.col-sm-9.col-md-7.col-lg-6
%h1
- Best Tweets
- %small of All
+ Top Tweets
+ %small of All Time
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/all_recent.html.haml b/app/views/tweets/all_recent.html.haml
index 2aa2f9a..04e7182 100644
--- a/app/views/tweets/all_recent.html.haml
+++ b/app/views/tweets/all_recent.html.haml
@@ -3,7 +3,7 @@
= render "shared/sidebar_all"
.col-sm-9.col-md-7.col-lg-6
%h1
- Recent Best Tweets
- %small of All
+ Best Tweets
+ %small in Last 3 Days
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/all_timeline.atom.builder b/app/views/tweets/all_timeline.atom.builder
index 823f282..5a41c3e 100644
--- a/app/views/tweets/all_timeline.atom.builder
+++ b/app/views/tweets/all_timeline.atom.builder
@@ -1,3 +1,3 @@
-title "Newest"
+title "Public Timeline"
xml << render("tweets")
diff --git a/app/views/tweets/all_timeline.html.haml b/app/views/tweets/all_timeline.html.haml
index 6bb0ec4..48a64cc 100644
--- a/app/views/tweets/all_timeline.html.haml
+++ b/app/views/tweets/all_timeline.html.haml
@@ -1,9 +1,8 @@
-- title "Timeline of All"
+- title "Public Timeline"
.col-sm-3.col-md-offset-1
- = render "shared/sidebar_all"
+ = render "shared/sidebar_all", thresholds: [1, 10, 50, 100, 500, 1000]
.col-sm-9.col-md-7.col-lg-6
%h1
- Timeline
- %small of All
+ Public Timeline
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/show.html.haml b/app/views/tweets/show.html.haml
index 9191829..d40478c 100644
--- a/app/views/tweets/show.html.haml
+++ b/app/views/tweets/show.html.haml
@@ -1,9 +1,9 @@
-- title CGI.unescapeHTML(strip_tags(format_tweet_text(@tweet.text))) + " from @" + @user.screen_name
+- title "\"#{CGI.unescapeHTML(strip_tags(format_tweet_text(@tweet.text)))}\" from #{@user.name} (@#{@user.screen_name})"
.col-sm-3.col-md-offset-1
= render "shared/sidebar_user", user: @user
.col-sm-9.col-md-7.col-lg-6
%h1
- %small #{@user.screen_name} 's
+ %small #{@user.screen_name}'s
Tweet
.statuses
= render partial: "tweet_reply", collection: @replies_before, as: :tweet
diff --git a/app/views/tweets/user_best.html.haml b/app/views/tweets/user_best.html.haml
index 62b04ae..3384d35 100644
--- a/app/views/tweets/user_best.html.haml
+++ b/app/views/tweets/user_best.html.haml
@@ -1,9 +1,9 @@
-- title @user.screen_name + "'s Best Tweets"
+- title "@#{@user.screen_name}'s Best Tweets"
.col-sm-3.col-md-offset-1
= render "shared/sidebar_user", user: @user
.col-sm-9.col-md-7.col-lg-6
%h1
- %small #{@user.screen_name} 's
+ %small #{@user.screen_name}'s
Best Tweets
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/user_discovered_by.atom.builder b/app/views/tweets/user_discovered_by.atom.builder
index 991dc6f..1fb670a 100644
--- a/app/views/tweets/user_discovered_by.atom.builder
+++ b/app/views/tweets/user_discovered_by.atom.builder
@@ -1,3 +1,3 @@
-title @user.screen_name + "'s Discovered by " + @source_user.screen_name
+title "@#{@user.screen_name}'s Tweets Discovered By @#{@source_user.screen_name}"
xml << render("tweets")
diff --git a/app/views/tweets/user_discovered_by.html.haml b/app/views/tweets/user_discovered_by.html.haml
index 967a213..ab36b0f 100644
--- a/app/views/tweets/user_discovered_by.html.haml
+++ b/app/views/tweets/user_discovered_by.html.haml
@@ -1,9 +1,13 @@
-- title @user.screen_name + "'s Discovered by " + @source_user.screen_name
+- title "@#{@user.screen_name}'s Tweets Discovered By @#{@source_user.screen_name}"
.col-sm-3.col-md-offset-1
- = render "shared/sidebar_user", user: @user
+ = render "shared/sidebar_user", user: @user, thresholds: [1, 3, 10, 50, 100, 250]
.col-sm-9.col-md-7.col-lg-6
%h1
- %small #{@user.screen_name} 's
+ %small #{@user.screen_name}'s
Tweets
+ %small>
+ Discovered By
+ %a{href: user_path(@source_user.screen_name), title: "#{@source_user.name} (@#{@source_user.screen_name})"}
+ = @source_user.screen_name
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/user_discoveries.atom.builder b/app/views/tweets/user_discoveries.atom.builder
index 71f1a89..a17248c 100644
--- a/app/views/tweets/user_discoveries.atom.builder
+++ b/app/views/tweets/user_discoveries.atom.builder
@@ -1,3 +1,3 @@
-title @user.screen_name + "'s Discoveries"
+title "@#{@user.screen_name}'s Discoveries"
xml << render("tweets")
diff --git a/app/views/tweets/user_discoveries.html.haml b/app/views/tweets/user_discoveries.html.haml
index c0aaa96..287db93 100644
--- a/app/views/tweets/user_discoveries.html.haml
+++ b/app/views/tweets/user_discoveries.html.haml
@@ -1,9 +1,9 @@
-- title @user.screen_name + "'s Discoveries"
+- title "@#{@user.screen_name}'s Discoveries"
.col-sm-3.col-md-offset-1
- = render "shared/sidebar_user", user: @user
+ = render "shared/sidebar_user", user: @user, thresholds: [1, 3, 10, 50, 100, 250]
.col-sm-9.col-md-7.col-lg-6
%h1
- %small #{@user.screen_name} 's
+ %small #{@user.screen_name}'s
Discoveries
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/user_recent.html.haml b/app/views/tweets/user_recent.html.haml
index 4eaca20..ae78dba 100644
--- a/app/views/tweets/user_recent.html.haml
+++ b/app/views/tweets/user_recent.html.haml
@@ -1,9 +1,9 @@
-- title @user.screen_name + "'s Recent Best Tweets"
+- title "@#{@user.screen_name}'s Recent Best Tweets"
.col-sm-3.col-md-offset-1
= render "shared/sidebar_user", user: @user
.col-sm-9.col-md-7.col-lg-6
%h1
- %small #{@user.screen_name} 's
+ %small #{@user.screen_name}'s
Recent Best Tweets
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/tweets/user_timeline.atom.builder b/app/views/tweets/user_timeline.atom.builder
index 7f1a406..dcc8c0e 100644
--- a/app/views/tweets/user_timeline.atom.builder
+++ b/app/views/tweets/user_timeline.atom.builder
@@ -1,3 +1,3 @@
-title @user.screen_name + "'s Newest"
+title "@#{@user.screen_name}'s Timeline"
xml << render("tweets")
diff --git a/app/views/tweets/user_timeline.html.haml b/app/views/tweets/user_timeline.html.haml
index 55b3a55..f030533 100644
--- a/app/views/tweets/user_timeline.html.haml
+++ b/app/views/tweets/user_timeline.html.haml
@@ -1,9 +1,9 @@
-- title @user.screen_name + "'s Newest"
+- title "@#{@user.screen_name}'s Timeline"
.col-sm-3.col-md-offset-1
- = render "shared/sidebar_user", user: @user
+ = render "shared/sidebar_user", user: @user, thresholds: [0, 1, 3, 10, 50, 100]
.col-sm-9.col-md-7.col-lg-6
%h1
- %small #{@user.screen_name} 's
- Newest
+ %small #{@user.screen_name}'s
+ Timeline
.statuses= render @tweets
%p.loading= image_tag "loading.gif", width: 16, height: 16, alt: "Loading..."
diff --git a/app/views/users/discovered_by.html.haml b/app/views/users/discovered_by.html.haml
index 84e6007..018a2b3 100644
--- a/app/views/users/discovered_by.html.haml
+++ b/app/views/users/discovered_by.html.haml
@@ -1,10 +1,10 @@
-- title @user.screen_name + " is Discovered by ..."
+- title "@#{@user.screen_name} is Discovered By ..."
.col-sm-3.col-md-offset-1
= render "shared/sidebar_user", user: @user
.col-sm-9.col-md-7.col-lg-6
%h1
%small #{@user.screen_name} is
- Discovered by ...
+ Discovered By ...
.users
%ul.user-list
- @result.each do |user_id, *counts|
diff --git a/app/views/users/discovered_users.html.haml b/app/views/users/discovered_users.html.haml
index ec6ac44..887adf9 100644
--- a/app/views/users/discovered_users.html.haml
+++ b/app/views/users/discovered_users.html.haml
@@ -1,4 +1,4 @@
-- title @user.screen_name + " is Discovering ..."
+- title "@#{@user.screen_name} is Discovering ..."
.col-sm-3.col-md-offset-1
= render "shared/sidebar_user", user: @user
.col-sm-9.col-md-7.col-lg-6
diff --git a/app/views/users/stats.html.haml b/app/views/users/stats.html.haml
index f8465de..d2932be 100644
--- a/app/views/users/stats.html.haml
+++ b/app/views/users/stats.html.haml
@@ -1,4 +1,4 @@
-- title "Stats"
+- title "@#{@user.screen_name}'s Stats"
.avatar
= image_tag @user.profile_image_url_original, alt: @user.screen_name, width: 128, height: 128
- if @user.registered? && @user.account.active?