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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide tab #83

Merged
merged 10 commits into from Jul 21, 2020
Merged

Hide tab #83

merged 10 commits into from Jul 21, 2020

Conversation

Ahmedgagan
Copy link
Contributor

Hiding assignments-tab and assignment count to Everyone added in this PR

@@ -3,6 +3,11 @@ export default Ember.Component.extend({

init() {
this._super(...arguments);
this.set("canAssign", this.currentUser && this.currentUser.can_assign);
this.set(
"canAssign",
Copy link
Member

Choose a reason for hiding this comment

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

We should rename this to "displayAssignTab" or something. Because it doesn't mean 'canAssign' any more

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, ill rename this

@@ -1,8 +1,8 @@
{{#if canAssign}}
<ul class ='nav-pills'>
<li>
{{#link-to 'group.assignments' group}}
{{d-icon "user-plus" class="glyph"}}{{i18n 'discourse_assign.group_assignments'}}{{concat ' (' group.assignment_count concat ')'}}
{{#link-to "group.assignments" group.assignment_count}}
Copy link
Member

Choose a reason for hiding this comment

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

That seems a bit weird. Did you mean to change this? I don't see why we would want to pass the count into the link-to component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yaa this was supposed to remove😅, i just added it to test something😅

@davidtaylorhq davidtaylorhq merged commit cd3e576 into discourse:master Jul 21, 2020
@Ahmedgagan Ahmedgagan deleted the hide-tab branch July 21, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants