Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2017-07-05 02:10:24 +02:00
commit 58609e42d7
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
36 changed files with 443 additions and 310 deletions

View file

@ -18,15 +18,24 @@
* Render mentions as links in comments [#7327](https://github.com/diaspora/diaspora/pull/7327)
* Add support for mentions in comments to the front-end [#7386](https://github.com/diaspora/diaspora/pull/7386)
# 0.6.7.0
# 0.6.8.0
## Refactor
## Bug fixes
## Features
# 0.6.7.0
## Refactor
* Cleanup some translations [#7465](https://github.com/diaspora/diaspora/pull/7465)
## Features
* Change email without confirmation when mail is disabled [#7455](https://github.com/diaspora/diaspora/pull/7455)
* Warn users if they leave the profile editing page with unsaved changes [#7473](https://github.com/diaspora/diaspora/pull/7473)
* Add admin pages to the mobile interface [#7295](https://github.com/diaspora/diaspora/pull/7295)
* Add links to discourse to footer and sidebar [#7446](https://github.com/diaspora/diaspora/pull/7446)
# 0.6.6.0

View file

@ -1,17 +1,11 @@
(function(){
(function() {
Diaspora.Mobile.Drawer = {
initialize: function(){
$("#all_aspects").bind("tap click", function(evt){
evt.preventDefault();
$(this).find("+ li").toggleClass("hide");
});
$("#menu-badge").bind("tap click", function(evt){
initialize: function() {
$("#menu-badge").bind("tap click", function(evt) {
evt.preventDefault();
$("#app").toggleClass("draw");
});
$("#followed_tags").bind("tap click", function(evt){
$("#all_aspects, #followed_tags, #admin").bind("tap click", function(evt) {
evt.preventDefault();
$(this).find("+ li").toggleClass("hide");
});

View file

@ -2,9 +2,9 @@
@import 'bootstrap-variables';
@import 'animations';
/** ADMIN STYlES **/
/** user search **/
// ADMIN STYlES
// user search
.users {
li.user {
border-bottom: 1px solid $light-grey;
@ -16,15 +16,14 @@
.avatar {
width: 50px;
height: 50px;
max-width: none;
}
.actions{ width: 150px; }
.pull-right .label{ display: inline-block; }
}
}
/** Invites panel **/
// Invites panel
.more_invites{
#add-invites-section{
line-height: 34px;
@ -32,12 +31,49 @@
}
}
/** reported posts **/
.invite-emails {
margin-bottom: 10px;
}
@import 'report';
// Weekly stats
.week-selector {
margin-top: 10px;
}
/** pod list **/
// Pod stats
.segment-selection {
select,
[type=submit] {
margin-top: 10px;
}
}
.percent-change {
&.increase {
color: $increase;
}
&.decrease {
color: $decrease;
}
}
// reported posts
.reports {
.reason-label {
font-weight: bold;
}
.content {
padding-bottom: 20px;
}
.panel-body .btn-info {
margin-right: 5px;
}
}
// pod list
#pod-list {
.pod-title {
max-width: 200px;

View file

@ -32,3 +32,6 @@ $left-navbar-drawer-background: darken($white, 6%) !default;
$hovercard-background: $white !default;
$card-shadow: 0 1px 2px 0 rgba(0, 0, 0, .16), 0 2px 10px 0 rgba(0, 0, 0, .12) !default;
$increase: #008000;
$decrease: #fe0000;

View file

@ -5,6 +5,11 @@ html {
body { margin-bottom: 150px; }
.powered-by-diaspora a {
color: $link-grey;
font-weight: bold;
}
footer.footer {
background-color: $background-grey;
border-top: 1px solid $border-grey;
@ -15,11 +20,6 @@ footer.footer {
position: absolute;
width: 100%;
.powered-by-diaspora {
color: $link-grey;
font-weight: bold;
}
ul#footer_nav {
margin: 0;
padding: 0;

View file

@ -885,3 +885,9 @@ select#aspect_ids_ {
.form-control:active, .form-control:focus { border-color: #999999; }
.tag_following_action { margin: 5px 0 10px 0; }
// --- Admin pages ---
.pod-version {
// The fetching of the pod version is not done on mobile currently so we hide this alert.
display: none;
}

View file

@ -114,7 +114,8 @@
padding: 10px 20px 0;
.excellence-box,
.info-links {
.info-links,
.powered-box {
border-top: 1px solid $border-grey;
padding: 5px;
}
@ -175,7 +176,6 @@
ul {
list-style: none;
margin-bottom: 5px;
padding-left: 0;
}

View file

@ -1,12 +0,0 @@
#reports {
.reason-label {
font-weight: bold;
}
.content {
padding-bottom: 20px;
}
form input {
margin-right: 5px;
}
}

View file

@ -1,7 +1,7 @@
module Admin
class PodsController < AdminController
respond_to :html, :json
respond_to :html, :json, :mobile
def index
pods_json = PodPresenter.as_collection(Pod.all)
@ -15,6 +15,7 @@ module Admin
render "admins/pods"
end
format.mobile { render "admins/pods" }
format.json { render json: pods_json }
end
end

View file

@ -1,9 +1,5 @@
- content_for :head do
= stylesheet_link_tag :admin
%h2= t(".pages")
%ul#admin_nav.nav.nav-pills.nav-stacked
%ul.nav.nav-pills.nav-stacked#admin-nav
%li{role: "presentation", class: current_page?(admin_dashboard_path) && "active"}
= link_to t(".dashboard"), admin_dashboard_path
%li{role: "presentation", class: current_page?(user_search_path) && "active"}
@ -22,4 +18,3 @@
= link_to t(".pod_network"), admin_pods_path
%li{role: "presentation", class: current_page?(sidekiq_path) && "active"}
= link_to t(".sidekiq_monitor"), sidekiq_path

View file

@ -0,0 +1,11 @@
#pod-status
%h2
= t(".pod_status")
.alert.alert-info.pod-version{role: "alert"}
= t(".fetching_diaspora_version")
- if unreviewed_reports_count > 0
.alert.alert-warning.reports-warning{role: "alert"}
= t("report.unreviewed_reports", count: unreviewed_reports_count)
- else
%p
= t("report.unreviewed_reports", count: 0)

View file

@ -0,0 +1,52 @@
- content_for :head do
= stylesheet_link_tag :admin
.container-fluid
.row
.col-sm-9
%h1= t(".usage_statistic")
.col-sm-3
= form_tag("/admins/stats", method: "get", class: "row form-inline segment-selection") do
.col-sm-8
%select.form-control{name: "range"}
- %w(daily week 2weeks month).each do |range|
%option{value: range, selected: ("selected" if params[:range] == range)}
= t(".#{range}")
.col-sm-4
= submit_tag t(".go"), class: "btn btn-primary btn-block"
.row
.col-xs-12
%h4
!= t("admins.stats.display_results", segment: content_tag(:strong, segment))
.row
- %i(posts comments aspect_memberships users).each do |name|
:ruby
model = instance_variable_get("@#{name}")
count = model[:yesterday]
label_with_count = name == :aspect_memberships ? t(".shares", count: count) : t(".#{name}", count: count)
.col-md-3
%h2{style: "font-weight:bold;"}
= label_with_count
%h4
= model[:day_before]
%span.percent-change{class: (model[:change] > 0 ? "increase" : "decrease")}
= "(#{model[:change]}%)"
.row
%p.col-md-12.alert.alert-info.text-center{role: "alert"}
!= t("admins.stats.current_segment",
post_yest: content_tag(:strong, posts[:yesterday] / user_count),
post_day: content_tag(:strong, posts[:day_before] / user_count))
.row
.col-md-12
%h3= t(".50_most")
%ul
- @popular_tags.each do |name, count|
%li
!= t("admins.stats.tag_name",
name_tag: content_tag(:strong, name),
count_tag: content_tag(:strong, count))

View file

@ -1,70 +1,81 @@
%li.user.media
%div.pull-left
.media-left
- if user.person
%span.media-object
.media-object
= person_image_tag(user.person, size: :thumb_small)
%div.media-body.row
%div.pull-right
.media-body
.row
.col-sm-7
%h4.media-heading
= user.try(:person).try(:name)
.col-sm-5
.pull-right
%span.label.label-default
= t('.id')
= t(".id")
= user.id
%span.label.label-info
= t('.guid')
= user.person.guid if user.person
%h4.media-heading
= user.person.name if user.person
%div.pull-right
.unstyled.text-right.actions
= link_to t('admins.user_search.view_profile'), person_path(user.person), class: 'btn btn-default btn-block btn-xs'
= link_to t('admins.user_search.add_invites'), add_invites_path(user.invitation_code), class: 'btn btn-info btn-block btn-xs'
- unless user.person.closed_account
= link_to t('admins.user_search.close_account'), admin_close_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure') }, class: 'btn btn-danger btn-block btn-xs'
- unless user.closed_account?
- unless user.access_locked?
= link_to t('admins.user_search.lock_account'), admin_lock_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure_lock_account') }, class: 'btn btn-danger btn-block btn-xs'
- else
= link_to t('admins.user_search.unlock_account'), admin_unlock_account_path(user), method: :post, data: { confirm: t('admins.user_search.are_you_sure_unlock_account') }, class: 'btn btn-danger btn-block btn-xs'
%div.row
%div.col-md-5
= t(".guid")
= user.try(:person).try(:guid)
.row
.col-sm-8
%dl.dl-horizontal
%dt= t('username')
%dt= t("username")
%dd= user.username
%dt= t('.email')
%dt= t(".email")
%dd= user.email
%dt= t('.diaspora_handle')
%dt= t(".diaspora_handle")
%dd= user.person.diaspora_handle
%dt= t('.last_seen')
%dd= user.last_seen || t('.unknown')
-if user.invited_by.present?
%dt= t('.invite_token')
%dt= t(".last_seen")
%dd= user.last_seen || t(".unknown")
- if user.invited_by.present?
%dt= t(".invite_token")
%dd= invite_code_url(user.invited_by.invitation_code)
%dt= t('.account_closed')
%dt= t(".account_closed")
%dd
- if user.person.closed_account
%span.label.label-warning= t('.yes')
%span.label.label-warning= t(".yes")
- else
%span.label.label-success= t('.no')
%dt= t('.nsfw')
%span.label.label-success= t(".no")
%dt= t(".nsfw")
%dd
- if user.person.profile.nsfw
%span.label.label-warning= t('.yes')
%span.label.label-warning= t(".yes")
- else
%span.label.label-success= t('.no')
%span.label.label-success= t(".no")
%h4= t('layouts.header.profile')
%h4= t("layouts.header.profile")
%dl.dl-horizontal
%dt= t('people.profile_sidebar.born')
%dt= t("people.profile_sidebar.born")
%dd= user.person.profile.birthday
%dt= t('people.profile_sidebar.gender')
%dt= t("people.profile_sidebar.gender")
%dd= user.person.profile.gender
%dt= t('people.profile_sidebar.location')
%dt= t("people.profile_sidebar.location")
%dd= user.person.profile.location
%dt= t('people.profile_sidebar.bio')
%dt= t("people.profile_sidebar.bio")
%dd= user.person.profile.bio
.col-sm-4
= link_to t("admins.user_search.view_profile"),
person_path(user.person),
class: "btn btn-default btn-block"
= link_to t("admins.user_search.add_invites"),
add_invites_path(user.invitation_code),
class: "btn btn-info btn-block"
- unless user.person.closed_account
= link_to t("admins.user_search.close_account"),
admin_close_account_path(user),
method: :post, data: {confirm: t("admins.user_search.are_you_sure")},
class: "btn btn-danger btn-block"
- if user.access_locked?
= link_to t("admins.user_search.unlock_account"),
admin_unlock_account_path(user),
method: :post,
data: {confirm: t("admins.user_search.are_you_sure_unlock_account")},
class: "btn btn-danger btn-block"
- else
= link_to t("admins.user_search.lock_account"),
admin_lock_account_path(user),
method: :post,
data: {confirm: t("admins.user_search.are_you_sure_lock_account")},
class: "btn btn-danger btn-block"

View file

@ -0,0 +1,57 @@
- content_for :head do
= stylesheet_link_tag :admin
.row
.user_search.col-md-12
%h3= t("admins.admin_bar.user_search")
= form_for @search, url: {action: "user_search"}, html: {method: :get, class: "form-horizontal"} do |f|
.form-group
= f.label :username, t("username"), class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :username, class: "form-control"
.form-group
= f.label :email, t("email"), class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :email, class: "form-control"
.form-group
= f.label :guid, t("admins.user_entry.guid"), class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :guid, class: "form-control"
.form-group
.col-md-offset-2.col-md-8.col-sm-12
= f.label :under13 do
= f.check_box :under13
= t(".under_13")
.col-md-2.col-sm-12
= submit_tag t("admins.stats.go"), class: "btn btn-block btn-primary"
.row
.col-md-12
.alert.alert-info.text-center{role: "alert"}
= t(".users", count: nb_users)
.row
.users.col-md-12
%ul.media-list
- @users.each do |user|
= render partial: "user_entry", locals: {user: user}
.row
.more_invites.col-md-12
%h3= t("shared.invitations.invites")
.clearfix#add-invites-section
!= t(".you_currently", count: current_user.invitation_code.count,
link: link_to(t(".add_invites"), add_invites_path(current_user.invitation_code),
class: "btn btn-link pull-right block-admin"))
= form_tag "admin_inviter", method: :get, class: "form-horizontal" do
.form-group
%label.col-xs-12.col-md-2.control-label
= t(".email_to")
.col-xs-12.col-md-8
= text_field_tag "identifier", nil, class: "form-control invite-emails"
.col-xs-12.col-md-2
= submit_tag t(".invite"), class: "btn btn-block btn-primary"

View file

@ -0,0 +1,21 @@
- content_for :head do
= stylesheet_link_tag :admin
.row
.col-md-9.col-xs-12
%h2
= t(".current_server", date: Time.zone.now.to_date)
.col-md-3.col-xs-12
= form_tag("/admins/weekly_user_stats", method: "get", class: "form-inline week-selector row") do
.col-xs-9.center
= select_tag(:week,
options_for_select(created_users_by_week.keys.reverse, selected_week),
class: "form-control")
.col-xs-3.center
= submit_tag t("admins.stats.go"), class: "btn btn-primary"
= t(".amount_of", count: counter)
%br
- created_users_by_week[selected_week].each do |m|
= link_to m, "/u/#{m}"

View file

@ -3,11 +3,4 @@
.col-md-3
= render partial: "admins/admin_bar"
.col-md-9
#pod-status
%h2
= t(".pod_status")
.alert.alert-info.pod-version{role: "alert"}
= t(".fetching_diaspora_version")
- if unreviewed_reports_count > 0
.alert.alert-warning.reports-warning{role: "alert"}
= t("report.unreviewed_reports", count: unreviewed_reports_count)
= render partial: "admins/dashboard"

View file

@ -0,0 +1 @@
= render partial: "admins/dashboard"

View file

@ -1,3 +1,6 @@
- content_for :head do
= stylesheet_link_tag :admin
.container
.row
.col-md-3

View file

@ -0,0 +1,5 @@
%h2
= t(".pod_network")
.alert.alert-warning
!= t(".pod_desktop_view", desktop_link: link_to(t(".pod_desktop_link"), toggle_mobile_path))

View file

@ -3,58 +3,4 @@
.col-md-3
= render partial: "admins/admin_bar"
.col-md-9
%h1= t('.usage_statistic')
.pull-right
= form_tag('/admins/stats', :method => 'get', class: 'form-inline') do
%select.form-control{name: "range"}
%option{:value => 'daily', :selected => ('selected' if params[:range] == 'daily')}
= t('.daily')
%option{:value => 'week', :selected => ('selected' if params[:range] == 'week')}
= t('.week')
%option{:value => '2weeks', :selected => ('selected' if params[:range] == '2weeks')}
= t('.2weeks')
%option{:value => 'month', :selected => ('selected' if params[:range] == 'month')}
= t('.month')
= submit_tag t('.go'), class: 'btn btn-primary'
%h3
!= t("admins.stats.display_results", segment: content_tag(:strong, @segment))
.row
- [:posts, :comments, :aspect_memberships, :users].each do |name|
- model = eval("@#{name.to_s}")
- if name == :aspect_memberships
- name = t('.shares', :count => model[:yesterday])
- if name == :posts
- name = t('.posts', :count => model[:yesterday])
- if name == :comments
- name = t('.comments', :count => model[:yesterday])
- if name == :users
- name = t('.users', :count => model[:yesterday])
.col-md-3
%h2{:style => 'font-weight:bold;'}
= name.to_s
%h4
= model[:day_before]
%span.percent_change{:class => (model[:change] > 0 ? "green" : "red")}
= "(#{model[:change]}%)"
.row
.col-md-12
%p.alert.alert-info.text-center{role: "alert"}
!= t("admins.stats.current_segment",
post_yest: content_tag(:strong, @posts[:yesterday] / @user_count.to_f),
post_day: content_tag(:strong, @posts[:day_before] / @user_count.to_f))
.row
.col-md-12
%h3= t('.50_most')
%ul
- @popular_tags.each do |name,count|
%li
!= t("admins.stats.tag_name",
name_tag: content_tag(:strong, name),
count_tag: content_tag(:strong, count))
= render partial: "admins/stats", locals: {segment: @segment, posts: @posts, user_count: @user_count.to_f}

View file

@ -0,0 +1 @@
= render partial: "admins/stats", locals: {segment: @segment, posts: @posts, user_count: @user_count.to_f}

View file

@ -3,58 +3,4 @@
.col-md-3
= render partial: "admins/admin_bar"
.col-md-9
.row
.user_search.col-md-8
%h3= t('admins.admin_bar.user_search')
= form_for @search, url: {action: 'user_search'}, html: {method: :get, class: 'form-horizontal'} do |f|
.form-group
= f.label :username, t('username'), class: 'col-sm-2 control-label'
.col-sm-10
= f.text_field :username, class: "form-control"
.form-group
= f.label :email, t('email'), class: 'col-sm-2 control-label'
.col-sm-10
= f.text_field :email, class: "form-control"
.form-group
= f.label :guid, t('admins.user_entry.guid'), class: 'col-sm-2 control-label'
.col-sm-10
= f.text_field :guid, class: "form-control"
.form-group
.col-sm-offset-2.col-sm-10
= f.label :under13 do
= f.check_box :under13
= t(".under_13")
.form-group
.clearfix.col-sm-12
= submit_tag t("admins.stats.go"), class: "btn btn-primary pull-right"
.more_invites.col-md-4
%h3= t("shared.invitations.invites")
#add-invites-section.clearfix
!= t(".you_currently", count: current_user.invitation_code.count,
link: link_to(t(".add_invites"), add_invites_path(current_user.invitation_code),
class: "btn btn-link pull-right"))
= form_tag "admin_inviter", method: :get, class: "form-horizontal" do
.form-group
%label.col-sm-4.control-label
= t(".email_to")
.col-sm-8
= text_field_tag "identifier", nil, class: "form-control"
.form-group
.clearfix.col-md-12
= submit_tag t(".invite"), class: "btn btn-default pull-right"
.row
.col-md-12
.alert.alert-info.text-center{role: "alert"}
= t(".users", count: @users.count)
.row
.users.col-md-12
%ul.media-list
- @users.each do |user|
= render partial: 'user_entry', locals: { user: user }
= render partial: "admins/user_search", locals: {nb_users: @users.count}

View file

@ -0,0 +1,6 @@
- flash.each do |name, msg|
.expose#flash-container
.flash-message{class: "message alert alert-#{flash_class name}", role: "alert"}
= msg
= render partial: "admins/user_search", locals: {nb_users: @users.count}

View file

@ -3,16 +3,5 @@
.col-md-3
= render partial: "admins/admin_bar"
.col-md-9
%h2
= t('.current_server', date: Time.now.to_date)
.pull-right
= form_tag('/admins/weekly_user_stats', method: 'get', class: 'form-inline') do
= select_tag(:week, options_for_select(@created_users_by_week.keys.reverse, @selected_week), class: "form-control")
= submit_tag t('admins.stats.go'), class: 'btn btn-primary'
= t('.amount_of', count: @counter)
%br
- @created_users_by_week[@selected_week].each do |m|
= link_to m, "/u/#{m}"
%br
= render partial: "admins/weekly_user_stats",
locals: {created_users_by_week: @created_users_by_week, selected_week: @selected_week, counter: @counter}

View file

@ -0,0 +1,2 @@
= render partial: "admins/weekly_user_stats",
locals: {created_users_by_week: @created_users_by_week, selected_week: @selected_week, counter: @counter}

View file

@ -35,5 +35,22 @@
= person_image_tag(current_user, size: :thumb_small)
%li= link_to t("_contacts"), contacts_path
%li= link_to t("layouts.header.settings"), edit_user_path
- if current_user.admin?
%li#admin
= link_to t("streams.admin.title"), "#"
%li.no-border.hide
%ul
%li= link_to t("admins.admin_bar.dashboard"), admin_dashboard_path
%li= link_to t("admins.admin_bar.user_search"), user_search_path
%li= link_to t("admins.admin_bar.weekly_user_stats"), weekly_user_stats_path
%li= link_to t("admins.admin_bar.pod_stats"), pod_stats_path
%li
%a{href: report_index_path}
- if unreviewed_reports_count > 0
.pull-right.badge
= unreviewed_reports_count
= t("admins.admin_bar.report")
%li= link_to t("admins.admin_bar.pod_network"), admin_pods_path
%li= link_to t("admins.admin_bar.sidekiq_monitor"), sidekiq_path
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
%li= link_to t("layouts.header.logout"), destroy_user_session_path, method: :delete

View file

@ -1,7 +1,6 @@
%footer.footer
.container
.pull-left
.powered-by-diaspora
=t("layouts.application.powered_by")
.powered-by-diaspora.pull-left
= link_to t("layouts.application.powered_by"), "https://diasporafoundation.org"
%ul#footer_nav.pull-right
= render :partial =>'shared/links'
= render partial: "shared/links"

View file

@ -0,0 +1,44 @@
- content_for :head do
= stylesheet_link_tag :admin
.reports
%h1
= t("report.title")
- if @reports.empty?
%p
= t("report.unreviewed_reports", count: 0)
- @reports.each do |report|
- if report.item
.panel.panel-default
- username = report.user.username
.panel-heading
.reporter.pull-right
!= t("report.reported_label", person: link_to(username, user_profile_path(username)))
.reason
%span.reason-label
= t("report.reason_label")
%span
= report.text
.panel-body
.content
= report_content(report)
.segment-selection
= button_to t("report.reported_user_details"),
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}),
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :post
= button_to t("report.review_link"), report_path(report.id, type: report.item_type),
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :put
= button_to t("report.delete_link"), report_path(report.id, type: report.item_type),
data: {confirm: t("report.confirm_deletion")},
class: "btn pull-right btn-danger btn-small col-md-3 col-xs-12", method: :delete
- else
.panel.panel-default
- username = report.user.username
.panel-heading
.reporter.pull-right
!= t("report.reported_label", person: link_to(username, user_profile_path(username)))
.title
= report_content(report)
.panel-body
= button_to t("report.review_link"), report_path(report.id, type: report.item_type),
class: "btn pull-left btn-info btn-small", method: :put

View file

@ -1,47 +1,7 @@
- content_for :head do
= stylesheet_link_tag :admin
.container
.row
.col-md-3
- if current_user.admin?
= render partial: "admins/admin_bar"
.col-md-9
#reports
%h1
= t("report.title")
- @reports.each do |report|
- if report.item
.panel.panel-default
- username = report.user.username
.panel-heading
.reporter.pull-right
= raw t("report.reported_label", person: link_to(username, user_profile_path(username)))
.reason
%span.reason-label
= t("report.reason_label")
%span
= report.text
.panel-body
.content
= report_content(report)
= button_to t("report.reported_user_details"),
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}),
class: "btn pull-left btn-info btn-small", method: :post
= button_to t("report.review_link"), report_path(report.id, type: report.item_type),
class: "btn pull-left btn-info btn-small", method: :put
= button_to t("report.delete_link"), report_path(report.id, type: report.item_type),
data: {confirm: t("report.confirm_deletion")},
class: "btn pull-right btn-danger btn-small", method: :delete
- else
.panel.panel-default
- username = report.user.username
.panel-heading
.reporter.pull-right
= raw t("report.reported_label", person: link_to(username, user_profile_path(username)))
.title
= report_content(report)
.panel-body
= button_to t("report.review_link"), report_path(report.id, type: report.item_type),
class: "btn pull-left btn-info btn-small", method: :put
= render partial: "report/reports"

View file

@ -0,0 +1 @@
= render partial: "report/reports"

View file

@ -1,8 +1,9 @@
%li= link_to 'diasporafoundation.org', "https://diasporafoundation.org"
%li= link_to 'Wiki', "https://wiki.diasporafoundation.org"
%li= link_to t('layouts.application.whats_new'), changelog_url
%li= link_to t('layouts.header.code') + " " + pod_version, "#{source_url}", {:title => t('layouts.application.source_package')}
%li= link_to t("layouts.application.discourse"), "https://discourse.diasporafoundation.org"
%li= link_to t("layouts.application.whats_new"), changelog_url
%li= link_to t("layouts.header.code") + " " + pod_version,
source_url.to_s,
title: t("layouts.application.source_package")
%li= link_to t("layouts.application.statistics_link"), statistics_path
%li= link_to(t('layouts.application.toggle'), toggle_mobile_path)
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
- if AppConfig.settings.terms.enable?
%li= link_to(t('_terms'), terms_path)
%li= link_to t("_terms"), terms_path

View file

@ -91,8 +91,8 @@
"https://wiki.diasporafoundation.org/How_to_report_a_bug"))
%li
!= t("aspects.index.help.feature_suggestion",
link: link_to("#" + t("aspects.index.help.tag_feature"),
tag_path(name: t("aspects.index.help.tag_feature"))))
link: link_to(t("aspects.index.help.tag_feature"),
"https://discourse.diasporafoundation.org/c/features-and-ideas"))
%p
!= t("aspects.index.help.tutorials_and_wiki",
faq: link_to(t("_help"), help_path),
@ -102,6 +102,11 @@
target: "_blank"),
target: "_blank")
%p
!= t("aspects.index.help.support_forum",
support_forum: link_to(t("aspects.index.help.support_forum_link"),
"https://discourse.diasporafoundation.org/c/support", target: "_blank"))
- unless AppConfig.configured_services.blank? || all_services_connected?
.section.collapsed
.title
@ -165,6 +170,11 @@
%ul
= render "shared/links"
.powered-box
.content
.powered-by-diaspora.text-center
= link_to t("layouts.application.powered_by"), "https://diasporafoundation.org"
.col-md-9
.stream_container#aspect_stream_container
= render "aspects/aspect_stream", stream: @stream

View file

@ -55,10 +55,6 @@ en:
attributes:
person_id:
taken: "must be unique among this users contacts."
request:
attributes:
from_id:
taken: "is a duplicate of a pre-existing request."
reshare:
attributes:
root_guid:
@ -117,7 +113,7 @@ en:
id: "ID"
guid: "GUID"
email: "Email"
diaspora_handle: "diaspora* handle"
diaspora_handle: "diaspora* ID"
last_seen: "Last seen"
account_closed: "Account closed"
nsfw: "#nsfw"
@ -160,6 +156,8 @@ en:
tag_name: "Tag name: %{name_tag} Count: %{count_tag}"
pods:
pod_network: "Pod network"
pod_desktop_view: "This page is not available on mobile view, please switch to %{desktop_link}."
pod_desktop_link: "desktop view"
aspects:
edit:
confirm_remove_aspect: "Are you sure you want to delete this aspect?"
@ -215,6 +213,8 @@ en:
tag_feature: "feature"
tutorials_and_wiki: "%{faq}, %{tutorial} & %{wiki}: help for your first steps."
tutorial_link_text: "Tutorials"
support_forum: "You can also join the %{support_forum}."
support_forum_link: "support forum"
any_problem: "Got a problem?"
contact_podmin: "Contact the administrator of your pod!"
mail_podmin: "Podmin email"
@ -258,7 +258,6 @@ en:
contacts:
index:
start_a_conversation: "Start a conversation"
add_a_new_aspect: "Add a new aspect"
title: "Contacts"
no_contacts: "Looks like you need to add some contacts!"
no_contacts_message: "Check out %{community_spotlight}"
@ -591,6 +590,7 @@ en:
powered_by: "Powered by diaspora*"
whats_new: "Whats new?"
statistics_link: "Pod statistics"
discourse: "Project discussions and support"
toggle: "Toggle mobile"
public_feed: "Public diaspora* feed for %{name}"
back_to_top: "Back to top"
@ -634,7 +634,6 @@ en:
zero: "%{actors} have reshared your post %{post_link}."
one: "%{actors} has reshared your post %{post_link}."
other: "%{actors} have reshared your post %{post_link}."
post: "post"
also_commented_deleted:
zero: "%{actors} commented on a deleted post."
one: "%{actors} commented on a deleted post."
@ -1148,6 +1147,9 @@ en:
follow: "Follow"
all: "All tags"
admin:
title: "Admin"
tags:
title: "Posts tagged: %{tags}"

View file

@ -135,8 +135,6 @@ en:
my_aspects: "My aspects"
publisher:
limited: "Limited: your post will only be seen by people you are sharing with"
public: "Public: your post will be visible to everyone and found by search engines"
near_from: "Posted from: <%= location %>"
option: "Answer"
add_option: "Add an answer"

View file

@ -4,12 +4,7 @@ Feature: Navigate between pages using the header menu and the drawer
I want to be able navigate between the pages of the mobile version
Background:
Given following users exist:
| username | email |
| Bob Jones | bob@bob.bob |
| Alice Smith | alice@alice.alice |
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
Given a user with email "alice@alice.alice"
And I sign in as "alice@alice.alice" on the mobile website
Scenario: navigate to the stream page
@ -57,9 +52,9 @@ Feature: Navigate between pages using the header menu and the drawer
Then I should be on the mentioned stream page
Scenario: navigate to aspects pages
Given "bob@bob.bob" has a public post with text "bob's text"
Given I have a limited post with text "Hi you!" in the aspect "Besties"
When I open the drawer
Then I should not see "All aspects" within "#drawer"
And I click on "My aspects" in the drawer
And I click on "All aspects" in the drawer
Then I should be on the aspects page
@ -73,6 +68,7 @@ Feature: Navigate between pages using the header menu and the drawer
When I follow the "boss" tag
And I go to the stream page
And I open the drawer
Then I should not see "All tags" within "#drawer"
And I click on "#Followed tags" in the drawer
And I click on "All tags" in the drawer
Then I should be on the followed tags stream page
@ -109,3 +105,29 @@ Feature: Navigate between pages using the header menu and the drawer
When I open the drawer
And I click on "Settings" in the drawer
Then I should be on my account settings page
Scenario: navigate to the admin pages
Given an admin with email "bob@bob.bob"
And I sign in as "bob@bob.bob" on the mobile website
When I open the drawer
Then I should not see "Dashboard" within "#drawer"
When I click on "Admin" in the drawer
And I click on "Dashboard" in the drawer
Then I should see "Pod status" within "#main h2"
When I click on "Admin" in the drawer
And I click on "User search" in the drawer
Then I should see "User search" within "#main h3"
When I click on "Admin" in the drawer
And I click on "Weekly user stats" in the drawer
Then I should see "Current server date is " within "#main h2"
When I click on "Admin" in the drawer
And I click on "Pod stats" in the drawer
Then I should see "Usage statistics" within "#main h1"
When I click on "Admin" in the drawer
And I click on "Reports" in the drawer
Then I should see "Reports overview" within "#main h1"
When I click on "Admin" in the drawer
And I click on "Pod network" in the drawer
Then I should see "Pod network " within "#main h2"
When I click on "Admin" in the drawer
Then I should see "Sidekiq monitor" within "#drawer"

View file

@ -25,6 +25,10 @@ Given /^a nsfw user with email "([^\"]*)"$/ do |email|
user.profile.update_attributes(:nsfw => true)
end
Given /^an admin with email "([^\"]*)"$/ do |email|
user = create_user(email: email)
Role.add_admin(user)
end
Given /^(?:|[tT]hat )?following user[s]?(?: exist[s]?)?:$/ do |table|
table.hashes.each do |hash|
@ -38,7 +42,6 @@ Given /^(?:|[tT]hat )?following user[s]?(?: exist[s]?)?:$/ do |table|
end
end
Given /^I have been invited by an admin$/ do
admin = FactoryGirl.create(:user)
admin.invitation_code