Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conference partners #4251

Merged
merged 16 commits into from Oct 17, 2018
Merged

Add conference partners #4251

merged 16 commits into from Oct 17, 2018

Conversation

isaacmg410
Copy link
Contributor

@isaacmg410 isaacmg410 commented Oct 8, 2018

馃帺 What? Why?

This PR adds the new functionality of Conference Partners. Is part of the #3709

馃搶 Related Issues

馃搵 Subtasks

  • Add CHANGELOG entry
  • Add partners CRUD
  • Apply partners design
  • Add documentation regarding the feature
  • Add/modify seeds
  • Add tests

馃摲 Screenshots (optional)

screenshot-localhost-3000-2018 10 17-09-35-32

Description

@ghost ghost assigned isaacmg410 Oct 8, 2018
@ghost ghost added the status: WIP label Oct 8, 2018
@isaacmg410 isaacmg410 changed the title [WIP] Add conference partners Add conference partners Oct 11, 2018
@isaacmg410
Copy link
Contributor Author

@decidim/lot-core this PR is ready to review 馃槃

@oriolgual
Copy link
Contributor

@rbngzlv could you add some screenshots too?

@isaacmg410
Copy link
Contributor Author

isaacmg410 commented Oct 17, 2018

@oriolgual I'will added
screenshot-localhost-3000-2018 10 17-09-35-32

Copy link
Contributor

@oriolgual oriolgual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add system specs for the admin

private

def partner
return block unless model.link.presence
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe some of this view logic should go to the template, not inside the cell? It feels weird to me having all the markup here instead of the template.

def initialize(form, current_user, conference)
@form = form
@current_user = current_user
@conference = conference
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the conference be part of the form too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? We are doing the same with speakers, conference admins, assembly admins, assembly members...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's cleaner (you don't have to merge attributes from the form) but maybe I didn't review it correctly in other PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think that it is better to continue with the same system, for the whole decidim. Not in different ways according to the command...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree to what @isaacmg410 says! 馃槃

# conference_partner - The ConferencePartner to update
def initialize(form, conference_partner)
@form = form
@conference_partner = conference_partner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the creation form, if I'd move this inside the form so the command doesn't need to check anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, is conference_partner, not conference.


def edit
@partner = collection.find(params[:id])
enforce_permission_to :update, :partner, speaker: @partner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be partner instead of speaker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right


def update
@partner = collection.find(params[:id])
enforce_permission_to :update, :partner, speaker: @partner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be partner instead of speaker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right


def destroy
@partner = collection.find(params[:id])
enforce_permission_to :destroy, :partner, speaker: @partner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be partner instead of speaker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right

def index
enforce_permission_to :index, :partner

@query = params[:q]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nowhere, deleted!

@ghost ghost added the status: WIP label Oct 17, 2018
@isaacmg410
Copy link
Contributor Author

@oriolgual requested changes applied!

@mrcasals
Copy link
Contributor

Merging! Tests look like they are not passing, but they really passed:

https://circleci.com/workflow-run/a6af249c-e498-48fd-b200-077d298d00e4

@mrcasals mrcasals merged commit bb641ad into master Oct 17, 2018
@mrcasals mrcasals deleted the feature/conference_partners branch October 17, 2018 09:49
@ghost ghost removed the status: WIP label Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants