Compare commits

...

10 Commits

Author SHA1 Message Date
Norman Jäckel 39aa8b39f1 Merge pull request #1603 from normanjaeckel/FixStable
Fixed error when starting webbrowser. Added info on port to general start message.
2015-07-25 21:44:02 +02:00
Norman Jäckel f9f1575ecc Fixed error when starting webbrowser. Added info on port to general start script message. 2015-07-25 21:35:17 +02:00
Oskar Hahn eb7f2ac359 Merge pull request #1599 from normanjaeckel/FixMotionPollUpdated
Fixed apply url for motion poll update view. Fixed #1489.
2015-07-10 16:28:14 +02:00
Norman Jäckel 70edfe6d87 Fixed apply url for motion poll update view. Fixed #1489. 2015-07-10 14:43:34 +02:00
Norman Jäckel 4b4522f3f8 Merge pull request #1594 from ostcar/issue_1551
Fix check_permission in motion support view.
2015-07-05 22:15:46 +02:00
Oskar Hahn 9b5d8a8bd4 Fix check_permission in motion support view.
Fixes 1551
2015-07-05 20:04:19 +02:00
Norman Jäckel eb2f3c0a58 Merge pull request #1524 from ostcar/not_elected_tooltip
Fixed tooltip to set an candidate in a assignment as not elected.
2015-05-29 13:17:40 +02:00
Oskar Hahn 40a1b65332 Fixed tooltip to set an candidate in a assignment as not elected 2015-05-20 08:47:04 +02:00
Norman Jäckel 104b0625a0 Merge pull request #1491 from emanuelschuetze/fix-1490
Add missing 'can_create_motion' perm check (Fixed #1490).
2015-02-25 11:20:29 +01:00
Emanuel Schuetze e730dbea8b Add missing 'can_create_motion' perm check (Fixed #1490). 2015-02-24 13:42:49 +01:00
6 changed files with 31 additions and 11 deletions

View File

@ -8,6 +8,17 @@ Version 1.7.1 (unreleased)
==========================
[https://github.com/OpenSlides/OpenSlides/milestones/1.7.1]
Motions:
- Show amendment button for users with permission 'can_create_motion'
only.
- Fixed check_permission in motion support view.
- Fixed apply url for motion poll update view.
Assignments:
- Fixed tooltip to set a candidate as not elected.
Other:
- Fixed error when starting webbrowser.
- Added info on port to general start script message.
Version 1.7 (2015-02-16)
========================

View File

@ -196,7 +196,7 @@
{% if candidate in assignment.elected %}
{% if perms.assignment.can_manage_assignment %}
<a class="election_link elected tooltip-bottom" href="{% url 'assignment_user_not_elected' assignment.id candidate.person_id %}"
data-original-title="{% trans 'Mark candidate as elected' %}"></a>
data-original-title="{% trans 'Mark candidate as not elected' %}"></a>
{% else %}
<a class="elected">
<img src="{% static 'img/voting-yes.png' %}" class="tooltip-bottom" data-original-title="{% trans 'Candidate is elected' %}">

View File

@ -291,7 +291,7 @@
</h5>
{{ version.creation_time }}
{% if 'motion_amendments_enabled'|get_config %}
{% if perms.motion.can_create_motion and 'motion_amendments_enabled'|get_config %}
<h5>{% trans 'Amendments' %}:</h5>
{% with amendments=motion.amendments.all %}
{% if amendments %}

View File

@ -499,7 +499,7 @@ class SupportView(SingleObjectMixin, QuestionView):
model = Motion
support = True
def check_permission(self, request):
def check_permission(self, request, *args, **kwargs):
"""
Return True if the user can support or unsupport the motion. Else: False.
"""
@ -615,6 +615,11 @@ class PollUpdateView(PollMixin, PollFormView):
template_name = 'motion/motionpoll_form.html'
def get_apply_url(self):
return reverse(
'motionpoll_update',
kwargs={'pk': self.kwargs['pk'], 'poll_number': self.kwargs['poll_number']})
def get_context_data(self, **kwargs):
"""
Return the template context.

View File

@ -281,15 +281,19 @@ def start_browser(browser_url):
Launches the default web browser at the given url and opens the
webinterface.
"""
browser = webbrowser.get()
try:
browser = webbrowser.get()
except webbrowser.Error as e:
print('Web browser controller error: %s' % e)
else:
def function():
# TODO: Use a nonblocking sleep event here. Tornado has such features.
time.sleep(1)
browser.open(browser_url)
def function():
# TODO: Use a nonblocking sleep event here. Tornado has such features.
time.sleep(1)
browser.open(browser_url)
thread = threading.Thread(target=function)
thread.start()
thread = threading.Thread(target=function)
thread.start()
def get_database_path_from_settings():

View File

@ -74,7 +74,7 @@ def run_tornado(addr, port):
# Print listening address and port to command line
if addr == '0.0.0.0':
url_string = _("the machine's local ip address")
url_string = _("the machine's local ip address (port %s)") % port
else:
url_string = 'http://%s:%s' % (addr, port)
print _("Starting OpenSlides' tornado webserver listening to %(url_string)s") % {'url_string': url_string}