Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

disable journal record count in tab titles #216

Merged
merged 3 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions web/src/main/java/org/phoenixctms/ctsms/web/util/WebUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ public String value() {
private final static JsonParser JSON_PARSER = new JsonParser();
private final static String EL_ENUM_LIST_DEFAULT_SEPARATOR = ",";
private final static Pattern EL_ENUM_LIST_REGEXP = Pattern.compile(Pattern.quote(EL_ENUM_LIST_DEFAULT_SEPARATOR));
private final static boolean ENABLE_JOURNAL_COUNT = false;
private final static boolean ENABLE_INQUIRY_VALUE_COUNT = false;
private final static boolean ENABLE_VISIT_SCHEDULE_ITEM_COUNT = false;

public static Date addIntervals(Date date, VariablePeriod period, Long explicitDays, int n) {
try {
Expand Down Expand Up @@ -2502,7 +2505,7 @@ public static JournalCategoryVO getJournalCategory(Long categoryId) {
}

public static Long getJournalCount(JournalModule module, Long id) {
if (module != null && id != null) {
if (ENABLE_JOURNAL_COUNT && module != null && id != null) {
try {
return getServiceLocator().getJournalService().getJournalCount(getAuthentication(), module, id);
} catch (ServiceException | AuthorisationException | IllegalArgumentException e) {
Expand Down Expand Up @@ -3897,7 +3900,7 @@ public static Long getTrialsFromInquiryValues(Long probandId, Boolean active, Bo
Long totalInquiryCount = 0L;
Long trialsWithoutInquiryValuesCount = null;
Collection<TrialOutVO> trialVOs = null;
if (probandId != null) {
if (ENABLE_INQUIRY_VALUE_COUNT && probandId != null) {
try {
trialVOs = getServiceLocator().getProbandService().getInquiryTrials(getAuthentication(), probandId, active, active#);
} catch (ServiceException | AuthorisationException | IllegalArgumentException e) {
Expand Down Expand Up @@ -4421,7 +4424,7 @@ public static VisitScheduleItemOutVO getVisitScheduleItem(Long visitScheduleItem
}

public static Long getVisitScheduleItemCount(Long trialId, Long probandId, boolean expand) {
if (trialId != null || probandId != null) {
if (ENABLE_VISIT_SCHEDULE_ITEM_COUNT && (trialId != null || probandId != null)) {
try {
return getServiceLocator().getTrialService().getVisitScheduleItemCount(getAuthentication(), trialId, null, null, probandId, expand);
} catch (ServiceException | AuthorisationException | IllegalArgumentException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ proband_visit_schedule_tab_title=Visit Schedule
proband_visit_schedule_tab_title_with_count=Visit Schedule ({0})

inquiry_values_tab_list_title=Inquiry Forms
inquiry_values_tab_title=Inquiry Forms ({0})
inquiry_values_tab_title=Inquiry Forms
inquiry_values_tab_title_with_count=Inquiry Forms ({0}/{1} empty)

proband_files_tab_title=Files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ proband_visit_schedule_tab_title=Visitenplan
proband_visit_schedule_tab_title_with_count=Visitenplan ({0})

inquiry_values_tab_list_title=Erhebungsformulare
inquiry_values_tab_title=Erhebungsformulare ({0})
inquiry_values_tab_title=Erhebungsformulare
inquiry_values_tab_title_with_count=Erhebungsformulare ({0}/{1} leer)

proband_files_tab_title=Dateien
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ trusted_referer_hosts=127.0.0.1,localhost,0:0:0:0:0:0:0:1,::1,LOCAL_ADDR,LOCAL_N
inventory_file_folder_tree_dynamic=false
staff_file_folder_tree_dynamic=false
course_file_folder_tree_dynamic=false
trial_file_folder_tree_dynamic=false
trial_file_folder_tree_dynamic=true
proband_file_folder_tree_dynamic=false
mass_mail_file_folder_tree_dynamic=false

Expand Down