Commit Graph

19 Commits

Author SHA1 Message Date
decabeza
16dc5821d1 Add margin to all h3 admin headers 2021-02-18 15:46:16 +01:00
taitus
dfec661a52 Use human_attribute_name
We use this method whenever possible
2020-12-16 13:16:48 +01:00
Javi Martín
8c1140a1bf Use semantic HTML classes in table actions
Note the CSS could probably be improved to avoid duplication with other
button style definitions. However, that's fine because we're going to
change the style of the links soon.

For the same reason, I haven't bothered to style every single link the
way it was until now.
2020-11-03 14:58:02 +01:00
Javi Martín
08c2bfc255 Extract component to add/remove admin/mod/manager
We remove some duplication by doing so.
2020-10-21 13:19:52 +02:00
Javi Martín
64b0cc741b Improve table actions layout
In the past we were using some <div> tags surrounding table action
links in order to guarantee these links wouldn't be wider that their
cell's space and wouldn't expand over two lines.

However, while these links didn't expand over two lines, at certain
resolutions the width of their text exceeded the width of the links,
causing part of the text to be outside their borders.

This behavior was also inconsistent: some tables had these <div> tags,
and some tables didn't.

Since we've now introduced the table actions component, the code is more
consistent and we're getting rid of these <div> tags. So now we're again
facing the issue where links could expand over two lines.

Using a flex layout solves this issue and considerably improves the
layout at lower resolutions.
2020-10-21 13:19:52 +02:00
Javi Martín
10c095d821 Move table actions partial to a component
This partial was going to get too complex since in some places we've got
different texts, different URLs or different confirmation messages.
While we should probably try to be more consistent and that would make
the partial work in most cases, there'll always be some exceptions, and
using a partial (with, perhaps, some helper methods) will become messy
really quickly.
2020-10-19 18:56:02 +02:00
Javi Martín
4e60424678 Extract partial for edit and destroy links 2020-10-19 18:48:01 +02:00
Javi Martín
99256adf13 Simplify manager/moderator/admin/official tables
Originally, the code was shared between the index action and the search
action, but since commit fb6dbdf2 that's no longer the case. So in the
index action we don't need to check whether a user is a
moderator/manager/admin/official or not; they all are.
2020-06-16 19:26:05 +02:00
Javi Martín
5d10afdf26 Fix deleting searched managers/moderators/admins
We were deleting managers, moderators and administrators based on their
user ID, instead of their manager/moderator/administrator ID.
2020-06-16 19:09:27 +02:00
Javi Martín
c62da726b8 Apply SpaceAroundErbTag ERB Lint rule 2019-09-10 20:02:15 +02:00
lalo
d0e1eff532 Add description field to administrator users like evaluators description 2019-06-05 16:18:12 +02:00
Julian Herrero
0bb2633c7a Use double quotes in app/views/admin 2019-03-19 12:16:50 +01:00
decabeza
6d7c5f1b78 Refactors admin administrators spec
This refactoring avoids "Use let instead of an instance variable" rubocop warning
2018-11-22 11:41:59 +01:00
decabeza
ae3a2ed3f3 Adds administrator id on admin administrators index page 2018-11-22 11:41:54 +01:00
decabeza
1e49265288 improves admin administrators views 2017-10-25 18:40:17 +02:00
decabeza
9ba96becd2 Merge branch 'master' into admin-profiles 2017-10-25 18:29:01 +02:00
Angel Perez
8ef4afb07d Enable search by name/email for Administrators 2017-10-25 10:16:21 -04:00
decabeza
ae206648a6 improves styles for admin administrators views 2017-10-19 16:37:44 +02:00
Bertocq
312e229569 Add Administrator management views and en/es translations 2017-05-23 22:50:17 +02:00