This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v0.36: Relative contributions and contribution replies **Features:** - Changes suggested in contributions are now relative to point in time when the contribution was created. In addition, only files with suggested changes will be overwritten in the project. Any other files in the project, whether changed or not, will remain untouched when accepting the contribution. ([#325](https://github.com/OpenlyOne/openly/issues/325)) - Contributions now have a discussion tab where users can create replies to the contribution and discuss it. When a reply is created, it notifies the project team, contribution creator, and other discussion participants. ([#280](https://github.com/OpenlyOne/openly/issues/280)) **Enhancements:** - The contributions feature is now enabled for all projects. The feature toggle has been removed. - Creating and accepting a contribution now triggers notifications to the project team, contribution creator, and contribution discussion participants ([#285](https://github.com/OpenlyOne/openly/issues/285)) - Add a link to the contribution navigation to allow users to open the contribution's root folder in Google Drive ([#273](https://github.com/OpenlyOne/openly/issues/273)) - Display an accurate list of changes in the contribution review tab after the contribution has been accepted by tracking the accepted revision ([#284](https://github.com/OpenlyOne/openly/issues/284)) - Admins can edit email addresses of accounts via the admin panel. Users continue to be prevented from editing their own email addresses. ([#266](https://github.com/OpenlyOne/openly/issues/266))
- Loading branch information
Showing
122 changed files
with
5,587 additions
and
1,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// CSS styles meant to apply to specific controllers | ||
|
||
@import 'errors'; | ||
@import 'contributions'; | ||
@import 'file_changes'; | ||
@import 'folders'; | ||
@import 'notifications'; | ||
@import 'profiles'; | ||
@import 'project_setups'; | ||
@import 'replies'; | ||
@import 'revisions'; | ||
@import 'static'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Styling for RepliesController | ||
|
||
.c-replies { | ||
|
||
// Reduce margin top on first paragraph | ||
.description { | ||
p:first-of-type { | ||
margin-top: 0; | ||
} | ||
} | ||
|
||
.with-triangle { | ||
position: relative; | ||
|
||
|
||
// need z-index, so that triangle shadow is below element and | ||
> * { | ||
position: relative; | ||
z-index: 10; | ||
} | ||
|
||
// styling for the triangle | ||
&::before, | ||
&::after { | ||
color: color('shades', 'white'); | ||
content: '◀'; | ||
margin-top: 10px; | ||
position: absolute; | ||
right: calc(100% - 1px); | ||
top: 0; | ||
} | ||
|
||
// shadow is below element | ||
&::before { | ||
@extend %text-z-depth-1; | ||
z-index: 5; | ||
} | ||
|
||
&::after { | ||
z-index: 15; | ||
} | ||
} | ||
|
||
.reply { | ||
padding: 20px; | ||
|
||
p:first-of-type { | ||
margin-top: 0; | ||
} | ||
|
||
p:last-of-type { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// scss-lint:disable ColorVariable | ||
|
||
%text-z-depth-1 { | ||
// uses the same values as .z-depth-1 | ||
text-shadow: 0 2px 2px rgba(0, 0, 0, .14), | ||
0 3px 1px rgba(0, 0, 0, .12), | ||
0 1px 5px rgba(0, 0, 0, .2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
# Devise-overwrite for editing, updating, and deleting accounts | ||
class AccountsController < Devise::RegistrationsController | ||
protected | ||
|
||
# If you have extra params to permit, append them to the sanitizer. | ||
def account_update_params | ||
params.require(:account) | ||
.permit(:current_password, :password, :password_confirmation) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# frozen_string_literal: true | ||
|
||
module Contributions | ||
# Controller for replies to contributions | ||
class RepliesController < ApplicationController | ||
include CanSetProjectContext | ||
|
||
before_action :authenticate_account!, except: :index | ||
before_action :set_project_where_setup_is_complete | ||
before_action :authorize_project_access | ||
before_action :find_contribution | ||
before_action :authorize_action, except: :index | ||
before_action :set_replies, only: :index | ||
before_action :build_reply | ||
before_action :set_user_can_reply_to_contribution, only: :index | ||
|
||
def index; end | ||
|
||
def create | ||
if @reply.update(reply_params) | ||
redirect_with_success_to(contribution_replies_path) | ||
else | ||
set_replies | ||
set_user_can_reply_to_contribution | ||
render 'index' | ||
end | ||
end | ||
|
||
private | ||
|
||
rescue_from CanCan::AccessDenied do |exception| | ||
can_can_access_denied(exception) | ||
end | ||
|
||
def authorize_action | ||
authorize! :reply, @contribution | ||
end | ||
|
||
def can_can_access_denied(exception) | ||
super || redirect_to(contribution_replies_path, alert: exception.message) | ||
end | ||
|
||
def build_reply | ||
@reply = @contribution.replies.build(author: current_user) | ||
end | ||
|
||
def contribution_replies_path | ||
profile_project_contribution_replies_path( | ||
@project.owner, @project, @contribution | ||
) | ||
end | ||
|
||
def find_contribution | ||
@contribution = @project.contributions.find(params[:contribution_id]) | ||
end | ||
|
||
def set_replies | ||
@replies = @contribution.replies.includes(:author) | ||
end | ||
|
||
def set_user_can_reply_to_contribution | ||
@user_can_reply_to_contribution = can?(:reply, @contribution) | ||
end | ||
|
||
def reply_params | ||
params.require(:reply).permit(:content) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.