+
+ Español (es)
+
+
+ Default language
+
+ This language will be used as default translation when adding new languages, and the default language for the site when no other language has been selected.
+
+
+
+
+
+
+ English (en)
+
+
+
+
+
+
+
+
+ Available Languages
+
+
+
+
+ Abkhazian (ab)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Afar (aa)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Afrikaans (af)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Akan (ak)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Albanian (sq)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Amharic (am)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Arabic (ar)
+
+
+
+
+
+
+
+
+ Aragonese (an)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Armenian (hy)
+
+
+
+
+
+
+
+
+ Assamese (as)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Avaric (av)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Avestan (ae)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Aymara (ay)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Azerbaijani (az)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bambara (bm)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bashkir (ba)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Basque (eu)
+
+
+
+
+
+
+
+
+ Belarusian (be)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bengali (Bangla) (bn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bihari (bh)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bislama (bi)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bosnian (bs)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Breton (br)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Bulgarian (bg)
+
+
+
+
+
+
+
+
+ Burmese (my)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Catalan (ca)
+
+
+
+
+
+
+
+
+ Chamorro (ch)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Chechen (ce)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Chichewa, Chewa, Nyanja (ny)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Chinese (zh)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Chinese (Simplified) (zh-Hans)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Chinese (Traditional) (zh-Hant)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Chuvash (cv)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Cornish (kw)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Corsican (co)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Cree (cr)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Croatian (hr)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Czech (cs)
+
+
+
+
+
+
+
+
+ Danish (da)
+
+
+
+
+
+
+
+
+ Divehi, Dhivehi, Maldivian (dv)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Dutch (nl)
+
+
+
+
+
+
+
+
+ Dzongkha (dz)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Esperanto (eo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Estonian (et)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Ewe (ee)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Faroese (fo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Fijian (fj)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Finnish (fi)
+
+
+
+
+
+
+
+
+ French (fr)
+
+
+
+
+
+
+
+
+ Fula, Fulah, Pulaar, Pular (ff)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Galician (gl)
+
+
+
+
+
+
+
+
+ Gaelic Scottish (gd)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Gaelic (Manx) (gv)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Georgian (ka)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ German (de)
+
+
+
+
+
+
+
+
+ Greek (el)
+
+
+
+
+
+
+
+
+ Guarani (gn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Gujarati (gu)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Haitian Creole (ht)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Hausa (ha)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Hebrew (he)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Herero (hz)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Hindi (hi)
+
+
+
+
+
+
+
+
+ Hiri Motu (ho)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Hungarian (hu)
+
+
+
+
+
+
+
+
+ Icelandic (is)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Ido (io)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Igbo (ig)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Indonesian (in)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Interlingua (ia)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Interlingue (ie)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Inuktitut (iu)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Inupiak (ik)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Irish (ga)
+
+
+
+
+
+
+
+
+ Italian (it)
+
+
+
+
+
+
+
+
+ Japanese (ja)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Javanese (jv)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kalaallisut, Greenlandic (kl)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kannada (kn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kanuri (kr)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kashmiri (ks)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kazakh (kk)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Khmer (km)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kikuyu (ki)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kinyarwanda (Rwanda) (rw)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kirundi (rn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kyrgyz (ky)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Komi (kv)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kongo (kg)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Korean (ko)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kurdish (ku)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Kwanyama (kj)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Lao (lo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Latin (la)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Latvian (Lettish) (lv)
+
+
+
+
+
+
+
+
+ Limburgish (Limburger) (li)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Lingala (ln)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Lithuanian (lt)
+
+
+
+
+
+
+
+
+ Luga-Katanga (lu)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Luganda, Ganda (lg)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Luxembourgish (lb)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Macedonian (mk)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Malagasy (mg)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Malay (ms)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Malayalam (ml)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Maltese (mt)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Maori (mi)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Marathi (mr)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Marshallese (mh)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Moldavian (mo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Mongolian (mn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Nauru (na)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Navajo (nv)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Ndonga (ng)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Northern Ndebele (nd)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Nepali (ne)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Norwegian (no)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Norwegian bokmål (nb)
+
+
+
+
+
+
+
+
+ Norwegian nynorsk (nn)
+
+
+
+
+
+
+
+
+ Occitan (oc)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Ojibwe (oj)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Old Church Slavonic, Old Bulgarian (cu)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Oriya (or)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Oromo (Afaan Oromo) (om)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Ossetian (os)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Pāli (pi)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Pashto, Pushto (ps)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Persian (Farsi) (fa)
+
+
+
+
+
+
+
+
+ Polish (pl)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Portuguese (pt)
+
+
+
+
+
+
+
+
+ Punjabi (Eastern) (pa)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Quechua (qu)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Romansh (rm)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Romanian (ro)
+
+
+
+
+
+
+
+
+ Russian (ru)
+
+
+
+
+
+
+
+
+ Sami (se)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Samoan (sm)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sango (sg)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sanskrit (sa)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Serbian (sr)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Serbo-Croatian (sh)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sesotho (st)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Setswana (tn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Shona (sn)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sichuan Yi, Nuosu (ii)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sindhi (sd)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sinhalese (si)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Siswati, Swati (ss)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Slovak (sk)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Slovenian (sl)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Somali (so)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Southern Ndebele (nr)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Sundanese (su)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Swahili (Kiswahili) (sw)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Swedish (sv)
+
+
+
+
+
+
+
+
+ Tagalog (tl)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tahitian (ty)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tajik (tg)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tamil (ta)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tatar (tt)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Telugu (te)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Thai (th)
+
+
+
+
+
+
+
+
+ Tibetan (bo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tigrinya (ti)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tonga (to)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Tsonga (ts)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Turkish (tr)
+
+
+
+
+
+
+
+
+ Turkmen (tk)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Twi (tw)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Uyghur (ug)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Ukrainian (uk)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Urdu (ur)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Uzbek (uz)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Venda (ve)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Vietnamese (vi)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Volapük (vo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Wallon (wa)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Welsh (cy)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Wolof (wo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Western Frisian (fy)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Xhosa (xh)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Yiddish (yi)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Yoruba (yo)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Zhuang, Chuang (za)
+
+ Some adavanced search features may not be available for this language.
+
+
+
+
+
+
+
+
+
+ Zulu (zu)
+
+ Some adavanced search features may not be available for this language.
+
+
+
)}
- {(type === 'text' || type === 'date') && (
-
-
- Properties marked as priority sorting will be used as default sorting criteria.
- If more than one property is marked as priority sorting the system will try to pick-up the best fit.
- When listing mixed template types, the system will pick-up the best combined priority sorting.
-
-
- )}
);
}
diff --git a/app/react/Templates/components/specs/PropertyConfigOptions.spec.js b/app/react/Templates/components/specs/PropertyConfigOptions.spec.js
index e2a62b3221..ebffb9f69a 100644
--- a/app/react/Templates/components/specs/PropertyConfigOptions.spec.js
+++ b/app/react/Templates/components/specs/PropertyConfigOptions.spec.js
@@ -32,11 +32,31 @@ describe('PropertyConfigOptions', () => {
});
describe('priority sorting option', () => {
- it('should render for text and date', () => {
- props.type = 'text';
- expectMatch();
- props.type = 'date';
- expectMatch();
+ describe('when property filter is true', () => {
+ it('should render for text, date, numeric and select if property filter is true', () => {
+ props.property.filter = true;
+ props.type = 'text';
+ expectMatch();
+ props.type = 'date';
+ expectMatch();
+ props.type = 'numeric';
+ expectMatch();
+ props.type = 'select';
+ expectMatch();
+ });
+ });
+ describe('when property filter is not true', () => {
+ it('should not render priority sorting option', () => {
+ props.property.filter = false;
+ props.type = 'text';
+ expectMatch();
+ props.type = 'date';
+ expectMatch();
+ props.type = 'numeric';
+ expectMatch();
+ props.type = 'select';
+ expectMatch();
+ });
});
});
diff --git a/app/react/Templates/components/specs/__snapshots__/PropertyConfigOptions.spec.js.snap b/app/react/Templates/components/specs/__snapshots__/PropertyConfigOptions.spec.js.snap
index 35ec91b8f6..28469450f4 100644
--- a/app/react/Templates/components/specs/__snapshots__/PropertyConfigOptions.spec.js.snap
+++ b/app/react/Templates/components/specs/__snapshots__/PropertyConfigOptions.spec.js.snap
@@ -66,22 +66,76 @@ exports[`PropertyConfigOptions Once the property is checked as filter should ren
This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
+
+
+
+ Use this property as a default filter in the library. When there are no document types selected, this property will show as a default filter for your collection.
+
+
+
+
+ Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+
+
+
+
+
+
+`;
+
+exports[`PropertyConfigOptions priority sorting option when property filter is not true should not render priority sorting option 1`] = `
+
+
+
+ This property will be shown without the label.
+
+
+
+
+ You won't be able to publish a document if this property is empty.
+
+
+
+
+ This property will appear in the library cards as part of the basic info.
+
+
+
- Use this property as a default filter in the library. When there are no document types selected, this property will show as a default filter for your collection.
+ This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
`;
-exports[`PropertyConfigOptions priority sorting option should render for text and date 1`] = `
+exports[`PropertyConfigOptions priority sorting option when property filter is not true should not render priority sorting option 2`] = `
-
+
+
+`;
+
+exports[`PropertyConfigOptions priority sorting option when property filter is not true should not render priority sorting option 3`] = `
+
- Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+ This property will be shown without the label.
+
+
+ You won't be able to publish a document if this property is empty.
+
+
+
+
+ This property will appear in the library cards as part of the basic info.
+
+
+
+
+
+ This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
+
+
+
+
`;
-exports[`PropertyConfigOptions priority sorting option should render for text and date 2`] = `
+exports[`PropertyConfigOptions priority sorting option when property filter is not true should not render priority sorting option 4`] = `
-
+
+
+`;
+
+exports[`PropertyConfigOptions priority sorting option when property filter is true should render for text, date, numeric and select if property filter is true 1`] = `
+
+
+
+ This property will be shown without the label.
+
+
+
+ You won't be able to publish a document if this property is empty.
+
+
+
- Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+ This property will appear in the library cards as part of the basic info.
+
+
+
+ This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
+
+
+
+
+
+ Use this property as a default filter in the library. When there are no document types selected, this property will show as a default filter for your collection.
+
+
+
+
+ Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+
+
+
+
+
+
+`;
+
+exports[`PropertyConfigOptions priority sorting option when property filter is true should render for text, date, numeric and select if property filter is true 2`] = `
+
+
+
+ This property will be shown without the label.
+
+
+
+
+ You won't be able to publish a document if this property is empty.
+
+
+
+
+ This property will appear in the library cards as part of the basic info.
+
+
+
+
+
+ This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
+
+
+
+
+
+ Use this property as a default filter in the library. When there are no document types selected, this property will show as a default filter for your collection.
+
+
+
+
+ Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+
+
+
+
+
+
+`;
+
+exports[`PropertyConfigOptions priority sorting option when property filter is true should render for text, date, numeric and select if property filter is true 3`] = `
+
+
+
+ This property will be shown without the label.
+
+
+
+
+ You won't be able to publish a document if this property is empty.
+
+
+
+
+ This property will appear in the library cards as part of the basic info.
+
+
+
+
+
+ This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
+
+
+
+
+
+ Use this property as a default filter in the library. When there are no document types selected, this property will show as a default filter for your collection.
+
+
+
+
+ Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+
+
+
+
+
+
+`;
+
+exports[`PropertyConfigOptions priority sorting option when property filter is true should render for text, date, numeric and select if property filter is true 4`] = `
+
+
+
+ This property will be shown without the label.
+
+
+
+
+ You won't be able to publish a document if this property is empty.
+
+
+
+
+ This property will appear in the library cards as part of the basic info.
+
+
+
+
+
+ This property will be used for filtering the library results. When properties match in equal name and field type with other document types, they will be combined for filtering.
+
+
+
+
+
+ Use this property as a default filter in the library. When there are no document types selected, this property will show as a default filter for your collection.
+
+
+
+
+ Properties marked as priority sorting will be used as default sorting criteria. If more than one property is marked as priority sorting the system will try to pick-up the best fit. When listing mixed template types, the system will pick-up the best combined priority sorting.
+
+
+
+
+
`;
diff --git a/app/react/UI/Icon/library.js b/app/react/UI/Icon/library.js
index 266347904a..886a888726 100644
--- a/app/react/UI/Icon/library.js
+++ b/app/react/UI/Icon/library.js
@@ -58,6 +58,7 @@ import { faSort } from '@fortawesome/free-solid-svg-icons/faSort';
import { faSortAlphaDown } from '@fortawesome/free-solid-svg-icons/faSortAlphaDown';
import { faSpinner } from '@fortawesome/free-solid-svg-icons/faSpinner';
import { faSquare } from '@fortawesome/free-regular-svg-icons/faSquare';
+import { faStar } from '@fortawesome/free-solid-svg-icons/faStar';
import { faSync } from '@fortawesome/free-solid-svg-icons/faSync';
import { faTerminal } from '@fortawesome/free-solid-svg-icons/faTerminal';
import { faTh } from '@fortawesome/free-solid-svg-icons/faTh';
@@ -130,6 +131,7 @@ const icons = {
faSortAlphaDown,
faSpinner,
faSquare,
+ faStar,
faSync,
faTerminal,
faTh,
diff --git a/app/react/utils/prioritySortingCriteria.js b/app/react/utils/prioritySortingCriteria.js
index d57374db08..0342597895 100644
--- a/app/react/utils/prioritySortingCriteria.js
+++ b/app/react/utils/prioritySortingCriteria.js
@@ -1,22 +1,27 @@
function appendNewOcurrency(sortableOcurrences, property, appendMetadata = true) {
- const propertyName = appendMetadata ? 'metadata.' + property.get('name') : property.get('name');
+ const propertyName = appendMetadata ? `metadata.${property.get('name')}` : property.get('name');
if (!Object.keys(sortableOcurrences).includes(propertyName)) {
- sortableOcurrences[propertyName] = {type: property.get('type'), ocurrs: 0};
+ sortableOcurrences[propertyName] = { type: property.get('type'), ocurrs: 0 };
}
sortableOcurrences[propertyName].ocurrs += 1;
}
function getSortableOcurrences(validTemplates, sortableOcurrences) {
- validTemplates.forEach(template => {
- template.get('commonProperties').forEach(property => {
+ validTemplates.forEach((template) => {
+ template.get('commonProperties').forEach((property) => {
if (property.get('prioritySorting')) {
appendNewOcurrency(sortableOcurrences, property, false);
}
});
- template.get('properties').forEach(property => {
- const sortable = property.get('filter') && (property.get('type') === 'text' || property.get('type') === 'date');
+ template.get('properties').forEach((property) => {
+ const sortable = property.get('filter') && (
+ property.get('type') === 'text' ||
+ property.get('type') === 'date' ||
+ property.get('type') === 'numeric' ||
+ property.get('type') === 'select'
+ );
if (sortable && property.get('prioritySorting')) {
appendNewOcurrency(sortableOcurrences, property);
}
@@ -30,9 +35,9 @@ function asessCriteriaValid(validTemplates, options) {
return validTemplates.reduce((isValid, template) => {
let currentIsValid = isValid;
- template.get('properties').forEach(property => {
+ template.get('properties').forEach((property) => {
const sortable = property.get('filter') && (property.get('type') === 'text' || property.get('type') === 'date');
- currentIsValid = Boolean(currentIsValid || sortable && 'metadata.' + property.get('name') === options.currentCriteria.sort);
+ currentIsValid = Boolean(currentIsValid || sortable && `metadata.${property.get('name')}` === options.currentCriteria.sort);
});
return currentIsValid;
@@ -45,12 +50,12 @@ export default {
return options.override;
}
- let sortingDefault = {sort: 'creationDate', order: 'desc', treatAs: 'number'};
+ let sortingDefault = { sort: 'creationDate', order: 'desc', treatAs: 'number' };
let validTemplates = [];
let sortableOcurrences = {};
if (options.templates) {
- validTemplates = options.templates.map(t => {
+ validTemplates = options.templates.map((t) => {
if (!t.get('commonProperties')) {
return t.set('commonProperties', []);
}
@@ -64,9 +69,9 @@ export default {
sortableOcurrences = getSortableOcurrences(validTemplates, sortableOcurrences);
if (Object.keys(sortableOcurrences).length) {
- const ocurrences = Object.keys(sortableOcurrences).map(property => {
- const {type, ocurrs} = sortableOcurrences[property];
- return {name: property, type, ocurrs};
+ const ocurrences = Object.keys(sortableOcurrences).map((property) => {
+ const { type, ocurrs } = sortableOcurrences[property];
+ return { name: property, type, ocurrs };
});
const priority = ocurrences.reduce((prev, current) => prev.ocurrs >= current.ocurrs ? prev : current);
diff --git a/app/shared/translate.js b/app/shared/translate.js
new file mode 100644
index 0000000000..36b177995c
--- /dev/null
+++ b/app/shared/translate.js
@@ -0,0 +1,11 @@
+export function getLocaleTranslation(translations, locale) {
+ return translations.find(d => d.locale === locale) || { contexts: [] };
+}
+
+export function getContext(translation, contextId) {
+ return translation.contexts.find(ctx => ctx.id === contextId) || { values: {} };
+}
+
+export default function translate(context, key, text) {
+ return context.values[key] || text;
+}
diff --git a/nightmare/fixtures/dump/uwazi_development/connections.bson b/nightmare/fixtures/dump/uwazi_development/connections.bson
index 777bf537b3..5879d7e688 100644
Binary files a/nightmare/fixtures/dump/uwazi_development/connections.bson and b/nightmare/fixtures/dump/uwazi_development/connections.bson differ
diff --git a/nightmare/fixtures/dump/uwazi_development/connections.metadata.json b/nightmare/fixtures/dump/uwazi_development/connections.metadata.json
index 7f3d741528..728ded8c85 100644
--- a/nightmare/fixtures/dump/uwazi_development/connections.metadata.json
+++ b/nightmare/fixtures/dump/uwazi_development/connections.metadata.json
@@ -1 +1 @@
-{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"uwazi_development.connections"},{"v":2,"key":{"sourceDocument":1},"name":"sourceDocument_1","background":true,"ns":"uwazi_development.connections"},{"v":2,"key":{"targetDocument":1},"name":"targetDocument_1","background":true,"ns":"uwazi_development.connections"},{"v":2,"key":{"entity":1},"name":"entity_1","background":true,"ns":"uwazi_development.connections"},{"v":2,"key":{"hub":1},"name":"hub_1","ns":"uwazi_development.connections","background":true},{"v":2,"key":{"sharedId":1},"name":"sharedId_1","ns":"uwazi_development.connections","background":true},{"v":2,"key":{"template":1},"name":"template_1","background":true,"ns":"uwazi_development.connections"}]}
\ No newline at end of file
+{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"uwazi_development.connections"},{"v":2,"key":{"sourceDocument":1},"name":"sourceDocument_1","background":true,"ns":"uwazi_development.connections"},{"v":2,"key":{"targetDocument":1},"name":"targetDocument_1","background":true,"ns":"uwazi_development.connections"},{"v":2,"key":{"entity":1},"name":"entity_1","ns":"uwazi_development.connections","background":true},{"v":2,"key":{"hub":1},"name":"hub_1","ns":"uwazi_development.connections","background":true},{"v":2,"key":{"sharedId":1},"name":"sharedId_1","ns":"uwazi_development.connections","background":true},{"v":2,"key":{"template":1},"name":"template_1","background":true,"ns":"uwazi_development.connections"}]}
\ No newline at end of file
diff --git a/nightmare/fixtures/dump/uwazi_development/migrations.bson b/nightmare/fixtures/dump/uwazi_development/migrations.bson
index 54ebe6a250..9b7fdc9d51 100644
Binary files a/nightmare/fixtures/dump/uwazi_development/migrations.bson and b/nightmare/fixtures/dump/uwazi_development/migrations.bson differ
diff --git a/nightmare/helpers/selectors.js b/nightmare/helpers/selectors.js
index b3737db088..2fea7bf276 100644
--- a/nightmare/helpers/selectors.js
+++ b/nightmare/helpers/selectors.js
@@ -13,7 +13,7 @@ export default {
documentsButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(2) > div.list-group > a:nth-child(1)',
entitiesButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(2) > div.list-group > a:nth-child(2)',
connectionsButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(2) > div.list-group > a:nth-child(4)',
- filtersButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(1) > div.list-group > a:nth-child(7)',
+ filtersButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(1) > div.list-group > a:nth-child(8)',
createFilterGroupButton: '#app > div.content > div > div > div.settings-content > div > div.settings-footer > button.btn.btn-sm.btn-primary',
newFilterGroupForm: '#app > div.content > div > div > div.settings-content > div > div.FiltersForm-list > div > div.panel-body > div > div.col-sm-9 > div > ul > div.list-group-item > div > div.input-group > input',
listOfFilterGroups: '#app > div.content > div > div > div.settings-content > div > div.FiltersForm-list > div > div.panel-body > div > div.col-sm-9 > div > ul > div.list-group-item > div > div.input-group',
@@ -40,7 +40,7 @@ export default {
entityBodyForm: '#app > div.content > div > div > div.settings-content > div > div > div.panel-body > div > main > div > form > ul',
documentTemplateNameForm: '#app > div.content > div > div > div.settings-content > div > div > div.panel-body > div > main > div > form > div.metadataTemplate-heading > div > div > input',
deleteButtonConfirmation: 'body > div.ReactModalPortal > div > div > div > div.modal-footer > button.btn.confirm-button.btn-danger',
- translationsButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(1) > div.list-group > a:nth-child(6)',
+ translationsButton: '#app > div.content > div > div > div.settings-navigation > div > div:nth-child(1) > div.list-group > a:nth-child(7)',
translationInputEn: '#app > div.content > div > div > div.settings-content > div > form > div.panel.panel-default > ul > li:nth-child(3) > div:nth-child(2) > div > div > input',
translationInputEs: '#app > div.content > div > div > div.settings-content > div > form > div.panel.panel-default > ul > li:nth-child(3) > div:nth-child(3) > div > div > input',
translationsSaveButton: '#app > div.content > div > div > div.settings-content > div > form > div.settings-footer > button',
diff --git a/package.json b/package.json
index ff9c288bde..e4c77145e2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "Uwazi",
- "version": "1.3.3",
+ "version": "1.4.0",
"description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.",
"main": "server.js",
"repository": {