-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Baljit998/main
Improved look with CSS
- Loading branch information
Showing
13 changed files
with
255 additions
and
19 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2023-11-24 16:08:31.361349", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"user" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "user", | ||
"fieldtype": "Link", | ||
"label": "User", | ||
"options": "User" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2023-11-24 16:08:31.361349", | ||
"modified_by": "Administrator", | ||
"module": "Notice Board", | ||
"name": "assignto", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2023, satinderpal singh and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
class assignto(Document): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ frappe.ui.form.on('notice', { | |
|
||
// } | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
|
||
class notice(WebsiteGenerator): | ||
pass | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* notices.css */ | ||
|
||
.notice-container { | ||
border: 1px solid #ddd; | ||
padding: 10px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.notice-header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.notice-content { | ||
margin-top: 10px; | ||
} | ||
|
||
.notice-title { | ||
font-size: 24px; | ||
margin-bottom: 5px; | ||
} | ||
|
||
.notice-image { | ||
width: 80px; | ||
margin-right: 10px; | ||
} | ||
|
||
.notice-meta { | ||
color: #555; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% extends "templates/web.html" %} | ||
|
||
{% block title %}{{ _("About Us") }}{% endblock %} | ||
|
||
{% block page_content %} | ||
|
||
<!-- Add some basic styling for better presentation --> | ||
<style> | ||
.notices-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
|
||
.notice-card { | ||
width: 30%; /* Adjust the width as needed */ | ||
margin-bottom: 20px; | ||
padding: 15px; | ||
border: 1px solid #ccc; | ||
border-radius: 8px; | ||
} | ||
</style> | ||
|
||
Agent is {{ name }} | ||
The car is {{ car }} | ||
{{ _("About Us") }} | ||
|
||
<div> | ||
We believe that great companies are driven by excellence, | ||
and add value to both its customers and society. | ||
You will find our team embodies these values. | ||
</div> | ||
|
||
<div class="notices-container"> | ||
{% if notices %} | ||
{% for notice in notices %} | ||
<div class="notice-card"> | ||
<p>Notice Title: {{ notice.title }}</p> | ||
<p>Creation Date: {{ frappe.format_date(notice.creation) }}</p> | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
<p>No notices found.</p> | ||
{% endif %} | ||
</div> | ||
|
||
{% endblock %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
<!-- alert("agent"); --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import frappe | ||
|
||
def get_context(context): | ||
# Fetch the agent information | ||
context.name = 'YourAgentName' | ||
context.car = 'YourCarDetails' | ||
|
||
# Fetch a specific notice (replace 'holiday' with the actual name of your notice) | ||
notice_doc = frappe.get_doc('notice', 'holiday') | ||
owner = frappe.get_doc('User', notice_doc.owner) | ||
|
||
context.doc = { | ||
'owner': owner.username, | ||
'creation': notice_doc.creation, | ||
'title': notice_doc.title, | ||
'user_image': owner.user_image, | ||
'route': notice_doc.route, | ||
} | ||
|
||
# Fetch all notices and sort by creation date | ||
notices = frappe.get_all('notice', fields=['owner', 'creation', 'title', 'route'], order_by='creation DESC') | ||
context.notices = [] | ||
|
||
for notice in notices: | ||
owner = frappe.get_doc('User', notice.owner) | ||
context.notices.append({ | ||
'owner': owner.username, | ||
'creation': notice.creation, | ||
'title': notice.title, | ||
'user_image': owner.user_image, | ||
'route': notice.route, | ||
}) | ||
|
||
return context | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h3>List of Users</h3> | ||
<ol> | ||
{% for user in users %} | ||
<li>{{ user.first_name }} {{ user.get("last_name", "") }}</li> | ||
{% endfor %} | ||
</ol> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import frappe | ||
def get_context(context): | ||
context.users = frappe.get_list("User", fields=["first_name", "last_name"]) | ||
|