Changeset bd2819 in indico
- Timestamp:
- 03/25/11 15:32:26 (2 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- 7247b6
- Parents:
- 9afeb6
- Location:
- indico/MaKaC/webinterface
- Files:
-
- 2 edited
-
displayMgr.py (modified) (9 diffs)
-
rh/conferenceModif.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/displayMgr.py
ra7cf56 rbd2819 294 294 link = self.getLinkByName(name) 295 295 if link: 296 link.setCaption(data["caption"]) 296 # only update the caption if it has been already customized 297 if not link.wasChanged(): 298 link.setCaption(data["caption"], silent=True) 297 299 link.setURL(data["URL"]) 298 link.setStaticURL(data["staticURL"])299 300 else: 300 301 #we must create the link … … 308 309 #create the link at the fisrt level 309 310 link = SystemLink(name) 310 link.setCaption(data["caption"] )311 link.setCaption(data["caption"], silent=True) 311 312 link.setURL(data["URL"]) 312 link.setStaticURL(data["staticURL"])313 313 self.addLink(link) 314 314 link.disable() … … 323 323 #We can create the link under the parent 324 324 link = SystemLink(name) 325 link.setCaption(data["caption"] )325 link.setCaption(data["caption"], silent=True) 326 326 link.setURL(data["URL"]) 327 link.setStaticURL(data["staticURL"])328 327 parent.addLink(link) 329 328 link.disable() … … 750 749 Type = "system" 751 750 751 def __init__(self, name, parent=None, changed=False): 752 Link.__init__(self, name, parent) 753 754 # by default, this link will be updated when there are version 755 # changes that modify its default name 756 self._changed = changed 757 752 758 def clone(self, newMenu): 753 newLink = SystemLink(self.getName(), newMenu)759 newLink = SystemLink(self.getName(), parent=newMenu, changed=self.wasChanged()) 754 760 newLink.setEnabled(self.isEnabled()) 755 761 newLink.setVisible(self.isVisible()) 756 762 newLink.setId(self.getId()) 757 763 newLink.setDisplayTarget(self.getDisplayTarget()) 758 newLink.setCaption(self.getCaption(), s tore =True)764 newLink.setCaption(self.getCaption(), silent=True) 759 765 newLink.setURL(self.getURL()) 760 newLink.setStaticURL(self.getStaticURL())761 766 762 767 listLink = [] … … 768 773 return newLink 769 774 775 def wasChanged(self): 776 # old conferences, before `_changed` was introduced 777 if hasattr(self, '_changed'): 778 return self._changed 779 else: 780 # for old conferences, just keeps things as people 781 # left them 782 return True 783 770 784 def getURL(self): 771 785 return self._v_URL … … 774 788 self._v_URL = url 775 789 776 def getStaticURL(self):777 return self._v_staticURL778 779 def setStaticURL(self, url):780 self._v_staticURL = url781 782 790 def getCaption(self): 783 if self._caption != "": 784 return self._caption 785 return self._v_caption 786 787 def setCaption(self, caption, store=False): 788 if store: 789 self._caption = caption 790 self._v_caption = caption 791 return self._caption 792 793 def setCaption(self, caption, silent=False): 794 self._caption = caption 795 796 if not silent: 797 # if the caption was changed, do not update it when the default 798 # value get an update 799 self._changed = True 791 800 792 801 … … 801 810 "caption": _("Overview"), \ 802 811 "URL": str(urlHandlers.UHConferenceOverview.getURL(conf)), \ 803 "staticURL": str(urlHandlers.UHStaticConferenceDisplay.getRelativeURL()), \804 812 "parent": ""}, \ 805 813 "programme": { \ 806 814 "caption": _("Scientific Programme"), \ 807 815 "URL": str(urlHandlers.UHConferenceProgram.getURL(conf)), \ 808 "staticURL": str(urlHandlers.UHStaticConferenceProgram.getRelativeURL()), \809 816 "parent": ""}, \ 810 817 "CFA": { \ 811 818 "caption": _("Call for Abstracts"), \ 812 819 "URL": str(urlHandlers.UHConferenceCFA.getURL(conf)), \ 813 "staticURL": "", \814 820 "parent": ""}, \ 815 821 "ViewAbstracts": { \ 816 822 "caption": _("View my abstracts"), \ 817 823 "URL": str(urlHandlers.UHUserAbstracts.getURL(conf)), \ 818 "staticURL": "", \819 824 "parent": "CFA"}, \ 820 825 "SubmitAbstract": { \ 821 826 "caption": _("Submit a new abstract"), \ 822 827 "URL": str(urlHandlers.UHAbstractSubmission.getURL(conf)), \ 823 "staticURL": "", \824 828 "parent": "CFA"}, \ 825 829 "manageTrack": { \ 826 830 "caption": _("Manage my track"), \ 827 831 "URL": str(urlHandlers.UHTrackModifAbstracts.getURL(conf)), \ 828 "staticURL": "", \829 832 "parent": "programme"}, \ 830 833 "timetable": { \ 831 834 "caption": _("Timetable"), \ 832 835 "URL": str(urlHandlers.UHConferenceTimeTable.getURL( conf )), \ 833 "staticURL": str(urlHandlers.UHStaticConferenceTimeTable.getRelativeURL()), \834 836 "parent": ""}, \ 835 837 "contributionList": { \ 836 838 "caption": _("Contribution List"), \ 837 839 "URL": str(urlHandlers.UHContributionList.getURL( conf )), \ 838 "staticURL": str(urlHandlers.UHStaticContributionList.getRelativeURL()), \839 840 "parent": ""}, \ 840 841 "authorIndex": { \ 841 842 "caption": _("Author index"), \ 842 843 "URL": str(urlHandlers.UHConfAuthorIndex.getURL( conf )), \ 843 "staticURL": str(urlHandlers.UHStaticConfAuthorIndex.getRelativeURL()), \844 844 "parent": ""} ,\ 845 845 "speakerIndex": { \ 846 846 "caption": _("Speaker index"), \ 847 847 "URL": str(urlHandlers.UHConfSpeakerIndex.getURL( conf )), \ 848 "staticURL": "", \849 848 "parent": "", \ 850 849 "visibilityByDefault": False}, \ … … 852 851 "caption": _("My conference"), \ 853 852 "URL": str(urlHandlers.UHConfMyStuff.getURL(conf)), \ 854 "staticURL": "", \855 853 "parent": ""}, \ 856 854 "mytracks": { \ 857 855 "caption": _("My tracks"), \ 858 856 "URL": str(str(urlHandlers.UHConfMyStuffMyTracks.getURL(conf))), \ 859 "staticURL": "", \860 857 "parent": "mystuff"}, \ 861 858 "mysessions": { \ 862 859 "caption": _("My sessions"), \ 863 860 "URL": str(str(urlHandlers.UHConfMyStuffMySessions.getURL(conf))), \ 864 "staticURL": "", \865 861 "parent": "mystuff"}, \ 866 862 "mycontribs": { \ 867 863 "caption": _("My contributions"), \ 868 864 "URL": str(str(urlHandlers.UHConfMyStuffMyContributions.getURL(conf))), \ 869 "staticURL": "", \870 865 "parent": "mystuff"}, \ 871 866 "paperreviewing": { \ 872 867 "caption": _("Paper Reviewing"), \ 873 868 "URL": str(urlHandlers.UHPaperReviewingDisplay.getURL(conf)), \ 874 "staticURL": "", \875 869 "parent": ""}, \ 876 870 "managepaperreviewing": { \ 877 871 "caption": _("Manage Paper Reviewing"), \ 878 872 "URL": str(str(urlHandlers.UHConfModifReviewingPaperSetup.getURL(conf))), \ 879 "staticURL": "", \880 873 "parent": "paperreviewing"}, \ 881 874 "assigncontributions": { \ 882 875 "caption": _("Assign papers"), \ 883 876 "URL": str(str(urlHandlers.UHConfModifReviewingAssignContributionsList.getURL(conf))), \ 884 "staticURL": "", \885 877 "parent": "paperreviewing"}, \ 886 878 "judgelist": { \ 887 879 "caption": _("Referee Area"), \ 888 880 "URL": str(str(urlHandlers.UHConfModifListContribToJudge.getURL(conf))), \ 889 "staticURL": "", \890 881 "parent": "paperreviewing"}, \ 891 882 "judgelistreviewer": { \ 892 883 "caption": _("Content Reviewer Area"), \ 893 884 "URL": str(str(urlHandlers.UHConfModifListContribToJudgeAsReviewer.getURL(conf))), \ 894 "staticURL": "", \895 885 "parent": "paperreviewing"}, \ 896 886 "judgelisteditor": { \ 897 887 "caption": _("Layout Reviewer Area"), \ 898 888 "URL": str(str(urlHandlers.UHConfModifListContribToJudgeAsEditor.getURL(conf))), \ 899 "staticURL": "", \900 889 "parent": "paperreviewing"}, \ 901 890 "uploadpaper": { \ 902 891 "caption": _("Upload paper"), \ 903 892 "URL": str(str(urlHandlers.UHUploadPaper.getURL(conf))), \ 904 "staticURL": "", \905 893 "parent": "paperreviewing"}, \ 906 894 "downloadtemplate": { \ 907 895 "caption": _("Download template"), \ 908 896 "URL": str(str(urlHandlers.UHDownloadPRTemplate.getURL(conf))), \ 909 "staticURL": "", \910 897 "parent": "paperreviewing"}, \ 911 898 "abstractsBook": { \ 912 899 "caption": _("Book of abstracts"), \ 913 900 "URL": str(urlHandlers.UHConfAbstractBook.getURL(conf)), \ 914 "staticURL": str(urlHandlers.UHStaticConfAbstractBook.getRelativeURL()), \915 901 "parent": ""}, \ 916 902 "registrationForm": { \ 917 903 "caption": _("Registration"), \ 918 904 "URL": str(urlHandlers.UHConfRegistrationForm.getURL(conf)), \ 919 "staticURL": "", \920 905 "parent": ""}, \ 921 906 "ViewMyRegistration": { \ 922 907 "caption": _("Modify my registration"), \ 923 908 "URL": str(urlHandlers.UHConfRegistrationFormModify.getURL(conf)), \ 924 "staticURL": "", \925 909 "parent": "registrationForm"}, \ 926 910 "NewRegistration": { \ 927 911 "caption": _("Registration Form"), \ 928 912 "URL": str(urlHandlers.UHConfRegistrationFormDisplay.getURL(conf)), \ 929 "staticURL": "", \930 913 "parent": "registrationForm"}, \ 931 914 "registrants": { \ 932 915 "caption": _("List of registrants"), \ 933 916 "URL": str(urlHandlers.UHConfRegistrantsList.getURL(conf)), \ 934 "staticURL": "", \935 917 "parent": "", \ 936 918 "visibilityByDefault": False}, \ … … 938 920 "caption": _("Evaluation"), \ 939 921 "URL": str(urlHandlers.UHConfEvaluationMainInformation.getURL(conf)), \ 940 "staticURL": "", \941 922 "parent": ""}, \ 942 923 "newEvaluation": { \ 943 924 "caption": _("Evaluation Form"), \ 944 925 "URL": str(urlHandlers.UHConfEvaluationDisplay.getURL(conf)), \ 945 "staticURL": "", \946 926 "parent": "evaluation"}, \ 947 927 "viewMyEvaluation": { \ 948 928 "caption": _("Modify my evaluation"), \ 949 929 "URL": str(urlHandlers.UHConfEvaluationDisplayModif.getURL(conf)), \ 950 "staticURL": "", \951 930 "parent": "evaluation"}, 952 931 "collaboration": { \ 953 932 "caption": _("Video Services"), \ 954 933 "URL": str(urlHandlers.UHCollaborationDisplay.getURL(conf)), \ 955 "staticURL": "", \956 934 "parent": ""} \ 957 935 } -
indico/MaKaC/webinterface/rh/conferenceModif.py
rd71e61 rbd2819 5024 5024 if name.strip()=="": 5025 5025 name="[empty name]" 5026 link.setCaption(name , True)5026 link.setCaption(name) 5027 5027 else: 5028 5028 menu = displayMgr.ConfDisplayMgrRegistery().getDisplayMgr(self._conf).getMenu()
Note: See TracChangeset
for help on using the changeset viewer.
