MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / renderConferenceSettings

Function renderConferenceSettings

deployments/desktop/static/desktop.js:5153–5197  ·  view source on GitHub ↗
(sourcePrefs = {})

Source from the content-addressed store, hash-verified

5151 }
5152
5153 function renderConferenceSettings(sourcePrefs = {}) {
5154 const target = $("settingConferenceList");
5155 if (!target) return;
5156 const configured = new Set(splitListValue(sourcePrefs.conferences || ["ICLR", "NeurIPS", "ACL", "SIGIR"]));
5157 const sourceConferences = state.sourceOptions?.conferences || [];
5158 const fallback = Array.from(configured).map((name) => ({ id: name, label: name, enabled: true }));
5159 const conferences = (sourceConferences.length ? sourceConferences : fallback)
5160 .filter((item) => conferenceOptionLabel(item))
5161 .slice(0, 12);
5162
5163 if (!conferences.length) {
5164 target.className = "conference-source-list empty";
5165 target.textContent = ui().settings.noConferenceSources;
5166 return;
5167 }
5168
5169 target.className = "conference-source-list";
5170 target.innerHTML = conferences.map((item) => {
5171 const id = item.id || item.name || item.label;
5172 const label = conferenceOptionLabel(item);
5173 const info = conferenceAccessInfo(item);
5174 const checked = configured.size ? configured.has(id) || configured.has(label) : Boolean(item.enabled !== false);
5175 const disabled = item.enabled === false ? "disabled" : "";
5176 const timeline = [
5177 item.acceptance_timeline && ui().settings.announced(formatConferenceTimeline(item.acceptance_timeline)),
5178 item.conference_date && ui().settings.conferenceDate(formatConferenceTimeline(item.conference_date)),
5179 item.venue_id
5180 ].filter(Boolean).join(" · ");
5181 return `
5182 <label class="conference-source-item ${checked ? "active" : ""}">
5183 <input type="checkbox" value="${escapeHtml(id)}" ${checked ? "checked" : ""} ${disabled}>
5184 <span class="conference-main">
5185 <strong>${escapeHtml(label)} <em>${escapeHtml(item.group || ui().settings.conferenceGroup)}</em></strong>
5186 <small>${escapeHtml(info.detail)}</small>
5187 <small>${escapeHtml(timeline)}</small>
5188 </span>
5189 <span class="conference-meta">
5190 <em>${escapeHtml(info.method)}</em>
5191 <em>${escapeHtml(info.auth)}</em>
5192 <em>${escapeHtml(ui().settings.priorityLabel(info.priority))}</em>
5193 </span>
5194 </label>
5195 `;
5196 }).join("");
5197 }
5198
5199 function selectedSettingConferences() {
5200 return Array.from($("settingConferenceList")?.querySelectorAll("input:checked") || [])

Callers 2

applyLocaleFunction · 0.85
renderSettingsFunction · 0.85

Calls 7

splitListValueFunction · 0.85
conferenceOptionLabelFunction · 0.85
uiFunction · 0.85
conferenceAccessInfoFunction · 0.85
formatConferenceTimelineFunction · 0.85
$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected