Skip to content

Commit

Permalink
Change location. Closes #120 #121
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslawzygmunt committed Aug 26, 2017
1 parent d28297d commit fe0c59b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions src/SuplaBundle/Entity/IODevice.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,6 @@ public function getLocation() {
}

public function setLocation(Location $location) {
if ($this->originalLocation != null
&& $this->originalLocation->getId() == $location->getId()
) {
$this->originalLocation = null;
} elseif ($this->originalLocation == null) {
$this->originalLocation = $this->location;
}

$this->location = $location;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="location">
<h3>{% trans %}Location{% endtrans %}</h3>

{% if iodevice.originalLocation %}
{% if (iodevice.originalLocation) and (iodevice.originalLocation != iodevice.location) %}

<div class="location-info original">
<a href="{{ path('_loc_item', {'id': iodevice.originalLocation.id}) }}" class="item nav-link original">
Expand Down

0 comments on commit fe0c59b

Please sign in to comment.