Commit Graph

1480 Commits

Author SHA1 Message Date
Nicholas Staples
33cc90488c Fix template delete links.
Fix bug with 'current_service' not available for non service urls.

Code review adjustment.

Static code check.
2016-04-13 16:57:16 +01:00
Chris Hill-Scott
f76375875a Merge pull request #438 from alphagov/activity-page-refinements
Allow filtering of notifications by type, status or both
2016-04-13 16:24:56 +01:00
Chris Hill-Scott
a25bbaea06 Move download CSV link to top
You might miss it at the bottom if you’ve got lots of rows.
Better to have it in a consistent place.
2016-04-13 16:17:09 +01:00
Chris Hill-Scott
e282ca2109 Allow filter links to be used in combination
Means you can see, for example emails that have failed.

Means adding:
- logic to generate links which can have a type parameter, a status
  parameter, or both
- a ‘pill’ UI component for seeing which filters you currently have
  applied
- some logic to change the page title based on which filters you have
  applied
2016-04-13 16:17:09 +01:00
Chris Hill-Scott
4da92f170a Properly parse comma-separated query string params 2016-04-13 16:17:09 +01:00
Chris Hill-Scott
1a6bb37171 Tidy up the ‘Activity’ table
This table had a lot of columns, which meant that some of them became
very narrow, wrapping the text awkwardly.

This commit groups some of the data into a chunk, which occupies the
first column.
2016-04-13 16:17:09 +01:00
Chris Hill-Scott
906a22a67b Merge pull request #436 from alphagov/only-collapse-long-emails
Only collapse email templates if they’re long
2016-04-13 16:16:56 +01:00
Chris Hill-Scott
2a03cd3952 Merge pull request #431 from alphagov/sort-template-stats
Sort template stats by usage
2016-04-13 16:15:33 +01:00
Chris Hill-Scott
6e83bec7b0 Merge pull request #439 from alphagov/wrap-long-words-in-emails
Wrap long words in email template previews
2016-04-13 16:13:54 +01:00
Chris Hill-Scott
0a31949c73 Merge pull request #437 from alphagov/tidy-scss
Don’t lint SCSS files that have come from outside
2016-04-13 16:13:33 +01:00
Chris Hill-Scott
1beca5e84b Merge pull request #434 from alphagov/single-template-view
Add view for a single template
2016-04-13 16:07:24 +01:00
Chris Hill-Scott
6909146fee Wrap long words in email template previews
If you put, for example, a URL in an email template it can be very long.
This can cause it to overflow its container. This commit forces it to
wrap instead.
2016-04-13 14:59:19 +01:00
Chris Hill-Scott
b549b98108 Don’t lint SCSS files that have come from outside
We should (and do) keep exact copies of SCSS files that have come from
elsewhere so that we can easily upgrade them. But sometimes they don’t
always pass our linting rules, or throw a lot of warnings, which is
noisy.

This commit:
- moves such files into their own subdirectory
- tells SCSS Lint to ignore files in this directory
2016-04-13 14:30:49 +01:00
Chris Hill-Scott
c81b8c39f6 Add view for a single template
> At the moment, we have an all email templates page, and an edit an
> individual page.
>
> This gets messy when we refer to templates like the dashboard and the
> activity views. We solve this currently by using anchor links to the
> list page, but this is clunky.
>
> So lets add it, then update the links on the dash and activity to the
> new view page.
>
> Should be a link from the view a single template page, to the template
> hub page.

https://www.pivotaltracker.com/story/show/117349227
2016-04-13 13:41:53 +01:00
Rebecca Law
9acd344475 Merge pull request #427 from alphagov/update_for_db_rebase
Update for db rebase
2016-04-13 12:05:11 +01:00
catherineheywood
0d569d7ba5 typo correction 2016-04-13 10:12:50 +01:00
catherineheywood
3a85907c93 adjust JWT tokens title 2016-04-13 10:00:41 +01:00
Chris Hill-Scott
bdf746131f Only collapse email templates if they’re long
It’s a bit silly to have email templates expandable if you’re only going
to reveal a couple more lines.

This commit adds a data attribute which specifies how high (in pixels)
the email template can be before it gets truncated. It then changes the
script to only truncate emails which are naturally taller than this
height.

Currently the cut off is at 200px, which is approximately 8 lines of
text: `200px / (font-size: 19px * line-height: 1.31) = 8.03`
2016-04-13 09:50:18 +01:00
catherineheywood
51680358a2 Remove question 2016-04-12 16:42:01 +01:00
catherineheywood
f34a81c983 Move link to authentication.py file 2016-04-12 16:37:10 +01:00
catherineheywood
727cb49f23 Doc tweaks 2016-04-12 16:35:10 +01:00
catherineheywood
8e98f3cf43 Information about JWT tokens 2016-04-12 16:29:05 +01:00
Chris Hill-Scott
3fd75de0e1 Merge pull request #435 from alphagov/fix-email-toggle
Fix email expand/collapse not working
2016-04-12 16:28:15 +01:00
Chris Hill-Scott
cffd941742 Fix email expand/collapse not working
The click event was scoped to the wrong element.
2016-04-12 16:21:41 +01:00
Nicholas Staples
a6d1c5b693 Download CSV option now available.
App is updated to use the rebased db.
2016-04-12 15:38:02 +01:00
NIcholas Staples
30e9b76c6d Merge pull request #433 from alphagov/notifications_download_csv
Added download csv option for the notifications page. All tests passing.
2016-04-12 14:37:49 +01:00
Nicholas Staples
6ea72182d2 Download CSV option now available. 2016-04-12 14:19:51 +01:00
Rebecca Law
bcdde451af Merge pull request #425 from alphagov/remove-unused-items
Removed unused files and directory.
2016-04-12 13:39:21 +01:00
catherineheywood
f56ac2b63e Doc tweaks 2016-04-12 13:31:56 +01:00
catherineheywood
0f9174f06e testing links 2016-04-12 13:26:47 +01:00
catherineheywood
fd8f166a18 Doc tweaks 2016-04-12 13:21:14 +01:00
catherineheywood
b2e7a1db05 Doc tweaks 2016-04-12 13:12:30 +01:00
catherineheywood
d11af32f63 Correct alignment in list 2016-04-12 13:09:18 +01:00
Rebecca Law
02687710ae Remove commented code 2016-04-12 12:23:01 +01:00
Chris Hill-Scott
4568c0e5ab Sort template stats by usage
Template stats should show the most-used template first.

This commit:
- re-writes the `aggregate_usage` function to use `itertools.groupby`,
  which can do aggregation, and can return data in a structure that’s
  easy to sort on
- uses generators so that we’re not keeping lots of rows of template
  stats in memory

https://www.pivotaltracker.com/story/show/117348893
2016-04-12 12:03:52 +01:00
catherineheywood
85c996d09a Edit text in image 2016-04-12 10:20:47 +01:00
catherineheywood
a7186b43db Doc tweaks 2016-04-12 10:19:25 +01:00
Chris Hill-Scott
975041cbed Merge pull request #428 from alphagov/better-choose-template
Make choose template page clearer
2016-04-12 10:06:40 +01:00
Chris Hill-Scott
42a6e801e4 Merge pull request #426 from alphagov/reword-recent-templates
Reword ‘recent templates’ section of dashboard
2016-04-12 10:06:27 +01:00
Chris Hill-Scott
34f57c1908 Merge pull request #421 from alphagov/banners-no-permissions
Change banners on home page if no permissions
2016-04-12 10:06:20 +01:00
Chris Hill-Scott
a2263f959e Merge pull request #422 from alphagov/commas-in-placeholders
Don’t allow commas in placeholders
2016-04-12 10:06:08 +01:00
Chris Hill-Scott
7388214118 Merge pull request #424 from alphagov/cancel-button
Add cancel button to file upload pattern
2016-04-12 10:05:52 +01:00
catherineheywood
faedb3d7be Bring sections over from existing doc, to rework 2016-04-12 09:58:09 +01:00
catherineheywood
eb2ea7ce92 Add link in doc 2016-04-12 09:21:34 +01:00
catherineheywood
42d83ec36f increase text size in image 2016-04-12 09:09:06 +01:00
Chris Hill-Scott
3a5b76ce2a Truncate previews of email messages to ~3 lines
Emails can get very long.

When you’re trying to do other things on the page this results in a lot
of scrolling.

This commit truncates email messages to about 3 lines, and adds a JS
toggle which reveal the full contents of the email.
2016-04-11 17:24:22 +01:00
Chris Hill-Scott
33e1b2679f Move ‘edit template’ to its own link
It’s probably clearer to have it labelled explicitly, rather than have
people infer that they should click the title of a template to edit it.
2016-04-11 17:20:25 +01:00
Chris Hill-Scott
6bfb7914e2 Respect linebreaks in templates
If a user puts a linebreak in an SMS template then the recipient will
see these linebreaks on their phone. So when we show a preview of an SMS
template, it should have linebreaks in it.
2016-04-11 17:20:25 +01:00
Chris Hill-Scott
30e1e67c17 Make heading sizes more consistent
On:
- the API keys page
- the ‘send’ page

There are some inconsistently small heading sizes. This commit makes them
consistent with the heading sizes on other pages.
2016-04-11 17:20:24 +01:00
Chris Hill-Scott
e526852f53 Remove keylines from nav
We have lots of keylines in our pages, eg tables, email message previews

This makes the pages look quite cluttered, especially because the
keylines don’t always align.

I think it looks much cleaner without the keylines in the nav, and we
have few enough nav items that we don’t need to chunk them up.
2016-04-11 17:20:24 +01:00