OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Juju GUI, which lets users view and manage Juju | 2 This file is part of the Juju GUI, which lets users view and manage Juju |
3 environments within a graphical interface (https://launchpad.net/juju-gui). | 3 environments within a graphical interface (https://launchpad.net/juju-gui). |
4 Copyright (C) 2012-2013 Canonical Ltd. | 4 Copyright (C) 2012-2013 Canonical Ltd. |
5 | 5 |
6 This program is free software: you can redistribute it and/or modify it under | 6 This program is free software: you can redistribute it and/or modify it under |
7 the terms of the GNU Affero General Public License version 3, as published by | 7 the terms of the GNU Affero General Public License version 3, as published by |
8 the Free Software Foundation. | 8 the Free Software Foundation. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, but WITHOUT | 10 This program is distributed in the hope that it will be useful, but WITHOUT |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 getter: function() { | 454 getter: function() { |
455 // full_name | 455 // full_name |
456 var tmp = [this.get('series'), this.get('package_name')], | 456 var tmp = [this.get('series'), this.get('package_name')], |
457 owner = this.get('owner'); | 457 owner = this.get('owner'); |
458 if (owner) { | 458 if (owner) { |
459 tmp.unshift('~' + owner); | 459 tmp.unshift('~' + owner); |
460 } | 460 } |
461 return tmp.join('/'); | 461 return tmp.join('/'); |
462 } | 462 } |
463 }, | 463 }, |
464 hasIcon: { | 464 showIcon: { |
465 /** | 465 /** |
466 Does this charm have an icon file. Helper used for template rendering | 466 Should this charm display its icon. Helper used for template |
467 decisions. | 467 rendering decisions. |
468 | 468 |
469 @method hasIcon.valueFn | 469 @method showIcon.valueFn |
470 @return {Boolean} Does the Charm have an icon file. | 470 @return {Boolean} Does the charm have an icon that should be shown? |
471 | 471 |
472 */ | 472 */ |
473 valueFn: function() { | 473 valueFn: function() { |
474 return this.get('files').indexOf('icon.svg') !== -1 ? true : false; | 474 if (this.get('files').indexOf('icon.svg') !== -1 && |
| 475 this.get('is_approved')) { |
| 476 return true; |
| 477 } else { |
| 478 return false; |
| 479 } |
475 } | 480 } |
476 }, | 481 }, |
477 is_approved: {}, | 482 is_approved: {}, |
478 is_subordinate: {}, | 483 is_subordinate: {}, |
479 last_change: { | 484 last_change: { |
480 /** | 485 /** |
481 * Normalize created value from float to date object. | 486 * Normalize created value from float to date object. |
482 * | 487 * |
483 * @method last_change.setter | 488 * @method last_change.setter |
484 */ | 489 */ |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 ATTRS: {} | 701 ATTRS: {} |
697 }); | 702 }); |
698 | 703 |
699 }, '0.1.0', { | 704 }, '0.1.0', { |
700 requires: [ | 705 requires: [ |
701 'model', | 706 'model', |
702 'model-list', | 707 'model-list', |
703 'juju-charm-id' | 708 'juju-charm-id' |
704 ] | 709 ] |
705 }); | 710 }); |
OLD | NEW |