Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
44130a6
Collapse color
theskumar May 19, 2025
75b4c7a
Update fieldset
theskumar May 19, 2025
04dea91
Update field set
theskumar May 19, 2025
24bb008
Update tinymce and choices
theskumar May 19, 2025
a59e34e
Update skeleton color
theskumar May 20, 2025
2760f71
Update export button
theskumar May 20, 2025
5ca825a
Update detail page, filter label, text-base-content/80
theskumar May 20, 2025
dd040eb
Checkbox django-table
theskumar May 20, 2025
a4db5a6
Fix button--remove
theskumar May 20, 2025
2e0494c
formatting
theskumar May 21, 2025
51eafc8
Revisions
theskumar May 21, 2025
411bfd2
batch action, action-bar, invoices table
theskumar May 21, 2025
fdc3a82
update
theskumar May 21, 2025
dcf526f
paf status sidebar
theskumar May 21, 2025
e29d49b
Added relative timezones to invoice statuses & timezone info to stamp…
wes-otf May 23, 2025
36a8595
cleanup list-reveal, modal and invoice-block
theskumar May 25, 2025
7ad94e4
Improve co-applicant
theskumar May 25, 2025
80ee29c
More buttons
theskumar May 25, 2025
b7c4194
Fix for tinymce word count
theskumar May 25, 2025
2cf8706
Alternate implementation of max-length warning
theskumar May 25, 2025
c0d2be5
co-applicant & text-gray-500
theskumar May 25, 2025
ccb657c
Review button
theskumar May 25, 2025
6771808
update input to include "time" & "url" type
theskumar May 27, 2025
bedfb16
Update hypha-grid--two
theskumar May 27, 2025
bc6a3eb
Account page
theskumar May 27, 2025
ffd6131
admin bar and tags section
theskumar May 27, 2025
9a2385d
update field css and upload button
theskumar May 28, 2025
3baf050
Fix fields esp filefield
theskumar May 28, 2025
4152333
todo draft badge
theskumar May 28, 2025
34aa09f
More badges
theskumar May 28, 2025
cd07049
border
theskumar May 29, 2025
41bcd40
fields, errors and cleanup
theskumar May 29, 2025
a55d37c
Fix tab text color
theskumar May 29, 2025
389c149
sealed submission detail
theskumar May 29, 2025
34c2dc1
fix
theskumar May 29, 2025
30fa942
Adjustments
theskumar May 29, 2025
d3d59f3
X - action-bar scss
theskumar May 29, 2025
fb55b5d
kill status-bar scss
theskumar May 29, 2025
c2efc70
Screening buttons
theskumar May 29, 2025
423b7f6
error display on requested amount input
theskumar May 29, 2025
3063989
Upgrade multi-input-field to use alpinejs
theskumar May 29, 2025
0310439
Update splitdatetime widget
theskumar May 29, 2025
f1fbb12
textarea validator
theskumar May 29, 2025
1d1a173
Update layout and copy - coapplicant accept
theskumar May 29, 2025
2f3c6f0
comment section
theskumar May 29, 2025
bf9768f
Report frequecy info
theskumar May 29, 2025
10b3e70
determination detail
theskumar May 29, 2025
ff977b2
Show fund description on the form
theskumar May 29, 2025
0957c09
Use theme provided primary color
theskumar May 30, 2025
8ac7dc6
applicant dashboard should use admin-bar component
theskumar May 30, 2025
2e9e92b
New theme for admin bar
theskumar May 30, 2025
5cb0fd8
New theme for footer
theskumar May 30, 2025
63dfc17
Updates to co-applicant edit form
theskumar May 30, 2025
e2ad051
Adjustment to form
theskumar May 30, 2025
caed376
Admin bar + container-constrained
theskumar May 31, 2025
8b6f051
update
theskumar May 31, 2025
a4c2de0
Fix address field js
theskumar May 31, 2025
76996b6
updates
theskumar May 31, 2025
20860dd
btn-disabled
theskumar Jun 1, 2025
acf9acc
update
theskumar Jun 1, 2025
d5b7850
Update dashboard round and labs section
theskumar Jun 1, 2025
c6f1beb
?? extra markup in table.html
theskumar Jun 1, 2025
b8cd6f7
dashbord paf for review
theskumar Jun 1, 2025
ce29f0b
Update show application on review and determination
theskumar Jun 1, 2025
15db688
button--link
theskumar Jun 2, 2025
4b013e6
more card-title
theskumar Jun 2, 2025
c88a331
project-form page
theskumar Jun 2, 2025
d7e54ed
error pages
theskumar Jun 2, 2025
dea930a
--span-two
theskumar Jun 2, 2025
2c99b62
hijack-bar
theskumar Jun 2, 2025
c6227c2
wrapper--cta-box
theskumar Jun 2, 2025
2b302b6
More wrappers
theskumar Jun 2, 2025
33b848c
Review sidebar updates
theskumar Jun 2, 2025
a3d494b
translate
theskumar Jun 2, 2025
10dc1ae
cleanup buttons
theskumar Jun 2, 2025
9c85a70
submissions
theskumar Jun 2, 2025
902b5ae
Nav colors
theskumar Jun 2, 2025
8ffe578
cleanup wrapper and grid
theskumar Jun 2, 2025
f9f98aa
submission sealed hero
theskumar Jun 2, 2025
40d83e8
Remove heading--no-margin
theskumar Jun 2, 2025
defa6e4
header.scss
theskumar Jun 2, 2025
9f9e195
cleanup
theskumar Jun 2, 2025
fed039e
Test passes now
theskumar Jun 3, 2025
47d4328
Remove status-block.scss
theskumar Jun 3, 2025
84f9bd8
cleanup form--error-inline
theskumar Jun 3, 2025
95a3a53
cleanup defailt h6
theskumar Jun 3, 2025
ed28a88
Remove _table.scss
theskumar Jun 3, 2025
ae89ead
Review List Page update
theskumar Jun 3, 2025
daba37d
partner dashboard
theskumar Jun 3, 2025
2fc69f9
Account and 2FA setup page
theskumar Jun 3, 2025
df39616
Updates to reporting-frequency
theskumar Jun 4, 2025
0ea4d25
Revert choices.js
theskumar Jun 4, 2025
6399da2
Feedback1: update lang switcher
theskumar Jun 4, 2025
fdff17c
2/ update "Coversation" tab to "Comments"
theskumar Jun 4, 2025
01fbdc7
14/ Fix the color success displayed on the checkbox and radio
theskumar Jun 4, 2025
da3e87f
8/ bigger search input on project and other tables with search
theskumar Jun 4, 2025
4ec7333
15 / deemphasis primary action card
theskumar Jun 4, 2025
6afa698
11 / rendered answer highlights
theskumar Jun 4, 2025
3654d84
6 / delete button treatment
theskumar Jun 4, 2025
3d9c237
submission more actions icons
theskumar Jun 4, 2025
1714263
6 / clear filter btn update
theskumar Jun 4, 2025
803b8c6
4 / rounded submission tables
theskumar Jun 5, 2025
9847d02
update the pagination button style
theskumar Jun 5, 2025
ae977ee
Remove _nav.scss, update is_active logic
theskumar Jun 7, 2025
06273ec
Delete button--secondary, button--white
theskumar Jun 7, 2025
5131faa
Remove button--filters
theskumar Jun 7, 2025
96a281b
Reimplement cookie consent using alpine and localstorage
theskumar Jun 7, 2025
15d02d7
Minor update
theskumar Jun 8, 2025
c02f2fd
Merge remote-tracking branch 'origin/main' into themes
theskumar Jun 8, 2025
d307621
update requirements
theskumar Jun 8, 2025
56b72c7
Tweaks to co-applicants/project permissions UI
theskumar Jun 8, 2025
f026f59
Update table pagination
theskumar Jun 8, 2025
bbba637
cleanup
theskumar Jun 8, 2025
7be5fec
Remove _heading.scss
theskumar Jun 8, 2025
ade0e73
Remove _button.scss
theskumar Jun 8, 2025
06486a2
table-checkbox mixin
theskumar Jun 8, 2025
ea78649
new adminbar using django-cotton
theskumar Jun 9, 2025
34f4765
Revert makefile change
theskumar Jun 9, 2025
4fd54b7
update separator-dot
theskumar Jun 9, 2025
f50b4c6
adminbar update existing stuff
theskumar Jun 9, 2025
5599b5f
Use @media for js detection
theskumar Jun 9, 2025
7999c66
Fix alpine stuff
theskumar Jun 9, 2025
8c2ad33
cleanup
theskumar Jun 9, 2025
d9cd6ed
Adjust hero header
theskumar Jun 9, 2025
878ca57
update, better link, fixes
theskumar Jun 10, 2025
97a3896
Merge branch 'main' into themes
theskumar Jun 11, 2025
e015c78
typography
theskumar Jun 11, 2025
886e303
cleanup base.scss
theskumar Jun 11, 2025
b580fd7
Typography round 2
theskumar Jun 11, 2025
7140868
update invalid link page
theskumar Jun 12, 2025
8235d7c
Remove wrapper--small and also update the two-factor pages
theskumar Jun 12, 2025
ac4c6ba
Merge branch 'main' into themes
theskumar Jun 12, 2025
5402ce1
Remove review-sidebar__split
theskumar Jun 12, 2025
b529e81
clean up submission table child row feature
theskumar Jun 14, 2025
b0cdce6
misc updates
theskumar Jun 14, 2025
a941a29
.section-header and rounded tables
theskumar Jun 15, 2025
22829eb
Fixup contracting dashboard
theskumar Jun 15, 2025
a1bf397
fix filter-bar overflow
theskumar Jun 16, 2025
1dc5bd5
table link formatting
theskumar Jun 16, 2025
0e87d1b
updates
theskumar Jun 16, 2025
f061fa9
Footer with theme selector
theskumar Jun 16, 2025
8898e14
Relative time for subitted in tables
theskumar Jun 16, 2025
7e2e9fb
cleanup scss
theskumar Jun 17, 2025
ee50c6d
cleanup unused status block views, wrapper--bottom and update open/cl…
theskumar Jun 17, 2025
57c0e0e
staff dashboard table border
theskumar Jun 17, 2025
88b8fe6
doc-block, contract and project detail sections
theskumar Jun 17, 2025
601a02a
Merge remote-tracking branch 'origin/main' into themes
theskumar Jun 20, 2025
2c8c4ab
Icon enhancements
theskumar Jun 20, 2025
1e71b16
More updates to project detail page
theskumar Jun 20, 2025
d9de175
more scss variable cleanup
theskumar Jun 20, 2025
e3706da
show/hide password feature
theskumar Jun 21, 2025
be95d4c
cleanup
theskumar Jun 21, 2025
d4892e5
password field - title and translations
theskumar Jun 21, 2025
029f665
Merge remote-tracking branch 'origin/main' into themes
theskumar Jun 21, 2025
5e8f91c
fix comment timeline
theskumar Jun 22, 2025
6775f9c
Remove wrapper__medium
theskumar Jun 22, 2025
b7b9db6
Reminder and reminder delete page updates
theskumar Jun 22, 2025
ed7463c
Update report form
theskumar Jun 22, 2025
a5047b5
Update review sidebar styling
theskumar Jun 22, 2025
554add3
Remove wrapper--outer-space-medium
theskumar Jun 22, 2025
f97b31c
update to application detail page
theskumar Jun 22, 2025
11e0429
no-print and manage cookies in footer
theskumar Jun 23, 2025
a7c0a18
Fix password show/hide
theskumar Jun 23, 2025
7a5639b
Better handling for users entering long names (#4590)
wes-otf Jun 23, 2025
16354b4
Add Author to report
sandeepsajan0 Jun 17, 2025
ca972cf
Show report author and date similar to submissions
sandeepsajan0 Jun 22, 2025
5c056ab
Fix updated language
sandeepsajan0 Jun 22, 2025
9dbf63b
Minor adjustments to report template.
frjo Jun 24, 2025
ee4627d
Merge branch 'feature/gh-4565-report-author' into themes
frjo Jun 24, 2025
6fd9d13
Update SSO login button alignment
theskumar Jun 24, 2025
52b9878
submission all list and table view switcher
theskumar Jun 24, 2025
2a85bea
update container-constrained behaviour
theskumar Jun 24, 2025
d091328
Fixes - home deadline, btn-lg and updated at
theskumar Jun 24, 2025
773f236
update typography on the forms
theskumar Jun 25, 2025
1549390
Update to cookiebanner
theskumar Jun 25, 2025
640b715
Update application detail - line-clamp
theskumar Jun 25, 2025
80a2fd6
Update submission-text-cleanup
theskumar Jun 25, 2025
61c0b18
Move more things to tinymce.css
theskumar Jun 25, 2025
d3f3c02
Update determination details
theskumar Jun 25, 2025
bf9465f
More update detail and submission answer preview
theskumar Jun 25, 2025
9cd50eb
update review detail and list page
theskumar Jun 25, 2025
63d0c56
More relative datetime in tables, using RelativeTimeColumn
theskumar Jun 25, 2025
f4733e3
Move prose-cleanup.js up in header
theskumar Jun 25, 2025
1fec1cb
fix application edit typography
theskumar Jun 25, 2025
c3b1999
refactor markdown editor css
theskumar Jun 25, 2025
5ee5146
fix dark mode on field field rendering
theskumar Jun 25, 2025
ff75689
Remove more .wrapper
theskumar Jun 25, 2025
76c3757
Fix compare view
theskumar Jun 28, 2025
86e8488
Remove rich-text--answers
theskumar Jun 28, 2025
99c5a4a
update user-menu colors
theskumar Jun 30, 2025
b539d40
fix container-constrained
theskumar Jun 30, 2025
ec50469
new layout.css component
theskumar Jun 30, 2025
0d2fe85
Invoice delete confirmation modal
theskumar Jun 30, 2025
ed4c419
New submission revision list view
theskumar Jun 30, 2025
b5018f6
Merge remote-tracking branch 'origin/main' into themes
theskumar Jun 30, 2025
f84e7b9
tweaks to revision detail view
theskumar Jun 30, 2025
ef93dbf
Restrict permission to invite and update co-applicant in archived sub…
sandeepsajan0 Jun 30, 2025
2b236d8
update invoice-form page
theskumar Jun 30, 2025
1cd57ba
update review detail
theskumar Jun 30, 2025
22e7e54
fix for update reviewer modal form
theskumar Jun 30, 2025
b3503b9
update html-diff.css
theskumar Jun 30, 2025
127c08e
update modal title to use cotton
theskumar Jun 30, 2025
9262aa1
update review opinion delete confirm to dialog
theskumar Jul 1, 2025
a139f96
Add steps-sm and apply to status bars
theskumar Jul 1, 2025
1fe4a38
Update daisyui version
theskumar Jul 1, 2025
41daba6
tweak html-diff
theskumar Jul 1, 2025
5962505
fixup
theskumar Jul 1, 2025
346e9bd
fix approval_form_exists
theskumar Jul 2, 2025
5b8ef1b
Fix contracting document row
theskumar Jul 2, 2025
5d60c6d
w-4 h-4 -> size-4
theskumar Jul 3, 2025
78dd501
update project form and it's details
theskumar Jul 3, 2025
324f44a
Hypha theme colours (#4595)
frjo Jul 3, 2025
4546a00
Fix test for active invoices and minot lint fix.
frjo Jul 3, 2025
182ef71
Fix test for dashboard.
frjo Jul 3, 2025
de2729b
tweaks to project detail page
theskumar Jul 3, 2025
2b5f019
Base hyphatheme light on corporate.
frjo Jul 3, 2025
3be56e9
Remove transition from detail summary
theskumar Jul 3, 2025
7cafd11
Fix more tests.
frjo Jul 3, 2025
9fa736f
Fix more tests, part 2.
frjo Jul 3, 2025
dfb3af0
Fix more tests, part 3.
frjo Jul 3, 2025
bc373d4
Adjust theme colours.
frjo Jul 3, 2025
a479340
Merge branch 'enhancement/aco-applicant-complete-project' into themes
sandeepsajan0 Jul 3, 2025
df0cbc0
Merge remote-tracking branch 'origin/main' into themes
sandeepsajan0 Jul 3, 2025
99f0c1e
use alert component for toast
theskumar Jul 5, 2025
9c9d5a5
tweak theme and status bar
theskumar Jul 5, 2025
2ba6ca7
Update the translation cli and fix loader
theskumar Jul 5, 2025
de10a48
Update invoice detail + fix activity list attribute error
theskumar Jul 5, 2025
96febbb
invoices -> show rejected
theskumar Jul 5, 2025
5c3cad3
Update hero back links
theskumar Jul 6, 2025
8091241
theme switcher
theskumar Jul 6, 2025
fd1395c
port over wmd classes
theskumar Jul 6, 2025
5235155
convert print.scss to print.css
theskumar Jul 6, 2025
4e1813a
Remove rich-text.css
theskumar Jul 6, 2025
7d9814e
update SOW form page
theskumar Jul 6, 2025
350b10f
fix SOW detail
theskumar Jul 6, 2025
7b6d925
Merge remote-tracking branch 'origin/main' into themes
theskumar Jul 8, 2025
2ad64cb
tweak theme and remove more hard-coded colors
theskumar Jul 8, 2025
9cf4b79
reorder theme, fix for theme-switcher
theskumar Jul 8, 2025
2849473
Fix screen decision buttons
theskumar Jul 8, 2025
034b15e
fix broken help-text
theskumar Jul 8, 2025
ea8bfc9
remove duplicate variables
theskumar Jul 8, 2025
790f81d
Remove more custom variables
theskumar Jul 8, 2025
2cec1a1
refactor flash-item -> animate-flash
theskumar Jul 8, 2025
d2507f7
Fix typography on application submission landing
theskumar Jul 8, 2025
a73f0f2
applicant submission delete button
theskumar Jul 9, 2025
0821495
Fix continue editing button
theskumar Jul 9, 2025
8e52a3c
Update display of draft application for applicant
theskumar Jul 9, 2025
cb4d30a
update how status is displayed in old table view
theskumar Jul 9, 2025
8c498b0
tweak icon size in alert
theskumar Jul 9, 2025
6c29fca
Implement updated print styles.
frjo Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
__pycache__
db.sqlite3
media/
static/
tmp/
/static/

# Node
node_modules/
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"svgwrite",
"WAGTAILADMIN",
"wagtailcore"
]
],
"html.format.templating": true,
"files.associations": {
"*.html": "django-html"
}
}
32 changes: 30 additions & 2 deletions docs/setup/administrators/machine-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,42 @@ This requirements file will specifically attempt to install the CPU version of [

## Installing languages

Argostranslate handles translations via it's own packages - ie. Arabic -> English translation would be one package, while English -> Arabic would be another.
Argostranslate handles translations via its own packages—e.g., Arabic English translation is one package, while English Arabic is another.

Installing/uninstalling these packages can be done with the management commands `install_languages`/`uninstall_languages` respectively, utilizing the format of <from language code>_<to language code>. For example, installing the Arabic -> English & French -> English packages would look like:
You can install/uninstall these packages using the management commands `install_languages` and `uninstall_languages`, respectively. The format for specifying a package is `<from language code>_<to language code>`. For example, to install the Arabic English and French English packages:

```bash
python3 manage.py install_languages ar_en fr_en
```

### Additional options

The `install_languages` command supports several options for flexibility:

- **Install all available packages:**
```bash
python3 manage.py install_languages --all
```
> ⚠️ This may install many packages and consume significant disk space.

- **Interactively select packages:**
```bash
python3 manage.py install_languages --select
```
This will present a numbered list of available language packages for you to choose from.

- **Skip confirmation prompts:**
```bash
python3 manage.py install_languages ar_en --noinput
```
This will install the specified packages without asking for confirmation.

You can combine these options as needed. For example, to interactively select packages and skip confirmation:

```bash
python3 manage.py install_languages --select --noinput
```

## Enabling on the system

To enable machine translations on an instance, the proper configuration variables need to be set. These can be found in the [configuration options](configuration.md#hypha-custom-settings)
30 changes: 16 additions & 14 deletions hypha/addressfield/static/address_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
};

function labelFor(field) {
return $('label[for="' + $(field).attr("id") + '"]');
var fieldId = $(field).attr("id");
var label = $('label[for="' + fieldId + '"]');
return label;
}

function makeFieldNotRequired(field) {
Expand Down Expand Up @@ -54,13 +56,11 @@
oldValidate.call(this, field, config);
};

var selectWrap = '<div class="form__select"></div>';

// Hook into the select builder to update the display
var oldConvertToSelect = $.fn.addressfield.convertToSelect;
$.fn.addressfield.convertToSelect = function () {
var $select = oldConvertToSelect.call(this);
$select.wrap(selectWrap);
$select.wrap('<div class="form__select"></div>');
return $select;
};

Expand All @@ -73,19 +73,21 @@
};

$(document).ready(function formReady() {
$(".form div.address").each(function () {
$(".form div#" + this.id).addressfield({
$(".form .address").each(function () {
var config = {
json: "/static/addressfield.min.json",
fields: {
country: ".country",
thoroughfare: ".thoroughfare",
premise: ".premise",
locality: ".locality",
localityname: ".localityname",
administrativearea: ".administrativearea",
postalcode: ".postalcode",
country: "[data-js-addressfield-name='country']",
thoroughfare: "[data-js-addressfield-name='thoroughfare']",
premise: "[data-js-addressfield-name='premise']",
locality: "[data-js-addressfield-name='locality']",
localityname: "[data-js-addressfield-name='localityname']",
administrativearea:
"[data-js-addressfield-name='administrativearea']",
postalcode: "[data-js-addressfield-name='postalcode'] ",
},
});
};
$(".form div#" + this.id).addressfield(config);
});
});
})(jQuery);
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div {% include "django/forms/widgets/attrs.html" %}>{% spaceless %}
<div {% include "django/forms/widgets/attrs.html" %}>
{% for widget in widget.subwidgets %}
{% if not widget.subwidgets %}
<div class="form__group">
<label class="form__question" for="{{ widget.attrs.id }}">{{ widget.attrs.display }}</label>
<div class="fieldset">
<label class="label" for="{{ widget.attrs.id }}">{{ widget.attrs.display }}</label>
{% endif %}

{% include widget.template_name %}
Expand All @@ -11,4 +11,4 @@
</div>
{% endif %}
{% endfor %}
{% endspaceless %}</div>
</div>
7 changes: 4 additions & 3 deletions hypha/addressfield/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class KeepAttrsTextInput(KeepOwnAttrsWidget, forms.TextInput):
pass


def classify(field):
def classify(field: str) -> str:
return field.replace("_", "")


def display(field):
def display(field: str) -> str:
return field.replace("_", " ").title()


Expand All @@ -36,6 +36,7 @@ def __init__(self, *args, **kwargs):
widget(
attrs={
"class": classify(field),
"data-js-addressfield-name": classify(field),
"required": False,
"display": display(field),
}
Expand Down Expand Up @@ -95,6 +96,6 @@ class Media:

def __init__(self, *args, **kwargs):
attrs = kwargs.get("attrs", {})
attrs["class"] = "address"
attrs["class"] = "address -mt-2"
kwargs["attrs"] = attrs
super().__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% load i18n %}

<div class="border-b-2 border-b-slate-300">
<section class="ml-4 max-w-3xl md:ml-20">
<div class="border-b-2 border-b-base-300">
<section class="max-w-3xl ms-4 md:ms-20">

<div class="timeline">
<div class="h-timeline">
{% for activity in activities %}
{% if activity.type == "comment" %}
{% include "activity/ui/activity-comment-item.html" with activity=activity %}
Expand All @@ -15,12 +15,12 @@
{% if page.has_next %}
<a
href="{{ request.path }}?page={{ page.next_page_number }}"
class="block py-2 text-sm text-slate-500 hover:text-slate-700"
class="btn btn-sm"
hx-get="{{ request.path }}?page={{ page.next_page_number }}"
hx-trigger="intersect"
hx-target="this"
hx-swap="outerHTML transition:true"
hx-select=".timeline"
hx-select=".h-timeline"
>Show more...</a>
{% endif %}
</div>
Expand Down
49 changes: 23 additions & 26 deletions hypha/apply/activity/templates/activity/notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,36 @@
{% load i18n activity_tags heroicons %}
{% block title %}{% trans "Notifications" %}{% endblock %}

{% block content %}

{% adminbar %}
{% slot header %}{% trans "Notifications" %}{% endslot %}
{% slot sub_heading %}
{% if PROJECTS_ENABLED %}
{% trans "Activity feed across all applications and projects" %}
{% else %}
{% trans "Activity feed across all the applications" %}
{% endif %}
{% endslot %}

<form
class="[&>label]:sr-only text-black flex items-center justify-between gap-2"
method="get"
{% block hero %}
<c-hero>
<c-hero.header
title="{% trans 'Notifications' %}"
subtitle="{% if PROJECTS_ENABLED %}{% trans 'Activity feed across all applications and projects' %}{% else %}{% trans 'Activity feed across all the applications' %}{% endif %}"
>
{{ filter.form }}
<button class="button button--primary" type="submit" value="Filter">
{% trans "Filter" %}
</button>
</form>
{% endadminbar %}
<form
class="[&>label]:sr-only text-base-content flex items-center justify-between gap-2"
method="get"
>
{{ filter.form }}
<button class="btn btn-primary" type="submit" value="Filter">
{% trans "Filter" %}
</button>
</form>
</c-hero.header>
</c-hero>
{% endblock %}

<div class="wrapper wrapper--large wrapper--outer-space-medium">
<div class="border-b-2 border-b-slate-300">
{% block content %}
<div class="my-4">
<div class="border-b-2 border-b-base-300">
<section class="ml-4 max-w-3xl md:ml-20">

<div class="timeline">
<div class="h-timeline">
{% for activity in object_list %}
{% with activity|display_for:request.user as activity_text %}
<div class="relative timeline-item" id="communications#{{ activity.id }}">
<div class="relative h-timeline-item" id="communications#{{ activity.id }}">
{% ifchanged activity.source.id %}
<div class="py-0.5 mt-4 bg-gray-100 ps-5 pe-2 border-s-2 border-slate-300">
<div class="py-0.5 mt-4 bg-base-200 ps-5 pe-2 border-s-2 border-slate-300">
<span class="text-sm font-semibold text-fg-muted">{{ activity.source_content_type.name|source_type }}</span> <a href="{{ activity.source.get_absolute_url }}">{{ activity.source.fund_name }} #{{ activity.source.application_id }}: {{ activity.source.title|capfirst|truncatechars:50 }}</a>
</div>
{% endifchanged %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@
{% if attachments %}
<div class="flex flex-wrap gap-2 pb-2 mt-4 max-w-xl min-w-40">
{% for attachment in attachments %}
<a href="{{attachment.get_absolute_url }}"
class="inline-flex items-center py-2 px-3 font-medium rounded-sm border transition-colors bg-slate-50 hover:bg-slate-200"
target="_blank"
rel="noopener noreferrer"
title="{{ attachment.filename }}"
>
<span class="text-sm truncate">
{% heroicon_mini "paper-clip" class="inline align-text-bottom" aria_hidden=true %}
{{ attachment.filename|truncatechars_middle:45 }}
</span>
</a>
<c-card-attachment
:href="attachment.get_absolute_url"
:title="attachment.filename"
:filename="attachment.filename"
/>
{% endfor %}
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% load i18n activity_tags heroicons %}

{% with activity|display_for:request.user as activity_text %}
<div class="relative timeline-item" id="communications#{{ activity.id }}">
<div class="relative h-timeline-item" id="communications#{{ activity.id }}">
<div
class="flex items-center py-2 -ml-3 before:block before:-z-10 before:absolute before:top-0 before:bottom-0 before:left-0 before:w-0.5 before:bg-slate-300"
class="flex items-center py-2 -ml-3 before:block before:absolute before:top-0 before:bottom-0 before:left-0 before:w-(--border) before:bg-base-300"
>
<div class="inline-flex relative justify-center items-start me-2">
<div class="relative rounded-full inline-flex items-center justify-center border-white border-2 -ms-0.5 {% if activity.user.is_staff %}bg-slate-200 {% else %}bg-gray-200{% endif %}">
<div class="inline-flex relative justify-center items-start me-2 z-1">
<div class="inline-flex relative justify-center items-center rounded-full bg-base-100">
<div class="inline-flex justify-center items-center w-6 h-6 text-fg-muted">
{% if 'edit' in activity_text.lower %}
{% heroicon_micro "pencil-square" class="inline" aria_hidden=true size=14 %}
Expand Down Expand Up @@ -40,7 +40,7 @@
{% if not submission_title and activity|user_can_see_related:request.user %}
{% with url=activity.related_object.get_absolute_url %}
{% if url %}
<a href="{{ url }}" class="font-semibold transition-opacity hover:opacity-70 ms-2">
<a href="{{ url }}" class="link">
{% trans "View" %}
</a>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{% load i18n activity_tags nh3_tags markdown_tags submission_tags apply_tags heroicons users_tags %}

<article class="relative timeline-item">
<article class="relative h-timeline-item">
<div
class="flex py-3 -ms-8 before:block before:-z-10 before:absolute before:top-0 before:bottom-0 before:left-0 before:w-0.5 before:bg-slate-300 md:-ms-20"
class="flex py-3 -ms-8 before:block before:absolute before:top-0 before:bottom-0 before:left-0 before:w-0.5 before:bg-base-300 md:-ms-20"
>
{% with activity|display_activity_author:request.user as author_name %}
<div class="inline-flex relative justify-center items-start me-4">
<div class="relative rounded-full inline-flex items-center justify-center border-white border-2 -ms-0.5 {% if activity.user.is_staff %}bg-slate-200 {% else %}bg-gray-100{% endif %}">
<div class="inline-flex relative z-0 justify-center items-start me-4">
<div class="relative rounded-full inline-flex items-center justify-center border-white border-2 -ms-0.5 {% if activity.user.is_staff %}bg-slate-200 {% else %}bg-base-200{% endif %}">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

border-white looks like an obsolete color-named class. Is bg-slate-200 also (is "slate" a color)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe both are tailwind-isms: border-white and slate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My assumption is this. In order for themes to fully take effect via a few CSS rules, no colors should be present in any class names. Technically, I guess a theme could set .border-white { border-color: blue } 😱.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch. I will be updating to more semantic versions. This is reminiscent of old implementation that happens to work ok-ish in the new version.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. Setting border-white to blue is possible, technically, and much easier done by setting theme variable "--color-white: blue".

Instead of doing this, semantic color names should work better for our use case.

<div class="hidden p-2 md:block">
{% user_image author_name size=25 %}
</div>
</div>
</div>

<div class="{% if activity.user == request.user %}border-cyan-300{% else %}border-gray-300{% endif %} flex-1 pb-2 bg-white border rounded-sm target:ring-2 target:ring-cyan-500 scroll-m-2"
<div class="{% if activity.user == request.user %}border-info/30{% else %}border-base-300{% endif %} flex-1 pb-2 bg-base-100 border rounded-box target:ring-2 target:ring-info scroll-m-2 z-1"
id="communications--{{ activity.id }}">
<header class="{% if activity.user == request.user %}bg-fuchsia-100{% else %}bg-slate-100{% endif %} flex flex-wrap items-center justify-between gap-2 px-3 py-2 rounded-t">
<header class="{% if activity.user == request.user %}bg-info/20{% else %}bg-base-200{% endif %} flex flex-wrap items-center justify-between gap-2 px-3 py-2 rounded-t-box">
<div>
<span>
<strong class="font-semibold">{{ author_name }}</strong>
Expand All @@ -41,12 +41,10 @@
>{{ activity.timestamp|date:"SHORT_DATETIME_FORMAT" }}</relative-time>
</a>
</span>


</div>

<div class="flex gap-1 items-center">
{% if not request.user.is_applicant %}

{% if request.user.is_apply_staff and activity.assigned_to %}

<span class="flex gap-1 items-center py-0.5 px-1.5 text-xs rounded-xl border border-gray-300 text-fg-muted">
Expand Down Expand Up @@ -74,9 +72,9 @@
hx-get="{% url 'activity:edit-comment' activity.id %}"
hx-target="#text-comment-{{activity.id}}"
title="Edit Comment"
class="inline-flex items-center p-0.5 rounded-md opacity-80 transition-all hover:bg-fuchsia-200 hover:opacity-100"
class="btn btn-sm btn-square btn-ghost"
>
{% heroicon_micro "pencil-square" size=18 class="inline" aria_hidden=true %}
{% heroicon_micro "pencil-square" aria_hidden=true %}
<span class="sr-only">{% trans "Edit" %}</span>
</a>
{% endif %}
Expand All @@ -93,15 +91,16 @@
</div>

{% if not submission_title and activity|user_can_see_related:request.user %}
<div class="px-3">
{% with url=activity.related_object.get_absolute_url %}
{% if url %}
<a href="{{ url }}" class="font-semibold uppercase">
{% trans "View " %}{{ activity.related_object|model_verbose_name }} {% heroicon_outline "arrow-right" aria_hidden="true" stroke_width=2 class="inline w-4 h-4 align-baseline ms-1" %}
{% with url=activity.related_object.get_absolute_url %}
{% if url %}
<div class="px-3">
<a href="{{ url }}" class="mt-2 font-semibold uppercase btn btn-sm btn-info btn-soft">
{% trans "View " %}{{ activity.related_object|model_verbose_name }}
{% heroicon_mini "arrow-right" aria_hidden="true" class="opacity-80 size-4" %}
</a>
{% endif %}
{% endwith %}
</div>
</div>
{% endif %}
{% endwith %}
{% endif %}
</div>
</div>
Expand Down
Loading
Loading