File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737register = template .Library ()
3838
3939def get_user_adid (context ):
40- if 'user' in context and in_group (context ['user' ], "iesg" ):
41- try :
42- usermap = context ['user' ].usermap_set .all ()[0 ]
43- person = usermap .person
44- iesglogin = person .iesglogin_set .all ()[0 ]
45- adId = iesglogin .id
46- return adId
47- except :
48- pass
49- return None
40+ if 'user' in context and in_group (context ['user' ], "Area_Director" ):
41+ return context ['user' ].get_profile ().iesg_login_id ()
42+ else :
43+ return None
5044
5145def get_user_name (context ):
5246 if 'user' in context and context ['user' ].is_authenticated ():
53- try :
54- usermap = context ['user' ].usermap_set .all ()[0 ]
55- person = usermap .person
56- if person :
57- return str (person )
58- except :
59- pass
47+ person = context ['user' ].get_profile ().person ()
48+ if person :
49+ return str (person )
6050 return None
6151
6252def render_ballot_icon (context , doc ):
@@ -140,7 +130,7 @@ def my_position(doc, user):
140130 user_name = get_user_name ({'user' :user })
141131 if not user_name :
142132 return None
143- if not in_group (user , "iesg " ):
133+ if not in_group (user , "Area_Director " ):
144134 return None
145135 if not doc .in_ietf_process ():
146136 return None
Original file line number Diff line number Diff line change 3535{% load ballot_icon %}
3636{% load ietf_filters %}
3737< tr
38- {% if user|in_group: "IESG " %}
38+ {% if user|in_group: "Area_Director " %}
3939{% if doc|my_position:user|equal:"Discuss" %}style="background:#ffa0a0; "{% endif %}
4040{% if doc|my_position:user|equal: "Yes" or doc|my_position:user|slugify|equal:"no-objection" %}style="background:#a0ffa0; "{% endif %}
4141{% if doc|my_position:user|equal: "Abstain" or doc|my_position:user|equal:"Recuse" %}style="background:#c0c0c0; "{% endif %}
6363< td class ="ballot "> {% ballot_icon doc %}</ td >
6464< td class ="ad "> {% if doc.ad_name %}{{ doc.ad_name|escape }}{% else %} {% endif %}</ td >
6565
66- </ tr >
66+ </ tr >
Original file line number Diff line number Diff line change 4747
4848< h1 style ="margin-top:0; "> IESG Discuss Positions</ h1 >
4949
50- {% if user|in_group:"IESG " %}
50+ {% if user|in_group:"Area_Director " %}
5151< div id ="discuss_show1 " style ="display:block; ">
5252< a href ="javascript:show_only_mine() "> Show only my discusses</ a >
5353</ div >
@@ -61,7 +61,7 @@ <h1 style="margin-top:0;">IESG Discuss Positions</h1>
6161< table id ="discuss_table ">
6262< tr > < th class ="doc "> Document</ th > < th class ="status " colspan ="2 "> Status</ th > < th class ="ad "> Area Director</ th > < th > Discusses</ th > </ tr >
6363{% for doc in docs %}
64- < tr {% if user|in_group: "IESG " %}{% if doc|my_position:user|equal:"Discuss" %}
64+ < tr {% if user|in_group: "Area_Director " %}{% if doc|my_position:user|equal:"Discuss" %}
6565class="discuss_my " {% else %} class ="discuss_not_my " {% endif %}{% endif %} >
6666< td class ="doc ">
6767{% if doc.is_rfc_wrapper %}
@@ -109,4 +109,4 @@ <h1 style="margin-top:0;">IESG Discuss Positions</h1>
109109}
110110//]]>
111111</ script >
112- {% endblock %}
112+ {% endblock %}
You can’t perform that action at this time.
0 commit comments