-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
feat: Able to view the list of users associated with an Organization #8511
Changes from 11 commits
d37f3b9
ce67c27
c79f8ab
f38f44a
c7f8112
b6d01a6
449130c
81f4afc
c615682
992c89d
b7d0f55
b6ecf8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5039,6 +5039,22 @@ msgctxt "official_site" | |
msgid "Official site" | ||
msgstr "Official site" | ||
|
||
msgctxt "organization_members" | ||
msgid "Organization Members" | ||
msgstr "Organization Members" | ||
|
||
msgctxt "number_of_members" | ||
msgid "Number of Members" | ||
msgstr "Number of Members" | ||
|
||
msgctxt "serial_no" | ||
msgid "S.No" | ||
msgstr "S.No" | ||
|
||
msgctxt "member_userid" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have strings for "Name", "Email", "Country", "Language" etc. in the .po file, so we can reuse them without adding new translation strings. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okayy..will make the changes👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of "member_userid" can you use the existing "username" string? |
||
msgid "UserId" | ||
msgstr "UserId" | ||
|
||
msgctxt "contact_form" | ||
msgid "Contact form" | ||
msgstr "Contact form" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1451,3 +1451,50 @@ a.panel_title { | |
background-color: scale-color($button-bg-color, $lightness: -$button-function-factor / 2); | ||
color: #fff; | ||
} | ||
// organization members table in producers platform | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can do it in a separate PR, but it would be a good thing to see if we can make the CSS code that we have for packagings generic, so that it can be applied to any table, instead of having similar separate CSS code for each table. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes..It would be good to make the CSS generic for these tables👍...would open a separate PR for CSS things..will do it asap! |
||
$breakpoint-tablet: 636px; | ||
|
||
#org_main_table { | ||
box-shadow: 0 0 5px rgba(0,0,0,.25); | ||
vertical-align: middle; | ||
} | ||
|
||
#org_table_header { | ||
background-color:$macchiato; | ||
@media (max-width: $breakpoint-tablet){ | ||
tr{ | ||
display:none; | ||
} | ||
} | ||
th { | ||
color:white; | ||
font-weight: 600; | ||
padding:.5rem; | ||
text-align: center; | ||
} | ||
} | ||
|
||
#org_table_body { | ||
td{ | ||
padding:.5rem; | ||
} | ||
@media (max-width: $breakpoint-tablet) { | ||
tr { | ||
display:block; | ||
} | ||
td{ | ||
text-align: right; | ||
display:block; | ||
padding: .5rem; | ||
} | ||
td::before { | ||
content:attr(data-cell) ": "; | ||
float:left; | ||
text-transform: capitalize; | ||
font-weight: 600; | ||
} | ||
} | ||
} | ||
#org_table_body tr:nth-child(even){ | ||
background-color:$latte; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,41 @@ | |
<p>→ <a href="[% link %]">[% lang("official_site") %]</a></p> | ||
[% END %] | ||
|
||
[% IF org_members.size %] | ||
<h2>[% lang("organization_members") %]</h2> | ||
<p>[% lang("number_of_members") %][% sep %]: [% org_members.size %]</p> | ||
<div style="position:relative"> | ||
<table id="org_main_table"> | ||
<thead id="org_table_header"> | ||
<tr> | ||
<th>[% lang("serial_no") %]</th> | ||
<th>[% lang("member_userid") %]</th> | ||
<th>[% lang("name") %]</th> | ||
<th>[% lang("email") %]</th> | ||
<th>[% lang("select_lang") %]</th> | ||
<th>[% lang("select_country") %]</th> | ||
|
||
</tr> | ||
</thead> | ||
[% SET count = 1 %] | ||
[% FOREACH users IN org_members %] | ||
<tbody id="org_table_body"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the tbody element should be outside the FOREACH loop, otherwise you will have a table with more than 1 tbody. |
||
<tr> | ||
<td data-cell =[% lang("serial_no") %]>[% count %].</td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is "data-cell =[% lang("serial_no") %]" for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The data-cell is a custom attribute used to store additional data or metadata related to the HTML element. This attribute is being used by CSS to manipulate the element for smaller screens--
It would add : after the data cell value i.e serial no in this case when the screen width is small There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand, thanks for the explanation. |
||
<td data-cell =[% lang("member_userid") %]>[% users.userid %]</td> | ||
<td data-cell =[% lang("name") %]>[% users.name %]</td> | ||
<td data-cell =[% lang("email") %]>[% users.email %]</td> | ||
<td data-cell =[% lang("select_lang") %]>[% users.initial_lc %]</td> | ||
<td data-cell =[% lang("select_country") %]>[% users.initial_cc %]</td> | ||
</tr> | ||
</tbody> | ||
[% SET count = count + 1 %] | ||
[% END %] | ||
</table> | ||
</div> | ||
[% END %] | ||
|
||
|
||
<div class="row"> | ||
|
||
[% FOREACH contact IN ['customer_service', 'commercial_service'] %] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a convention, when a variable is an object reference, we suffix it with _ref. Coul you rename $member_details to $member_user_ref or similar?