Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/s4d'
Browse files Browse the repository at this point in the history
  • Loading branch information
EliezerIsrael committed Oct 27, 2022
2 parents 86597dc + bad3432 commit b1831a8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 44 deletions.
26 changes: 16 additions & 10 deletions helm-chart/sefaria-project/templates/configmap/create-pg-dumps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,25 @@ data:
create-dumps.sh: |-
#!/usr/bin/env bash
set -x
DATADIR="/pgdumps/shared_volume"
DUMP_CMD="pg_dump --file $DATADIR/pg.dump --host $DATABASES_HOST --port $DATABASES_PORT"
DUMP_CMD="pg_dump --file $DATADIR/pg.dump --host $DATABASES_HOST"
if [[ $DATABASES_PORT ]]; then
DUMPCMD+=" --port $DATABASES_PORT"
else
DUMPCMD+=" --port 5432"
fi
DUMP_CMD+=" --username $DATABASES_USER"
IF [[ ! $DATABASES_PASSWORD ]]; THEN
DUMP_CMD+=" --no_passowrd"
ELSE
DUMP_CMD+=" --password $DATABASES_PASSWORD"
FI
if [[ ! $DATABASES_PASSWORD ]]; then
DUMP_CMD+=" --no_password"
else
SET PGPASSWORD='$DATABASES_PASSWORD'
fi
DUMP_CMD+=" --verbose --format=c --no-owner --section=pre-data --section=data --no-privileges"
DUMP_CMD+=" --no-tablespaces --no-unlogged-table-data 'sefaria_auth'"
DUMP_CMD+=" --no-tablespaces --no-unlogged-table-data 'sefaria_auth'"
eval $DUMP_CMD
tar cvzf "${DATADIR}/postgres_dump.tar.gz" -C "${DATADIR}" ./dump
{{- end }}
7 changes: 6 additions & 1 deletion sefaria/model/topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from sefaria.system.database import db
import structlog
import regex as re
from sefaria.site.site_settings import SITE_SETTINGS

logger = structlog.get_logger(__name__)


Expand Down Expand Up @@ -496,7 +498,10 @@ def get_aggregated_urls_for_authors_indexes(self) -> list:
link_names = [] # [(href, en, he)]
for index_or_cat, collective_title_term, base_category in index_or_cat_list:
if isinstance(index_or_cat, Index):
link_names += [(f'/{index_or_cat.title.replace(" ", "_")}', {"en": index_or_cat.get_title('en'), "he": index_or_cat.get_title('he')})]
en_primary_title = index_or_cat.get_title('en')
if "ContextUS" == SITE_SETTINGS["SITE_NAME"]["en"]:
en_primary_title = index_or_cat.get_title('en').replace(f"{str(self)}, ", "", 1)
link_names += [(f'/{index_or_cat.title.replace(" ", "_")}', {"en": en_primary_title, "he": index_or_cat.get_title('he')})]
else:
if collective_title_term is None:
cat_term = Term().load({"name": index_or_cat.sharedTitle})
Expand Down
42 changes: 9 additions & 33 deletions templates/static/jobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,24 @@ <h2>
<!-- Comment out when jobs page has no content -->
</header>

<!---<nav id="jobsNav">
<h3>
<span class="int-en">All Jobs</span>
<span class="int-he">כלל המשרות</span>
</h3>
<ul id="jobsLinks" class="serif"></ul>
</nav>--->

<section class="section department englishOnly">

<!---<section class="section department englishOnly">
<header>
<h2 class="anchorable">Operations</h2>
</header>
<section class="jobsListForDepartment">
<div class="job"><a class="jobLink" target="_blank" href="https://sefaria.breezy.hr/p/7c5bd0c219f7-development-associate">Development Associate</a></div>
<div class="job"><a class="jobLink" target="_blank" href=""></a></div>
</section>
</section>
</section>--->

<!---<section class="section department englishOnly">
<section class="section department englishOnly">
<header>
<h2 class="anchorable">Engineering</h2>
</header>
</section>--->
<section class="jobsListForDepartment">
<div class="job"><a class="jobLink" target="_blank" href="https://sefaria.breezy.hr/p/0cb8dd2c3153-junior-content-engineer">Junior Content Engineer</a></div>
</section>
</section>
<!---<section class="section department englishOnly">
<header>
<h2 class="anchorable">Learning Team</h2>
Expand Down Expand Up @@ -115,26 +111,6 @@ <h2 class="anchorable">Israel Team</h2>

{% endblock %}

{% block js %}
<script type="application/javascript">
/*let jobs = document.querySelectorAll(".job");
let jobsList = document.getElementById("jobsLinks");
if(jobs.length > 1){
jobs.forEach( job => {
const href = job.id;
const title = job.querySelector("h2.anchorable").innerHTML;
let item = document.createElement("li");
let link = document.createElement("a");
link.href = `#${href}`;
link.innerText = title;
item.appendChild(link);
jobsList.appendChild(item);
})
document.getElementById("jobsNav").classList.add("navigationVisible");
}*/
</script>

{% endblock %}



0 comments on commit b1831a8

Please sign in to comment.