Skip to content

Commit

Permalink
Merge pull request #781 from YishaiGlasner/imgs-src
Browse files Browse the repository at this point in the history
manuscrips sources to view only domain
  • Loading branch information
nsantacruz authored Mar 16, 2022
2 parents 9d7963a + 4a3f3df commit 6ec5e2c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions sefaria/model/manuscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Manuscript(AbstractMongoRecord):
'description',
'he_description'
]
optional_attrs = ['license']

def normalize_slug_field(self, slug_field: str) -> str:
"""
Expand Down
15 changes: 14 additions & 1 deletion static/js/ConnectionsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1821,8 +1821,21 @@ function ManuscriptImage(props) {
</span>
: ''
}
{
manuscript.manuscript['license']
? <div className="manuscriptLicense">
<InterfaceText>License</InterfaceText>
<InterfaceText>:</InterfaceText>
<a className="manuscriptLicenseLink" href={Sefaria.getLicenseMap()[manuscript.manuscript['license']]} target="_blank">
{Sefaria._(manuscript.manuscript['license'])}
</a>
</div>
: ''
}
<InterfaceText text={{ en: 'Source: ', he: 'מקור: ' }} />
<a href={manuscript.manuscript['source']} target="_blank">{manuscript.manuscript['source'].replace("https://", "")}</a>
<a className="versionDetailsLink" href={manuscript.manuscript['source']} target="_blank">
{ Sefaria.util.parseUrl(manuscript.manuscript['source']).host.replace("www.", "") }
</a>
</div>


Expand Down

0 comments on commit 6ec5e2c

Please sign in to comment.