75 IContact contact = Authentication.getIContact();
79 DWDossierModel dossierModel = (DWDossierModel) UserSummaries.getAttribute(
"dossierModel");
81 if(dossierModel ==
null) {
83 dossierModel =
new DWDossierModel();
85 UserSummaries.setAttribute(
"dossierFullCount", dossierModel.getCount());
86 UserSummaries.setAttribute(
"projectFullCount", dossierModel.getProjectCount());
87 UserSummaries.setAttribute(
"dossierParticipantsFullCount", dossierModel.getParticipantsCount());
89 if(!contact.isOutsider()) {
90 dossierModel.setIParticipant(contact);
92 UserSummaries.setAttribute(
"dossierModel", dossierModel);
93 UserSummaries.setAttribute(
"dossierCount", dossierModel.getCount());
94 UserSummaries.setAttribute(
"projectCount", dossierModel.getProjectCount());
95 UserSummaries.setAttribute(
"dossierParticipantsCount", dossierModel.getParticipantsCount());
96 UserSummaries.setAttribute(
"acceptCount", (Long) pending());
97 UserSummaries.setAttribute(
"pendingCount",
new PendingRevisionQuery().getCount());
99 UserSummaries.setAttribute(
"dStatusChart",
new DWWebChart(constructor) {
101 protected void onCreate(Data data, Object[] pars) {
105 protected void loadData() {
106 IContact c = ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).getIParticipant();
107 ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).setIParticipant(
null);
108 setData(I_.get(
"Status"),
109 ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).getByStatus());
110 ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).setIParticipant(c);
114 UserSummaries.setAttribute(
"dPhaseChart",
new DWWebChart(constructor) {
116 protected void onCreate(Data data, Object[] pars) {
120 protected void loadData() {
121 IContact c = ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).getIParticipant();
122 ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).setIParticipant(
null);
123 List<Object[]> data = ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).getByPhase();
124 for(Object[] obj : data) {
125 obj[0] = PhaseDefinitions.instance().get((
int) obj[0]).getName();
127 setData(I_.get(
"Phase"), data);
128 ((DWDossierModel) UserSummaries.getAttribute(
"dossierModel")).setIParticipant(c);
136 DWIssueModel issueModel = (DWIssueModel) UserSummaries.getAttribute(
"issueModel");
138 if(issueModel ==
null) {
140 issueModel =
new DWIssueModel();
142 UserSummaries.setAttribute(
"issueModel", issueModel);
144 UserSummaries.setAttribute(
"issueFullCount", issueModel.getCount());
145 UserSummaries.setAttribute(
"issueParticipantsFullCount", issueModel.getParticipantsCount());
146 UserSummaries.setAttribute(
"issueCommentFullCount", issueModel.getCommentCount());
148 if(!contact.isOutsider()) {
149 issueModel.setIParticipant(contact);
151 UserSummaries.setAttribute(
"issueCount", issueModel.getCount());
152 UserSummaries.setAttribute(
"issueParticipantsCount", issueModel.getParticipantsCount());
153 UserSummaries.setAttribute(
"issueOpenCount", issueModel.getOpenedCount());
154 UserSummaries.setAttribute(
"issueCommentCount", issueModel.getCommentCount());
156 UserSummaries.setAttribute(
"typeChart",
new DWWebChart(constructor) {
158 protected void onCreate(Data data, Object[] pars) {
159 data.setLink(ElephantContext.getRootWebPath() + KnowledgeBaseDashboard.createLink(
"*",
false,
160 (Set<IssueType>) EnumSet.of((IssueType) pars[0]),
null,
null, 0L));
163 protected void loadData() {
164 IContact c = ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).getIParticipant();
165 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).setIParticipant(
null);
166 setData(I_.get(
"Type"),
167 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).getByType());
168 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).setIParticipant(c);
171 UserSummaries.setAttribute(
"statusChart",
new DWWebChart(constructor) {
173 protected void onCreate(Data data, Object[] pars) {
174 data.setLink(ElephantContext.getRootWebPath() + KnowledgeBaseDashboard.createLink(
"*",
false,
null,
175 (Set<IssueStatus>) EnumSet.of((IssueStatus) pars[0]),
null, 0L));
178 protected void loadData() {
179 IContact c = ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).getIParticipant();
180 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).setIParticipant(
null);
181 setData(I_.get(
"Status"),
182 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).getByStatus());
183 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).setIParticipant(c);
186 UserSummaries.setAttribute(
"resolutionChart",
new DWWebChart(constructor) {
188 protected void onCreate(Data data, Object[] pars) {
189 data.setLink(ElephantContext.getRootWebPath() + KnowledgeBaseDashboard.createLink(
"*",
false,
null,
null,
190 (Set<IssueResolution>) EnumSet.of((IssueResolution) pars[0]), 0L));
193 protected void loadData() {
194 IContact c = ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).getIParticipant();
195 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).setIParticipant(
null);
196 setData(I_.get(
"Resolution"),
197 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).getByResolution());
198 ((DWIssueModel) UserSummaries.getAttribute(
"issueModel")).setIParticipant(c);